summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--support/schema/aur-schema.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql
index 2a2a1a7..8d5c427 100644
--- a/support/schema/aur-schema.sql
+++ b/support/schema/aur-schema.sql
@@ -168,7 +168,7 @@ CREATE TABLE PackageVotes (
FOREIGN KEY (UsersID) REFERENCES Users(ID) ON DELETE CASCADE,
FOREIGN KEY (PackageID) REFERENCES Packages(ID) ON DELETE CASCADE
);
-
+CREATE UNIQUE INDEX VoteUsersIDPackageID ON PackageVotes (UsersID, PackageID);
-- The individual files and their file system location.
--
@@ -206,6 +206,7 @@ CREATE TABLE CommentNotify (
FOREIGN KEY (PkgID) REFERENCES Packages(ID) ON DELETE CASCADE,
FOREIGN KEY (UserID) REFERENCES Users(ID) ON DELETE CASCADE
);
+CREATE UNIQUE INDEX NotifyUserIDPkgID ON CommentNotify (UserID, PkgID);
-- Vote information
--