This wil need to move migration scripts to swh/<mod>/sql/upgrades and have a wrapper script in swh.core.db that:
- check the current dbversion;
- check the latest dbversion;
- run the migrations in between
This wil need to move migration scripts to swh/<mod>/sql/upgrades and have a wrapper script in swh.core.db that:
rDSCH Scheduling utilities | |||
D7165 | rDSCH5cc62be1a405 Adapt to swh.core 2.0.0 | ||
rDCIDX Metadata indexer | |||
D7164 | rDCIDX9e89b83be455 Adapt to swh.core 2.0.0 | ||
rDSTO Storage manager | |||
D7160 | rDSTO215162b2c129 Update for swh.core 2.0.0 | ||
D7160 | rDSTO386fb4d61f19 Add types-toml to requirements-test.txt | ||
rDVAU Software Heritage Vault | |||
D7162 | rDVAUe4c9935c1488 Adapt to swh-core 2.0.0 | ||
rDCORE Foundations and core functionalities | |||
D7064 | rDCORE16e2fd4992ef Add a 'swh db upgrade' command | ||
D7063 | rDCORE7e07b1f36326 Make 'swh db init' fill the dbversion table | ||
D7062 | rDCOREc4bd270c3000 Add support for dbversion and dbmodule handling in swh db init | ||
D7061 | rDCORE3e43730df615 Make `swh db init` retrieve the db cnx uri from the config file | ||
D7060 | rDCORE459da96c1e6b Move utility functions from cli.db to db.db_utils | ||
D7060 | rDCORE932eed4863ba Remove the old and unused log-schema.sql file |
The problem with step 2. is that we do not have an API to declare the latest version, something that should come with swh.core.db is suppose.
To help a bit, here is the plan:
then we should have everything we need to make swh.core.db able to manage the db versionning: