Run migrations before delete_and_reset_all_device_msgs()

Both when importing a backup from file or receiving it over the network.
This commit is contained in:
link2xt
2023-04-02 08:12:23 +00:00
parent d6426dc1b6
commit f6d27516cb
2 changed files with 3 additions and 3 deletions

View File

@@ -397,8 +397,7 @@ async fn imex_inner(
export_backup(context, path, passphrase.unwrap_or_default()).await
}
ImexMode::ImportBackup => {
import_backup(context, path, passphrase.unwrap_or_default()).await?;
context.sql.run_migrations(context).await
import_backup(context, path, passphrase.unwrap_or_default()).await
}
}
}
@@ -474,6 +473,7 @@ async fn import_backup(
}
}
context.sql.run_migrations(context).await?;
delete_and_reset_all_device_msgs(context).await?;
Ok(())