mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 07:12:19 +00:00
fix: db migration for multiple callback urls
This commit is contained in:
@@ -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;
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user