change primary key for category votes

This commit is contained in:
Ajay 2022-05-10 14:20:07 -04:00
parent bcb9e33a01
commit 34771e96fe
2 changed files with 3 additions and 3 deletions

View file

@ -3,7 +3,7 @@ BEGIN TRANSACTION;
-- Add primary keys
ALTER TABLE "userNameLogs" ADD PRIMARY KEY ("userID");
ALTER TABLE "categoryVotes" ADD PRIMARY KEY ("UUID", "userID", "category");
ALTER TABLE "categoryVotes" ADD "id" SERIAL PRIMARY KEY;
ALTER TABLE "sponsorTimes" ADD "id" SERIAL PRIMARY KEY;
ALTER TABLE "config" ADD PRIMARY KEY ("key");
ALTER TABLE "ratings" ADD "id" SERIAL PRIMARY KEY;

View file

@ -5,8 +5,8 @@ BEGIN TRANSACTION;
ALTER TABLE "sponsorTimes" ADD PRIMARY KEY ("UUID");
ALTER TABLE "vipUsers" ADD PRIMARY KEY ("userID");
ALTER TABLE "userNames" ADD PRIMARY KEY ("userID");
ALTER TABLE "categoryVotes" ADD PRIMARY KEY ("UUID", "category");
ALTER TABLE "lockCategories" ADD "lockID" SERIAL PRIMARY KEY;
ALTER TABLE "categoryVotes" ADD "id" SERIAL PRIMARY KEY;
ALTER TABLE "lockCategories" ADD "id" SERIAL PRIMARY KEY;
ALTER TABLE "warnings" ADD PRIMARY KEY ("userID", "issueTime");
ALTER TABLE "shadowBannedUsers" ADD PRIMARY KEY ("userID");
ALTER TABLE "unlistedVideos" ADD PRIMARY KEY ("videoID");