chore: wrap last two migrations into transaction

This commit is contained in:
Elias Schneider
2026-06-22 18:44:48 +02:00
parent 8158452b37
commit cf9a31986f
4 changed files with 26 additions and 0 deletions
@@ -1,3 +1,9 @@
PRAGMA foreign_keys= OFF;
BEGIN;
DROP TABLE IF EXISTS oidc_pushed_authorization_requests;
ALTER TABLE oidc_clients DROP COLUMN requires_pushed_authorization_requests;
COMMIT;
PRAGMA foreign_keys= ON;
@@ -1,3 +1,6 @@
PRAGMA foreign_keys= OFF;
BEGIN;
CREATE TABLE oidc_pushed_authorization_requests (
id TEXT NOT NULL PRIMARY KEY,
created_at INTEGER NOT NULL,
@@ -10,3 +13,6 @@ CREATE TABLE oidc_pushed_authorization_requests (
CREATE INDEX idx_oidc_par_expires_at ON oidc_pushed_authorization_requests (expires_at);
ALTER TABLE oidc_clients ADD COLUMN requires_pushed_authorization_requests BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;
PRAGMA foreign_keys= ON;
@@ -1,3 +1,6 @@
PRAGMA foreign_keys= OFF;
BEGIN;
CREATE TABLE oidc_authorization_codes
(
id TEXT NOT NULL PRIMARY KEY,
@@ -93,3 +96,7 @@ DROP INDEX IF EXISTS idx_oauth2_sessions_expires_at;
DROP INDEX IF EXISTS idx_oauth2_sessions_kind_request;
DROP INDEX IF EXISTS idx_oauth2_sessions_kind_key;
DROP TABLE IF EXISTS oauth2_sessions;
COMMIT;
PRAGMA foreign_keys= ON;
@@ -1,3 +1,6 @@
PRAGMA foreign_keys= OFF;
BEGIN;
CREATE TABLE oauth2_sessions (
id TEXT NOT NULL PRIMARY KEY,
created_at INTEGER NOT NULL,
@@ -78,3 +81,7 @@ DROP TABLE IF EXISTS oidc_pushed_authorization_requests;
DROP TABLE IF EXISTS oidc_device_codes;
DROP TABLE IF EXISTS oidc_refresh_tokens;
DROP TABLE IF EXISTS oidc_authorization_codes;
COMMIT;
PRAGMA foreign_keys= ON;