Page MenuHomePhabricator

[keyserver] Change device_token to mediumtext

Authored by michal on Feb 13 2023, 6:36 AM.
Referenced Files
Unknown Object (File)
Mon, Mar 20, 6:36 AM
Unknown Object (File)
Mon, Feb 27, 7:03 PM
Unknown Object (File)
Fri, Feb 24, 7:50 PM
Unknown Object (File)
Fri, Feb 24, 7:16 PM
Unknown Object (File)
Fri, Feb 24, 2:10 PM
Unknown Object (File)
Mon, Feb 20, 10:22 PM
Unknown Object (File)
Feb 18 2023, 12:35 PM
Unknown Object (File)
Feb 18 2023, 12:35 PM



Part of EMG-2825.

We need to save web push subscription info on the keyserver inside the device_token. Unfortunately it's too long for the current VARCHAR(255) so this diff changes that to a mediumtext. Additionaly indices had to be modified because of the the type change. Now we need to specify a prefix length that they apply to. I've tested it and it seems like registration info is 400-500 bytes so I've set it to 512.

Test Plan
  • Check that existing device_token rows weren't changed after running the migration
  • For android and ios emulators
    • create a new user, check if notifications work
    • run migration
    • check if notifications still work

Diff Detail

rCOMM Comm
Lint Not Applicable
Tests Not Applicable

Event Timeline

ashoat requested changes to this revision.EditedFeb 13 2023, 3:12 PM

Can you amend the Test Plan to include confirming that the text wasn't visibly changed, and that iOS / Android notifs still work in the dev environment?

154 ↗(On Diff #22423)

Can you format the JS the same as other queries in the file?

158 ↗(On Diff #22423)

The migration above this breaks this rule, but we should stay within 80 chars

158 ↗(On Diff #22423)

Did you verify that the text is preserved when running this migration?

This revision now requires changes to proceed.Feb 13 2023, 3:12 PM

Changed formatting, updated the test plan

This revision is now accepted and ready to land.Feb 14 2023, 5:47 AM