From 475170025a66704f062cfc07f66c551dd04f698e 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..3c0809e 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 int unsigned not null, FOREIGN KEY (ElectionCycle) REFERENCES ElectionInformation(ElectionCycle), - PRIMARY KEY (ElectionCycle, VoterId) + PRIMARY KEY (ElectionCycle, VoterId, Type) ); CREATE TABLE UserBirthday (