Page MenuHomePhabricator

[web-db] add migration logic to SQLite on web
ClosedPublic

Authored by kamil on May 25 2023, 10:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 21, 7:54 AM
Unknown Object (File)
Fri, Apr 19, 5:54 AM
Unknown Object (File)
Tue, Apr 16, 1:23 PM
Unknown Object (File)
Tue, Apr 16, 7:54 AM
Unknown Object (File)
Mon, Apr 15, 6:54 PM
Unknown Object (File)
Sun, Apr 14, 4:15 PM
Unknown Object (File)
Sun, Apr 14, 7:57 AM
Unknown Object (File)
Sat, Apr 13, 11:56 PM
Subscribers

Details

Summary

Similar to keyserver logic. Currently, nothing is happening when migration will fail but there is a followup task to improve error handling on web.

Depends on D7939

Test Plan
  1. Check if migrate is called when using old db
  2. Check in migrate is not called when creating fresh database
  3. Tests

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.May 25 2023, 1:45 PM

I think you could test the migration code by mocking the migrations variable with jest, but not sure if that's worth it.

This revision is now accepted and ready to land.May 30 2023, 8:26 AM