Database code is getting larger, and we are in need of a migration facility as we settle the schema.
[x] Split code for each type of data into separate files (e.g. variables.rs)
[x] Create migration code.
Migration Code
Store the current migration version in a specific migration tree as a single number. Hardcode the current database version into the binary (because embedded database and laziness). Produce a range of migration numbers to run on startup, which would be all versions between the old and current version, and including the current version. Migrations are functions that receive the Database object.
Database code is getting larger, and we are in need of a migration facility as we settle the schema.
Migration Code
Store the current migration version in a specific migration tree as a single number. Hardcode the current database version into the binary (because embedded database and laziness). Produce a range of migration numbers to run on startup, which would be all versions between the old and current version, and including the current version. Migrations are functions that receive the Database object.