Update ElectionCycle to ElectionName in database creation script.
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
CREATE TABLE ElectionInformation(
|
CREATE TABLE ElectionInformation(
|
||||||
ElectionCycle varchar(30) not null unique,
|
ElectionName varchar(30) not null unique,
|
||||||
ThreadId bigint unsigned not null,
|
ThreadId bigint unsigned not null,
|
||||||
CouncilVoteMsgId bigint unsigned,
|
CouncilVoteMsgId bigint unsigned,
|
||||||
HighCouncilVoteMsgId bigint unsigned,
|
HighCouncilVoteMsgId bigint unsigned,
|
||||||
CouncilNominationMsgId bigint unsigned,
|
CouncilNominationMsgId bigint unsigned,
|
||||||
HighCouncilNominationMsgId bigint unsigned,
|
HighCouncilNominationMsgId bigint unsigned,
|
||||||
PRIMARY KEY (ElectionCycle)
|
PRIMARY KEY (ElectionName)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE CouncilMembers(
|
CREATE TABLE CouncilMembers(
|
||||||
ElectionCycle varchar(30) not null,
|
ElectionName varchar(30) not null,
|
||||||
MemberId bigint unsigned not null,
|
MemberId bigint unsigned not null,
|
||||||
SpeechMsgId bigint unsigned not null,
|
SpeechMsgId bigint unsigned not null,
|
||||||
Elected boolean DEFAULT false,
|
Elected boolean DEFAULT false,
|
||||||
@@ -17,17 +17,17 @@ CREATE TABLE CouncilMembers(
|
|||||||
ClanLeader boolean DEFAULT false,
|
ClanLeader boolean DEFAULT false,
|
||||||
DiscordManagerSpeechId bigint unsigned,
|
DiscordManagerSpeechId bigint unsigned,
|
||||||
ClanLeaderSpeechId bigint unsigned,
|
ClanLeaderSpeechId bigint unsigned,
|
||||||
FOREIGN KEY (ElectionCycle) REFERENCES ElectionInformation(ElectionCycle),
|
FOREIGN KEY (ElectionName) REFERENCES ElectionInformation(ElectionName),
|
||||||
PRIMARY KEY (ElectionCycle, MemberId)
|
PRIMARY KEY (ElectionName, MemberId)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE Votes(
|
CREATE TABLE Votes(
|
||||||
ElectionCycle varchar(30) not null,
|
ElectionName varchar(30) not null,
|
||||||
VoterId bigint unsigned not null,
|
VoterId bigint unsigned not null,
|
||||||
VotedForId bigint unsigned,
|
VotedForId bigint unsigned,
|
||||||
Type varchar(14) not null DEFAULT 'council' check("Type" in ('council', 'discordmanager', 'clanleader')),
|
Type varchar(14) not null DEFAULT 'council' check("Type" in ('council', 'discordmanager', 'clanleader')),
|
||||||
FOREIGN KEY (ElectionCycle) REFERENCES ElectionInformation(ElectionCycle),
|
FOREIGN KEY (ElectionName) REFERENCES ElectionInformation(ElectionName),
|
||||||
PRIMARY KEY (ElectionCycle, VoterId, Type)
|
PRIMARY KEY (ElectionName, VoterId, Type)
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE UserBirthday (
|
CREATE TABLE UserBirthday (
|
||||||
|
|||||||
Reference in New Issue
Block a user