fix: wrap user rebuild migration
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
-- +goose Up
|
||||
PRAGMA foreign_keys = OFF;
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE user_new (
|
||||
id TEXT PRIMARY KEY,
|
||||
username TEXT NOT NULL UNIQUE,
|
||||
@@ -16,6 +18,8 @@ DROP TABLE user;
|
||||
|
||||
ALTER TABLE user_new RENAME TO user;
|
||||
|
||||
COMMIT;
|
||||
|
||||
PRAGMA foreign_keys = ON;
|
||||
|
||||
-- +goose Down
|
||||
|
||||
Reference in New Issue
Block a user