fix: db migration for multiple callback urls

This commit is contained in:
Elias Schneider
2024-08-24 01:12:33 +02:00
parent e45b0b3ed0
commit 552d7ccfa5
2 changed files with 10 additions and 13 deletions

View File

@@ -1,7 +1,6 @@
create table oidc_clients
(
id TEXT not null
primary key,
id TEXT not null primary key,
created_at DATETIME,
name TEXT,
secret TEXT,
@@ -12,14 +11,13 @@ create table oidc_clients
);
insert into oidc_clients(id, created_at, name, secret, callback_url, image_type, created_by_id)
select
id,
created_at,
name,
secret,
json_extract(callback_urls, '$[0]'),
image_type,
created_by_id
select id,
created_at,
name,
secret,
json_extract(callback_urls, '$[0]'),
image_type,
created_by_id
from oidc_clients_dg_tmp;
drop table oidc_clients_dg_tmp;

View File

@@ -1,7 +1,6 @@
create table oidc_clients_dg_tmp
(
id TEXT not null
primary key,
id TEXT not null primary key,
created_at DATETIME,
name TEXT,
secret TEXT,
@@ -16,7 +15,7 @@ select id,
created_at,
name,
secret,
CAST(json_group_array(json_quote(callback_url)) AS BLOB),
CAST('["' || callback_url || '"]' AS BLOB),
image_type,
created_by_id
from oidc_clients;