André Luiz
André Luiz

Reputation: 7312

Phalcon Dev Tools - Database migrations

I would like to know if phalcon php has a tool to create and apply migrations such as django has. I django I create my models and to create the migrations script I just have to type this command: python manage.py makemigrations app_name . And to apply migrations to my project: python manage.py migrate app_name

I would like to know if there is something with the same functinality on phalcon php. I have the phalcon dev tools 2.0.13 and I've been reading about the migration command but as far as I've read I couldn't find such functionality (or I'm not understanding).

Can you help me? Thanks for any help

Upvotes: 0

Views: 858

Answers (1)

André Luiz
André Luiz

Reputation: 7312

I have just found:

phalcon migration generate to create the migration files phalcon migration run to apply the migration files to the database

Tips: create a .phalcon directory in the root of your project if you get this error message: Error: This command should be invoked inside a Phalcon project directory.

And in you config file set 127.0.0.1 instead of localhost if you get this error: ERROR: SQLSTATE[HY000] [2002] No such file or directory

Upvotes: 0

Related Questions