1

So, I'm introducing Flyway into our environment to have all schema changes in version control, so I can automate any changes.

The issue is that I have multiple DBs (let's say 30) that all have different versions of the schemas. I'm looking for a tool that would help me bring everything to a common baseline, eg. compare tables and do the necessary alters. The differences are not big - mainly missing columns and indexes.

IronTom
  • 11
  • 2

2 Answers2

0

If you just need to do this once you can try MySQL Workbench. Just import the Schema from your "golden image"-database and synchronize it down to all other databases. Maybe you'll want to run a diff & report before doing that.

Andreas Rogge
  • 2,853
  • 11
  • 24
  • I think this would work fine, although I think it would take some manual work to complete. Thanks. – IronTom Jun 14 '17 at 15:18
0

OK, so what I have figured out is that I can do a full baseline update with Liquibase:

  1. Create an updatefile from gold database image
  2. Append a skip on fail tag to all the changes in the updatefile
  3. Script a run on all databases, credentials from file.
IronTom
  • 11
  • 2