mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 08:11:24 +01:00
no-op migration to break db compatibility
This ensures that the compatibility break works as expected without any other changes to the schema to muck things up.
This commit is contained in:
parent
82a75dc2c1
commit
cfbb11916a
1 changed files with 5 additions and 1 deletions
|
|
@ -535,7 +535,7 @@ impl KeyValueDatabase {
|
|||
#[allow(clippy::too_many_lines)]
|
||||
pub(crate) async fn apply_migrations(&self) -> Result<()> {
|
||||
// If the database has any data, perform data migrations before starting
|
||||
let latest_database_version = DbVersion::Conduit(13);
|
||||
let latest_database_version = DbVersion::Grapevine(0);
|
||||
|
||||
let current_database_version = services().globals.database_version()?;
|
||||
if !current_database_version.is_compatible() {
|
||||
|
|
@ -1081,6 +1081,10 @@ impl KeyValueDatabase {
|
|||
Ok(())
|
||||
})?;
|
||||
|
||||
// Switch to the grapevine version namespace and break db
|
||||
// compatibility with conduit. Otherwise a no-op.
|
||||
migration(DbVersion::Grapevine(0), || Ok(()))?;
|
||||
|
||||
assert_eq!(
|
||||
services().globals.database_version().unwrap(),
|
||||
latest_database_version,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue