by globalqss » Wed Sep 07, 2011 9:32 pm
Thanks Dominik for bringing this here.
Following your idea I would suggest:
- Create a new repository just for seeds and it would be great to have a XML or text representations (oracle/postgresql) of the databases (see below the purpose)
- Jenkins task to recreate seeds and XML/text representation whenever a migration script is committed, and commit the resulting files on the new repository
- Note that modifying/deleting a migration script would be hard to manage unless we have a "starting point" - so I suggest we keep the actual "last version" seed as the initial point to create the permanent seed
- Jenkins could verify and notify any error on script oracle or postgresql
- the installer creation process can be changed to take the new seed instead of the original (that we still keep and upload per release)
Purpose of XML/text representation of databases:
- historically I've found really hard to realize what a migration script is doing on the database. QA/peer review of java changes is doable most of the times just with the commit email, but QA/peer reviewing a migration script is very hard (you can check the consistency of the script, but not easily the consistency of the change being made on DB).
And the bigger the script the harder to review it - as an example look the 047_libero_migration_script.sql (4.5MB) that broke a lot of things on database that were fixed before, and/or introduced lots of new dictionary issues.
- the second purpose is also catch up differences between the oracle vs postgres migration script - that's a common source of errors also, and very, very hard to detect. But easy to detect if we have a XML/text representation that can be comparable
WDYT?
Regards,
Carlos Ruiz