psychedelicious
55b0c7cdc9
feat(db): tidy migration_2
2023-12-12 13:30:29 +11:00
psychedelicious
a69f518c76
feat(db): tidy dependencies for migrations
2023-12-12 13:09:09 +11:00
psychedelicious
0cf7fe43af
feat(db): refactor migrate callbacks to use dependencies, remote pre/post callbacks
2023-12-12 12:35:42 +11:00
psychedelicious
6063760ce2
feat(db): tweak docstring
2023-12-12 11:13:40 +11:00
psychedelicious
c5ba4f2ea5
feat(db): remove file backups
...
Instead of mucking about with the filesystem, we rely on SQLite transactions to handle failed migrations.
2023-12-12 11:12:46 +11:00
psychedelicious
3414437eea
feat(db): instantiate SqliteMigrator with a SqliteDatabase
...
Simplifies a couple things:
- Init is more straightforward
- It's clear in the migrator that the connection we are working with is related to the SqliteDatabase
2023-12-12 10:46:08 +11:00
psychedelicious
afe4e55bf9
feat(db): simplify migration registration validation
...
With the previous change to assert that the to_version == from_version + 1, this validation can be simpler.
2023-12-12 09:52:03 +11:00
psychedelicious
55acc16b2d
feat(db): require migration versions to be consecutive
2023-12-12 09:43:09 +11:00
psychedelicious
290851016e
feat(db): move sqlite_migrator into its own module
2023-12-11 16:41:30 +11:00