10 lines
374 B
SQL
10 lines
374 B
SQL
CREATE TABLE IF NOT EXISTS tournament_sections (
|
|
id SERIAL PRIMARY KEY,
|
|
tournament_id INTEGER NOT NULL REFERENCES tournament_info(id) ON DELETE CASCADE,
|
|
position INTEGER NOT NULL DEFAULT 0,
|
|
title TEXT NOT NULL,
|
|
body TEXT NOT NULL
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_tournament_sections_tournament
|
|
ON tournament_sections (tournament_id, position, id);
|