HomePhabricator
Diffusion Comm a58ce8e7e3d6

[keyserver] Change device_token to mediumtext

Description

[keyserver] Change device_token to mediumtext

Summary:
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

Reviewers: atul, kamil, ginsu, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D6714