Slight database change, add util functions for adding points to users.

This commit is contained in:
2024-05-09 20:25:01 -04:00
parent 1495fb7ee6
commit 4f9524a4c1
3 changed files with 80 additions and 3 deletions
+2 -2
View File
@@ -42,8 +42,8 @@ CREATE TABLE Presences (
CREATE TABLE ParticipationPoints (
Cycle varchar(30) not null,
MemberId varchar(32) not null,
UserId varchar(32) not null,
DiscordMember boolean not null,
Points int unsigned DEFAULT 0,
PRIMARY KEY (Cycle, MemberId)
PRIMARY KEY (Cycle, UserId)
);
+2
View File
@@ -1,6 +1,7 @@
"""
Simple file to set up the sqlalchemy connection to database.
"""
from sqlalchemy import create_engine
from sqlalchemy.ext.automap import automap_base
@@ -16,3 +17,4 @@ CouncilMembers = Base.classes.CouncilMembers
Votes = Base.classes.Votes
UserBirthday = Base.classes.UserBirthday
Presences = Base.classes.Presences
ParticipationPoints = Base.classes.ParticipationPoints