This commit is contained in:
2026-10-03 20:39:03 +07:00
parent edb6d910f7
commit 1bbc32c3dc
134 changed files with 3782 additions and 0 deletions
@@ -0,0 +1,17 @@
-- +goose Up
CREATE TABLE
IF NOT EXISTS team_answers (
id SERIAL PRIMARY KEY,
team_id INTEGER NOT NULL,
question_code TEXT NOT NULL,
answer TEXT NOT NULL DEFAULT '',
score INTEGER,
created_at TIMESTAMP NOT NULL DEFAULT NOW (),
updated_at TIMESTAMP NOT NULL DEFAULT NOW (),
CONSTRAINT fk_team_answers_team FOREIGN KEY (team_id) REFERENCES teams (id) ON DELETE CASCADE,
CONSTRAINT uq_team_answer UNIQUE (team_id, question_code)
);
-- +goose Down
DROP TABLE IF EXISTS team_answers;