silly hack to allow migrating from conduit 0.9.0 to grapevine

Starting once with this patch will roll the db version back to 13, and
then grapevine can be run without the patch from that point onward.

The real way we want to do this is to finish the db compatibility break
work in !85, but this can serve as a stopgap.
This commit is contained in:
Olivia Lee 2024-12-01 17:09:58 -08:00
parent a5fe9129f1
commit fdaa30f0d6
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9

View file

@ -997,6 +997,14 @@ impl KeyValueDatabase {
Ok(()) Ok(())
})?; })?;
// Hack to ignore conduit's 13->16 migration. This is fine because
// the migration is idempotent, so it will just be run a second time
// as a no-op when switching from grapevine to conduit.
if services().globals.database_version().unwrap() == 16 {
services().globals.bump_database_version(13)?;
warn!("Reverted: 16 -> 13");
}
assert_eq!( assert_eq!(
services().globals.database_version().unwrap(), services().globals.database_version().unwrap(),
latest_database_version, latest_database_version,