fix: remove explicit transaction from migration 012
Goose wraps each migration in a transaction automatically. Explicit BEGIN TRANSACTION/COMMIT caused a nested transaction error in SQLite.
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
-- +goose Up
|
-- +goose Up
|
||||||
PRAGMA foreign_keys = OFF;
|
PRAGMA foreign_keys = OFF;
|
||||||
|
|
||||||
BEGIN TRANSACTION;
|
|
||||||
|
|
||||||
CREATE TABLE user_new (
|
CREATE TABLE user_new (
|
||||||
id TEXT PRIMARY KEY,
|
id TEXT PRIMARY KEY,
|
||||||
username TEXT NOT NULL UNIQUE,
|
username TEXT NOT NULL UNIQUE,
|
||||||
@@ -18,8 +16,6 @@ DROP TABLE user;
|
|||||||
|
|
||||||
ALTER TABLE user_new RENAME TO user;
|
ALTER TABLE user_new RENAME TO user;
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
PRAGMA foreign_keys = ON;
|
PRAGMA foreign_keys = ON;
|
||||||
|
|
||||||
-- +goose Down
|
-- +goose Down
|
||||||
|
|||||||
Reference in New Issue
Block a user