mirror of
https://github.com/nikdoof/pocket-id.git
synced 2025-12-14 15:22:18 +00:00
fix: db migration for multiple callback urls
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
create table oidc_clients
|
create table oidc_clients
|
||||||
(
|
(
|
||||||
id TEXT not null
|
id TEXT not null primary key,
|
||||||
primary key,
|
|
||||||
created_at DATETIME,
|
created_at DATETIME,
|
||||||
name TEXT,
|
name TEXT,
|
||||||
secret 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)
|
insert into oidc_clients(id, created_at, name, secret, callback_url, image_type, created_by_id)
|
||||||
select
|
select id,
|
||||||
id,
|
created_at,
|
||||||
created_at,
|
name,
|
||||||
name,
|
secret,
|
||||||
secret,
|
json_extract(callback_urls, '$[0]'),
|
||||||
json_extract(callback_urls, '$[0]'),
|
image_type,
|
||||||
image_type,
|
created_by_id
|
||||||
created_by_id
|
|
||||||
from oidc_clients_dg_tmp;
|
from oidc_clients_dg_tmp;
|
||||||
|
|
||||||
drop table oidc_clients_dg_tmp;
|
drop table oidc_clients_dg_tmp;
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
create table oidc_clients_dg_tmp
|
create table oidc_clients_dg_tmp
|
||||||
(
|
(
|
||||||
id TEXT not null
|
id TEXT not null primary key,
|
||||||
primary key,
|
|
||||||
created_at DATETIME,
|
created_at DATETIME,
|
||||||
name TEXT,
|
name TEXT,
|
||||||
secret TEXT,
|
secret TEXT,
|
||||||
@@ -16,7 +15,7 @@ select id,
|
|||||||
created_at,
|
created_at,
|
||||||
name,
|
name,
|
||||||
secret,
|
secret,
|
||||||
CAST(json_group_array(json_quote(callback_url)) AS BLOB),
|
CAST('["' || callback_url || '"]' AS BLOB),
|
||||||
image_type,
|
image_type,
|
||||||
created_by_id
|
created_by_id
|
||||||
from oidc_clients;
|
from oidc_clients;
|
||||||
|
|||||||
Reference in New Issue
Block a user