How can I migrate in a production environment ?

Hello everyone,, How can I migrate in a production environment ?

I wanna migrate production by using phalcon learners test nsw. but we should not use development tools in production environment.

now I use this command in local environment.

phalcon migration --verbose --action=run Is there ways of migrating without using phacon-devtools in production environment??



2.9k

The team I'm working with was wondering the same thing. Our phalcon project is not live yet, but I did come up with an idea.

Have the deployment server run the phalcon migration run against the production database.

In most cases, it would be good to run backwards compatible migrations before deploying the actual code.

you can use a single test environment to mimic the production environment

edited 22d ago

Hello, I was about to post the same question.

As implicitely stated on the documentation page ("installing-via-composer"), the devtools is a development tools and it shouldn't be deployed on production (via composer : in "require-dev" section and not in "require"). That makes much sense since no one wants to scaffold an app after it has been deployed. Or, even without calling non migration commands, having unnecessary scripts wandering around.

But, the migration system is indeed required. As such a migration system is primarly aimed at working with actual data, keeping them safe during the process.

The question is then : how this dilemna can be resolved ? Being able to run the migrations generated through the Devtools without installing the whole thing. Or I may be missing something ? Any example on how you guys did on your projets would be helpful.

PS : that thread might be categorized under "Developer Tools". PS2 : other thread one the same subject, no solution given.