Files
evening_detective_server/migrations/20260728015952_create_actions_table.sql
T
2026-07-28 20:38:03 +07:00

14 lines
334 B
SQL

-- +goose Up
CREATE TABLE
IF NOT EXISTS actions (
id SERIAL PRIMARY KEY,
code TEXT,
team_id INTEGER,
created_at TIMESTAMP NOT NULL DEFAULT NOW (),
CONSTRAINT fk_actions_team FOREIGN KEY (team_id) REFERENCES teams (id) ON DELETE CASCADE
);
-- +goose Down
DROP TABLE IF EXISTS actions;