Make the VoteType StrEnum and edit column in database to enforce only 3 values.
build_develop / build (push) Successful in 1m21s
build_develop / build (push) Successful in 1m21s
This commit is contained in:
@@ -25,7 +25,7 @@ CREATE TABLE Votes(
|
||||
ElectionCycle varchar(30) not null,
|
||||
VoterId bigint unsigned not null,
|
||||
VotedForId bigint unsigned,
|
||||
Type int unsigned not null,
|
||||
Type varchar(14) not null DEFAULT 'council' check("Type" in ('council', 'discordmanager', 'clanleader')),
|
||||
FOREIGN KEY (ElectionCycle) REFERENCES ElectionInformation(ElectionCycle),
|
||||
PRIMARY KEY (ElectionCycle, VoterId, Type)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user