This commit is contained in:
2026-10-17 16:01:35 +07:00
parent d21525efa4
commit 0f3f22b3b7
72 changed files with 126 additions and 115 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;