This commit is contained in:
2026-10-17 16:00:21 +07:00
parent ee0478ab16
commit 300ff484df
21 changed files with 1643 additions and 870 deletions
@@ -0,0 +1,11 @@
-- +goose Up
ALTER TABLE game_exports ADD COLUMN released_at TIMESTAMPTZ;
DROP INDEX game_exports_active;
CREATE UNIQUE INDEX game_exports_active ON game_exports(game_id)
WHERE state IN ('preparing', 'ready') AND released_at IS NULL;
-- +goose Down
-- Refuse rollback if retained ready exports cannot fit the old unique index.
DROP INDEX game_exports_active;
CREATE UNIQUE INDEX game_exports_active ON game_exports(game_id) WHERE state IN ('preparing', 'ready');
ALTER TABLE game_exports DROP COLUMN released_at;