SponsorBlockServer/databases/_upgrade_private_8.sql
2022-05-10 14:06:24 -04:00

15 lines
No EOL
518 B
SQL

BEGIN TRANSACTION;
-- Add primary keys
ALTER TABLE "userNameLogs" ADD PRIMARY KEY ("userID");
ALTER TABLE "categoryVotes" ADD PRIMARY KEY ("UUID", "userID", "category");
ALTER TABLE "sponsorTimes" ADD "id" SERIAL PRIMARY KEY;
ALTER TABLE "config" ADD PRIMARY KEY ("key");
ALTER TABLE "ratings" ADD "id" SERIAL PRIMARY KEY;
ALTER TABLE "tempVipLog" ADD PRIMARY KEY ("issuerUserID", "targetUserID");
ALTER TABLE "votes" ADD PRIMARY KEY ("UUID", "userID");
UPDATE "config" SET value = 8 WHERE key = 'version';
COMMIT;