Fix: Run migrations after importing backup again (#3006)

As of #2980, the migrations were not run after importing a backup. This lead to errors like "Failed to send message: no such table: smtp" if you imported a backup from a previous DC version.
This commit is contained in:
Hocuri
2022-01-24 16:36:28 +01:00
committed by GitHub
parent 2446fc44ad
commit 5f939c3123
3 changed files with 12 additions and 1 deletions

View File

@@ -215,6 +215,12 @@ impl Sql {
conn.pragma_update(None, "synchronous", &"NORMAL".to_string())?;
}
self.run_migrations(context).await?;
Ok(())
}
pub async fn run_migrations(&self, context: &Context) -> Result<()> {
// (1) update low-level database structure.
// this should be done before updates that use high-level objects that
// rely themselves on the low-level structure.