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

16 lines
412 B
SQL

-- +goose Up
CREATE TABLE
IF NOT EXISTS applications (
id SERIAL PRIMARY KEY,
name TEXT,
image TEXT,
team_id INTEGER,
status VARCHAR(50) DEFAULT 'need',
created_at TIMESTAMP NOT NULL DEFAULT NOW (),
CONSTRAINT fk_applications_team FOREIGN KEY (team_id) REFERENCES teams (id) ON DELETE CASCADE
);
-- +goose Down
DROP TABLE IF EXISTS applications;