mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-05 17:29:04 +02:00
refactor: manage instance ID in the KV table (#1579)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
PRAGMA foreign_keys=OFF;
|
||||
BEGIN;
|
||||
|
||||
-- Move the instance ID back into the standalone app config table
|
||||
INSERT INTO app_config_variables ("key", "value")
|
||||
SELECT 'instanceId', "value"
|
||||
FROM kv
|
||||
WHERE "key" = 'instance_id' AND "value" IS NOT NULL
|
||||
ON CONFLICT ("key") DO NOTHING;
|
||||
|
||||
DELETE FROM kv WHERE "key" = 'instance_id';
|
||||
|
||||
COMMIT;
|
||||
PRAGMA foreign_keys=ON;
|
||||
@@ -0,0 +1,14 @@
|
||||
PRAGMA foreign_keys=OFF;
|
||||
BEGIN;
|
||||
|
||||
-- Move the instance ID out of the standalone app config table and into the "kv" table
|
||||
INSERT INTO kv ("key", "value")
|
||||
SELECT 'instance_id', "value"
|
||||
FROM app_config_variables
|
||||
WHERE "key" = 'instanceId'
|
||||
ON CONFLICT ("key") DO NOTHING;
|
||||
|
||||
DELETE FROM app_config_variables WHERE "key" = 'instanceId';
|
||||
|
||||
COMMIT;
|
||||
PRAGMA foreign_keys=ON;
|
||||
Reference in New Issue
Block a user