All these instructions are deprecated and no longer in used as of 0.7b5 |
All migration scripts are for mysql and resides in xplanner/sql/mysql
Iteration migration
Every iteration (2weeks) we release internally to Sabre. The migration script to migrate the database from the previous iteration schema to the next should be called after the upcoming iteration number:
- Current iteration: iteration 21
- Current migration script:
iteration21.sql
Release migration
Every time a change is made to the database during an iteration we change the iteration script and the release script. The release script will be used to migrate the previous published release schema to the upcoming one. Therefore it accumulates all iteration script from the first iteration of a release to the last. A optimization of the steps should be done incrementally.
This script should be named after the from and the to release:
- Latest production release: 0.6.2
- Upcoming release: 0.7
- Release migration script name:
xplanner-0_6_2-to-0_7.sql
If there are multi-steps involved in the schema/data migration the script should have a sequence letter appended to it:
- First migration script:
xplanner-0_6_2-to-0_7-A.sql - Second migration script:
xplanner-0_6_2-to-0_7-B.sql
Migration testing
The build loop should ideally test both iteration and release migration scripts.
At each end of release we should capture the schema of the new production database and call it after it:
- Latest production release: 0.7
- Latest production release schema snapshot:
xplanner-0_7.sql - Latest production release full database snapshot (results of the
dumpcommand):xplanner-0_7-testdata.sql
The continuous build loop should test that a migrated schema from the previous iteration schema (extracted from production like today) and a migrated schema from the saved latest release schema (xplanner-<x-x-x>.sql). The test should compare that a schema generated from scratch through ant
is compatible to both migrated schema (these 2 should be exactly the same since they are made of the same steps).