List:General Discussion« Previous MessageNext Message »
From:Alexander Kolesen Date:January 23 2010 3:03pm
Subject:Re: Best way to synchronize two database schemas
View as plain text  
One of the ways is to keep db scema under revision control system. And
update it every N minutes.

% crontab -l
0 * * * * mysqldump testdb --no-data > testdb_schema.sql && svn ci -m
"db schema: `date`" > /dev/null

> I have a two databases, one in a production environment (let's call it db_prod) and
> the other in a testing environments (Let's call it db_test).
>
> What is the best way to synchronize the database schemas?  db_test has had a few
> indexes and constraints added to several tables and I need to generate a MySQL script to
> apply these changes to db_prod.  So basically I want to dump the schemas of the two
> database, compare, and generate the necessary script to apply to db_prod.
>
> Thanks,
> Randall Price
>
>
Thread
Best way to synchronize two database schemasRandall Price21 Jan
  • Re: Best way to synchronize two database schemasJohan De Meersman21 Jan
    • RE: Best way to synchronize two database schemasDaevid Vincent21 Jan
      • Re: Best way to synchronize two database schemasJohan De Meersman22 Jan
        • RE: Best way to synchronize two database schemasDaevid Vincent22 Jan
          • Re: Best way to synchronize two database schemasJohnny Withers22 Jan
          • Re: Best way to synchronize two database schemasJohan De Meersman23 Jan
  • Re: Best way to synchronize two database schemasAlexander Kolesen23 Jan
  • Re: Best way to synchronize two database schemasfsb23 Jan
    • Re: Best way to synchronize two database schemasHassan Schroeder23 Jan
  • Re: Best way to synchronize two database schemasMartijn Tonies23 Jan