Skip to content

Commit

Permalink
sqlite: return new version in downgrade()
Browse files Browse the repository at this point in the history
We want to give the caller the current version, not the last
version we rolled back, fix that
  • Loading branch information
brunnre8 committed Nov 6, 2023
1 parent ec75ff0 commit d1561f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/plugins/messageStorage/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d1561f8

Please sign in to comment.