Manolo
Manolo

Reputation: 26370

How to update the database schema in a production environment?

I'm working in a project synchronized with a remote repository. I execute this command to update the database on my localhost (development environment):

php app/console doctrine:schema:update --force

but I've read on Doctrine documentation that it shouldn't be executed on a production environment, so I have to execute now the SQL command directly on my production database.

The problem is that I'm not sure what columns I've changed, so I'm looking for a way to know the differences between those databases. Any idea?

Upvotes: 1

Views: 2839

Answers (1)

zool
zool

Reputation: 106

Better is use DB versioning system (doctrine/doctrine-migrations-bundle)

Another way - make full db dump to dev environment than make

php app/console doctrine:schema:update --dump-sql

And start queries on live

Upvotes: 1

Related Questions