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
|
Presence varchar(100) not null
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE EventPoints (
|
CREATE TABLE Points (
|
||||||
QuarterName varchar(30) not null,
|
QuarterName varchar(30) not null,
|
||||||
UserId varchar(32) not null,
|
UserId varchar(32) not null,
|
||||||
DiscordMember boolean 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)
|
PRIMARY KEY (QuarterName, UserId)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -54,24 +55,10 @@ CREATE TABLE Messages (
|
|||||||
Id bigint unsigned not null
|
Id bigint unsigned not null
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE EventPointsLimit (
|
CREATE TABLE PointsLimit (
|
||||||
UserId varchar(32) not null,
|
UserId varchar(32) not null,
|
||||||
Points int unsigned DEFAULT 0,
|
EventPoints int unsigned DEFAULT 0,
|
||||||
Week varchar(7) not null,
|
ClanPoints in unsigned DEFAULT 0,
|
||||||
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,
|
|
||||||
Week varchar(7) not null,
|
Week varchar(7) not null,
|
||||||
PRIMARY KEY (UserId, Week)
|
PRIMARY KEY (UserId, Week)
|
||||||
);
|
);
|
||||||
@@ -10,12 +10,10 @@ Base = automap_base()
|
|||||||
Base.prepare(autoload_with=engine)
|
Base.prepare(autoload_with=engine)
|
||||||
|
|
||||||
# define the classes
|
# define the classes
|
||||||
ClanPoints = Base.classes.ClanPoints
|
Points = Base.classes.Points
|
||||||
ClanPointsLimit = Base.classes.ClanPointsLimit
|
PointsLimit = Base.classes.PointsLimit
|
||||||
CouncilMembers = Base.classes.CouncilMembers
|
CouncilMembers = Base.classes.CouncilMembers
|
||||||
ElectionInformation = Base.classes.ElectionInformation
|
ElectionInformation = Base.classes.ElectionInformation
|
||||||
EventPoints = Base.classes.EventPoints
|
|
||||||
EventPointsLimit = Base.classes.EventPointsLimit
|
|
||||||
Messages = Base.classes.Messages
|
Messages = Base.classes.Messages
|
||||||
Presences = Base.classes.Presences
|
Presences = Base.classes.Presences
|
||||||
UserBirthday = Base.classes.UserBirthday
|
UserBirthday = Base.classes.UserBirthday
|
||||||
|
|||||||
Reference in New Issue
Block a user