MEM
MEM

Reputation: 31337

Synchronize Local and Remote MySQL Databases

I'm trying to get a workflow on database synchronization. Right now:

  1. We create a database.

  2. The database goes to production.

  3. Later... we realise that we need to change the database structure. We change that locally.

  4. Once that is done, we upload to the production.

If this is common among developers, what methods do you use to deal with this, without losing data already introduced on the production side?

Upvotes: 3

Views: 3358

Answers (1)

Charles
Charles

Reputation: 51411

You should be placing your database schema under version control. There are lots of tools available to help you with this.

Check out this other previous question on the topic for a few PHP-specific options. Database migrations are usually part of code rollouts. Look into build tools to help make this process more automated. Phing is a popular option.

Upvotes: 3

Related Questions