Combine event and clan points into one table.
This commit is contained in:
@@ -41,11 +41,12 @@ CREATE TABLE Presences (
|
||||
Presence varchar(100) not null
|
||||
);
|
||||
|
||||
CREATE TABLE EventPoints (
|
||||
CREATE TABLE Points (
|
||||
QuarterName varchar(30) not null,
|
||||
UserId varchar(32) not null,
|
||||
DiscordMember boolean not null,
|
||||
Points int unsigned DEFAULT 0,
|
||||
EventPoints int unsigned DEFAULT 0,
|
||||
ClanPoints in unsigned DEFAULT 0,
|
||||
PRIMARY KEY (QuarterName, UserId)
|
||||
);
|
||||
|
||||
@@ -54,24 +55,10 @@ CREATE TABLE Messages (
|
||||
Id bigint unsigned not null
|
||||
);
|
||||
|
||||
CREATE TABLE EventPointsLimit (
|
||||
CREATE TABLE PointsLimit (
|
||||
UserId varchar(32) not null,
|
||||
Points int unsigned DEFAULT 0,
|
||||
Week varchar(7) not null,
|
||||
PRIMARY KEY (UserId, Week)
|
||||
);
|
||||
|
||||
CREATE TABLE ClanPoints (
|
||||
QuarterName varchar(30) not null,
|
||||
UserId varchar(32) not null,
|
||||
DiscordMember boolean not null,
|
||||
Points int unsigned DEFAULT 0,
|
||||
PRIMARY KEY (QuarterName, UserId)
|
||||
);
|
||||
|
||||
CREATE TABLE ClanPointsLimit (
|
||||
UserId varchar(32) not null,
|
||||
Points int unsigned DEFAULT 0,
|
||||
EventPoints int unsigned DEFAULT 0,
|
||||
ClanPoints in unsigned DEFAULT 0,
|
||||
Week varchar(7) not null,
|
||||
PRIMARY KEY (UserId, Week)
|
||||
);
|
||||
@@ -10,12 +10,10 @@ Base = automap_base()
|
||||
Base.prepare(autoload_with=engine)
|
||||
|
||||
# define the classes
|
||||
ClanPoints = Base.classes.ClanPoints
|
||||
ClanPointsLimit = Base.classes.ClanPointsLimit
|
||||
Points = Base.classes.Points
|
||||
PointsLimit = Base.classes.PointsLimit
|
||||
CouncilMembers = Base.classes.CouncilMembers
|
||||
ElectionInformation = Base.classes.ElectionInformation
|
||||
EventPoints = Base.classes.EventPoints
|
||||
EventPointsLimit = Base.classes.EventPointsLimit
|
||||
Messages = Base.classes.Messages
|
||||
Presences = Base.classes.Presences
|
||||
UserBirthday = Base.classes.UserBirthday
|
||||
|
||||
Reference in New Issue
Block a user