Database Migration

Add-ons Builder uses Schematic. “The worst schema versioning system, ever?”.


Applying migrations

./vendor/src/schematic/schematic ./migrations/

Creating migrations

Create migrations/{number}-{some_name}.[py/sql] file (check migrations directory for examples). Python files will be executed and SQL run directly on database.


Schematic is storing current migration number in schema_version table. Change it if you’ve created database by ./ syncdb.