mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-25 00:54:05 +01:00
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:
@@ -1,5 +1,3 @@
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tournaments (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name VARCHAR(64) NOT NULL,
|
||||
@@ -44,5 +42,3 @@ CREATE TABLE IF NOT EXISTS tournament_results (
|
||||
stage_handle INTEGER NOT NULL DEFAULT 0,
|
||||
submitted_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user