Files
evening_detective_server/migrations/20260913130000_add_team_registration.sql
T
2026-09-13 01:42:22 +07:00

14 lines
523 B
SQL

-- +goose Up
ALTER TABLE teams
ADD COLUMN captain_email TEXT NOT NULL DEFAULT '',
ADD COLUMN participants_count INTEGER NOT NULL DEFAULT 0 CHECK (participants_count >= 0),
ADD COLUMN registration_delivery_id TEXT,
ADD CONSTRAINT teams_registration_delivery_unique UNIQUE (game_id, registration_delivery_id);
-- +goose Down
ALTER TABLE teams
DROP CONSTRAINT teams_registration_delivery_unique,
DROP COLUMN registration_delivery_id,
DROP COLUMN participants_count,
DROP COLUMN captain_email;