From f4f3bfe10322aa808cd14f0a12ed5ae89b7d5b43 Mon Sep 17 00:00:00 2001 From: imcompiling Date: Sat, 18 May 2024 15:39:13 -0400 Subject: [PATCH] Edit database to add a type field to Votes. --- database_setup/database.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/database_setup/database.sql b/database_setup/database.sql index bab1494..b57e842 100644 --- a/database_setup/database.sql +++ b/database_setup/database.sql @@ -25,8 +25,9 @@ CREATE TABLE Votes( ElectionCycle varchar(30) not null, VoterId bigint unsigned not null, VotedForId bigint unsigned, + Type varchar(14) check("Type" in ('Council','DiscordManager','ClanLeader')), FOREIGN KEY (ElectionCycle) REFERENCES ElectionInformation(ElectionCycle), - PRIMARY KEY (ElectionCycle, VoterId) + PRIMARY KEY (ElectionCycle, VoterId, Type) ); CREATE TABLE UserBirthday (