Page MenuHomePhabricator

[web] Migrate drafts to db for everyone
ClosedPublic

Authored by michal on Sep 8 2023, 6:54 AM.
Tags
None
Referenced Files
F1802652: D9110.diff
Mon, May 20, 1:41 PM
Unknown Object (File)
Tue, May 7, 8:32 AM
Unknown Object (File)
Wed, Apr 24, 8:37 PM
Unknown Object (File)
Apr 5 2024, 11:25 AM
Unknown Object (File)
Apr 5 2024, 11:25 AM
Unknown Object (File)
Apr 5 2024, 11:25 AM
Unknown Object (File)
Apr 5 2024, 11:24 AM
Unknown Object (File)
Apr 5 2024, 11:19 AM
Subscribers

Details

Summary

Part of ENG-4844
Depends on D9109

We need to migrate drafts for all users to the db.

Test Plan

Tested on chromium:

  • [on master] Replaced code in isSQLiteSupported:
return false; // <- added
if (!isDev && (!currentLoggedInUserID || !isStaff(currentLoggedInUserID))) {
  return false;
}
  • logged in, made sure that there is persist:root in local storage, created a draft, closed the web page
  • [Applied this diff] opened the web page, and checked if the draft are still there

Diff Detail

Repository
rCOMM Comm
Branch
michal/eng-4844
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

michal requested review of this revision.Sep 8 2023, 7:12 AM

Instead of removing the previous migration, make it noop.

The reason why we can ignore this migration is because either:

  • user is a staff user and we can assume that most staff users are already on version >= 2
    • I don't think it's worth handling the edge case of staff users still on version 1
  • user is not a staff user, in which case the migration was a noop anyway
    • (but after changes in previous diffs, the database would be supported and so this migration would run, incorrectly)
This revision is now accepted and ready to land.Sep 11 2023, 12:33 AM