generated from VLADIMIR/template
add games teams links
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
-- +goose Up
|
||||
CREATE TABLE
|
||||
IF NOT EXISTS games (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
description TEXT,
|
||||
start_at TIMESTAMP NOT NULL,
|
||||
scenario_id INTEGER NOT NULL,
|
||||
status VARCHAR(50) DEFAULT 'ready',
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW (),
|
||||
started_at TIMESTAMP,
|
||||
ended_at TIMESTAMP,
|
||||
|
||||
CONSTRAINT fk_games_scenario FOREIGN KEY (scenario_id) REFERENCES scenarios (id) ON DELETE RESTRICT
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
DROP TABLE IF EXISTS games;
|
||||
Reference in New Issue
Block a user