Remove duplicate usernames and make unique

Closes #336
This commit is contained in:
Ajay Ramachandran 2021-08-05 16:50:39 -04:00
parent 94b82b6865
commit 00858b6633

View file

@ -0,0 +1,12 @@
BEGIN TRANSACTION;
DELETE FROM "userNames" WHERE ctid NOT IN (
SELECT MIN(ctid) FROM "userNames"
GROUP BY "userID"
);
ALTER TABLE "userNames" ADD UNIQUE("userID");
UPDATE "config" SET value = 23 WHERE key = 'version';
COMMIT;