fix(migrations): remove explicit BEGIN/COMMIT from migrations 0012-0015

applyMigration() already wraps each file in a db.Begin()/tx.Commit()
transaction. The inner BEGIN/COMMIT in these files caused the outer
transaction to commit early, leaving applyMigration trying to insert
into schema_version on an idle connection:
  pq: unexpected transaction status idle

Affected: 0012_guild_invites, 0014_return_guilds, 0015_tournament.
This commit is contained in:
Houmgaor
2026-03-23 11:59:57 +01:00
parent 470a761191
commit 19a49fa0ae
3 changed files with 0 additions and 12 deletions

View File

@@ -1,5 +1,3 @@
BEGIN;
-- Dedicated table for guild-initiated scout invitations, separate from -- Dedicated table for guild-initiated scout invitations, separate from
-- player-initiated applications. This gives each invitation a real serial PK -- player-initiated applications. This gives each invitation a real serial PK
-- so the client's InvitationID field can map to an actual database row -- so the client's InvitationID field can map to an actual database row
@@ -19,5 +17,3 @@ FROM guild_applications
WHERE application_type = 'invited'; WHERE application_type = 'invited';
DELETE FROM guild_applications WHERE application_type = 'invited'; DELETE FROM guild_applications WHERE application_type = 'invited';
COMMIT;

View File

@@ -1,5 +1 @@
BEGIN;
ALTER TABLE public.guilds ADD COLUMN IF NOT EXISTS return_type SMALLINT NOT NULL DEFAULT 0; ALTER TABLE public.guilds ADD COLUMN IF NOT EXISTS return_type SMALLINT NOT NULL DEFAULT 0;
COMMIT;

View File

@@ -1,5 +1,3 @@
BEGIN;
CREATE TABLE IF NOT EXISTS tournaments ( CREATE TABLE IF NOT EXISTS tournaments (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
name VARCHAR(64) NOT NULL, name VARCHAR(64) NOT NULL,
@@ -44,5 +42,3 @@ CREATE TABLE IF NOT EXISTS tournament_results (
stage_handle INTEGER NOT NULL DEFAULT 0, stage_handle INTEGER NOT NULL DEFAULT 0,
submitted_at TIMESTAMPTZ NOT NULL DEFAULT NOW() submitted_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
); );
COMMIT;