SponsorBlockServer/databases/_upgrade_sponsorTimes_23.sql

13 lines
394 B
MySQL
Raw Normal View History

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