How to Deploy DB Changes from Dev to Production in Magento

deploymentmagento-enterprise

I am aware that modules have install and data setup scripts to make the DB portable from dev to production.

But in our case we have UI developers who add attributes and products through the admin interface which gets stored in the development DB.

On release day, we can't repeat all the steps we made in the dev environment, since it will be too tedious and time consuming.

Is there a way to handle such DB changes when deploying.

For now we are performing a diff between the dev DB and prod DB and generating a SQL which gets run on release day. But this is little dangerous since the dev DB might contain test transactional data and we can end up locking transactional tables in prod if our SQL has any statements modifying transactional tables.

Is there best practice around this? Thanks for the help in advance

Best Answer

There are different extensions for migrating data between environments but using them is shooting yourself into a foot. You definitely don't want to screw your production environment if something will go wrong.

The only right way to migrate data is to use setup scripts.

Also it will allow setting up new environments (for example for new fishes of your team) which will be up to date with the current state of things.

Good question by the way.

Related Topic