How can I transfer the doctrine database to Symfony when the project is offline

So, I disabled my site using

symfony project:disable --env=prod 

And updated my new code on the server.

But now when I run

 symfony doctrine:migrate --env=prod 

I get a warning that the site is currently unavailable.

I obviously do not want to include the project (for now), since I first want it to work. What is the right way to do this?

+4
source share
2 answers

You're right. By default, this does not work. If your production database is available on your development machine, you can start the migration to this computer using:

 $> php symfony doctrine:migrate --env=prod 

Here is what I do in deployment scenarios

+1
source

I would probably restrict access to your IP address in index.php, for example when working in a dev environment. Turn on the project, and then run it again.

0
source

Source: https://habr.com/ru/post/1335781/


All Articles