SponsorBlockServer/databases/_upgrade_sponsorTimes_23.sql
Ajay Ramachandran 326f9e6e93 Fix sqlite
2021-08-05 20:03:37 -04:00

12 lines
394 B
SQL

BEGIN TRANSACTION;
DELETE FROM "userNames" WHERE ctid NOT IN ( --!sqlite-ignore
SELECT MIN(ctid) FROM "userNames" --!sqlite-ignore
GROUP BY "userID" --!sqlite-ignore
); --!sqlite-ignore
ALTER TABLE "userNames" ADD UNIQUE("userID"); --!sqlite-ignore
UPDATE "config" SET value = 23 WHERE key = 'version';
COMMIT;