sqlite: return new version in downgrade()

We want to give the caller the current version, not the last
version we rolled back, fix that
This commit is contained in:
Reto Brunner 2023-07-29 12:20:12 +02:00
parent ec75ff00cb
commit d1561f8ebc

View file

@ -307,7 +307,7 @@ class SqliteMessageStorage implements SearchableMessageStorage {
await this.delete_migrations_older_than(version);
await this.update_version_in_db();
return _rollbacks.at(-1)!.version; // assert valid due to length guard above
return version;
}
async downgrade_to(version: number) {