mirror of
https://github.com/chatmail/core.git
synced 2026-05-12 19:36:32 +03:00
imex: run migrations after receiving a transferred backup
Similarly to how `imex_inner()` runs migrations after successful call to `import_backup()`, migrations should be run after receiving a backup using `transfer_from_provider()`.
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.112.5 - unrelesaed
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Run SQL database migrations after receiving a backup from the network. #4287
|
||||||
|
|
||||||
## [1.112.4] - 2023-03-31
|
## [1.112.4] - 2023-03-31
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|||||||
@@ -408,6 +408,7 @@ async fn get_backup_inner(context: &Context, qr: Qr) -> Result<()> {
|
|||||||
match transfer_from_provider(context, &ticket).await {
|
match transfer_from_provider(context, &ticket).await {
|
||||||
Ok(()) => {
|
Ok(()) => {
|
||||||
delete_and_reset_all_device_msgs(context).await?;
|
delete_and_reset_all_device_msgs(context).await?;
|
||||||
|
context.sql.run_migrations(context).await?;
|
||||||
context.emit_event(ReceiveProgress::Completed.into());
|
context.emit_event(ReceiveProgress::Completed.into());
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user