Add submissions table.
This commit is contained in:
@@ -11,7 +11,8 @@ Base = automap_base()
|
||||
Base.prepare(autoload_with=engine)
|
||||
|
||||
# define the classes
|
||||
Guild = Base.classes.Guilds
|
||||
CategoryGroup = Base.classes.CategoryGroups
|
||||
Category = Base.classes.Categories
|
||||
CategoryGroup = Base.classes.CategoryGroups
|
||||
Guild = Base.classes.Guilds
|
||||
Score = Base.classes.Scores
|
||||
Submission = Base.classes.Submissions
|
||||
|
||||
@@ -43,3 +43,12 @@ CREATE TABLE Scores(
|
||||
FOREIGN KEY (CategoryId) REFERENCES Categories(CategoryId) ON DELETE CASCADE,
|
||||
PRIMARY KEY (CategoryId, UserName)
|
||||
);
|
||||
|
||||
CREATE TABLE Submissions(
|
||||
CategoryId int unsigned not null,
|
||||
GroupId int unsigned not null,
|
||||
GuildId int unsigned not null,
|
||||
MessageId int unsigned not null,
|
||||
Score varchar(30) not null, -- Score is stored as a string until converted during submission
|
||||
UserName varchar(30) not null
|
||||
);
|
||||
Reference in New Issue
Block a user