开发者

How can I migrate a doctrine DB in Symfony when the project is disabled

开发者 https://www.devze.com 2023-02-04 20:04 出处:网络
So I disabled my site with symfony project:disable --env=prod And rsynced my new code to the server. But now when I run

So I disabled my site with

symfony project:disable --env=prod

And rsynced my new code to the server.

But now when I run

symfony doctrine:migrate --env=prod

I get a warning that the site is cu开发者_如何学Crrently unavailable.

I clearly don't want to enable the project (yet) as I first want to make it all works. What is the correct way to do this?


You are right. This doesn't work by default. If your production database is available from your development machine you can start the migration on this machine via:

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

Thats what I do in my deployment scripts


I would probably restrict access to your IP address in the index.php, such as when working in the dev environment. Enable the project and then run again.

0

精彩评论

暂无评论...
验证码 换一张
取 消