feat: Add lb and adjust commands.
This commit is contained in:
@@ -6,7 +6,7 @@ VALUES ('SUBATHON', 0, 1, 'Initial Creation');
|
||||
|
||||
CREATE TABLE subathons(
|
||||
subathon_id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
communityid INTEGER NOT NULL REFERENCES communities(communityid),
|
||||
communityid INTEGER NOT NULL REFERENCES communities(communityid) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
started_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
initial_time INTEGER NOT NULL,
|
||||
name TEXT,
|
||||
@@ -27,8 +27,8 @@ CREATE TABLE running_subathons(
|
||||
|
||||
CREATE TABLE subathon_contributions(
|
||||
contribution_id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
subathon_id INTEGER NOT NULL REFERENCES subathons(subathon_id),
|
||||
profileid INTEGER REFERENCES user_profiles(profileid),
|
||||
subathon_id INTEGER NOT NULL REFERENCES subathons(subathon_id) ON DELETE CASCADE,
|
||||
profileid INTEGER REFERENCES user_profiles(profileid) ON DELETE SET NULL,
|
||||
score NUMERIC NOT NULL,
|
||||
event_id INTEGER REFERENCES events(event_id),
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
@@ -36,7 +36,7 @@ CREATE TABLE subathon_contributions(
|
||||
|
||||
CREATE TABLE subathon_goals(
|
||||
goal_id INTEGER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
|
||||
subathon_id INTEGER NOT NULL REFERENCES subathons(subathon_id),
|
||||
subathon_id INTEGER NOT NULL REFERENCES subathons(subathon_id) ON DELETE CASCADE,
|
||||
required_score NUMERIC NOT NULL,
|
||||
description TEXT NOT NULL,
|
||||
notified BOOLEAN DEFAULT false,
|
||||
|
||||
Reference in New Issue
Block a user