mirror of https://github.com/sipwise/db-schema.git
The format of Android push tokens is a free-form binary string of up to 4096 bytes. Currently the tokens are under 256 bytes long, but we expand the DB field anyway to be future-proof. Unfortunately MySQL doesn't allow keys that long, so we have to restrict the field to 3072 bytes. Further add an auto-increment integer primary key to make InnoDB happy. Change-Id: Ic664d47b80f751397ec51688d8f399da06eac176mr10.1
parent
b8bac3a905
commit
31527c2281
@ -0,0 +1,4 @@
|
||||
ALTER TABLE kamailio.mobile_push_registrations
|
||||
DROP id,
|
||||
DROP INDEX reg_token,
|
||||
MODIFY reg_id VARBINARY(255) NOT NULL PRIMARY KEY;
|
@ -0,0 +1,5 @@
|
||||
ALTER TABLE kamailio.mobile_push_registrations
|
||||
DROP PRIMARY KEY,
|
||||
ADD id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
||||
MODIFY reg_id VARBINARY(3072) NOT NULL,
|
||||
ADD UNIQUE INDEX reg_token (reg_id);
|
Loading…
Reference in new issue