Combine event and clan points into one table.

This commit is contained in:
2024-12-22 14:41:50 -05:00
parent 0dd1a90edd
commit a081718f8d
2 changed files with 8 additions and 23 deletions
+6 -19
View File
@@ -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)
);
+2 -4
View File
@@ -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