init commit
This commit is contained in:
6
store/migration/sqlite/0.12/00__user_setting.sql
Normal file
6
store/migration/sqlite/0.12/00__user_setting.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
UPDATE
|
||||
user_setting
|
||||
SET
|
||||
key = 'memo-visibility'
|
||||
WHERE
|
||||
key = 'memoVisibility';
|
||||
69
store/migration/sqlite/0.12/01__system_setting.sql
Normal file
69
store/migration/sqlite/0.12/01__system_setting.sql
Normal file
@@ -0,0 +1,69 @@
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'server-id'
|
||||
WHERE
|
||||
name = 'serverId';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'secret-session'
|
||||
WHERE
|
||||
name = 'secretSessionName';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'allow-signup'
|
||||
WHERE
|
||||
name = 'allowSignUp';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'disable-public-memos'
|
||||
WHERE
|
||||
name = 'disablePublicMemos';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'additional-style'
|
||||
WHERE
|
||||
name = 'additionalStyle';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'additional-script'
|
||||
WHERE
|
||||
name = 'additionalScript';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'customized-profile'
|
||||
WHERE
|
||||
name = 'customizedProfile';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'storage-service-id'
|
||||
WHERE
|
||||
name = 'storageServiceId';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'local-storage-path'
|
||||
WHERE
|
||||
name = 'localStoragePath';
|
||||
|
||||
UPDATE
|
||||
system_setting
|
||||
SET
|
||||
name = 'openai-config'
|
||||
WHERE
|
||||
name = 'openAIConfig';
|
||||
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE
|
||||
resource
|
||||
ADD
|
||||
COLUMN internal_path TEXT NOT NULL DEFAULT '';
|
||||
18
store/migration/sqlite/0.12/04__resource_public_id.sql
Normal file
18
store/migration/sqlite/0.12/04__resource_public_id.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
ALTER TABLE
|
||||
resource
|
||||
ADD
|
||||
COLUMN public_id TEXT NOT NULL DEFAULT '';
|
||||
|
||||
CREATE UNIQUE INDEX resource_id_public_id_unique_index ON resource (id, public_id);
|
||||
|
||||
UPDATE
|
||||
resource
|
||||
SET
|
||||
public_id = printf (
|
||||
'%s-%s-%s-%s-%s',
|
||||
lower(hex(randomblob(4))),
|
||||
lower(hex(randomblob(2))),
|
||||
lower(hex(randomblob(2))),
|
||||
lower(hex(randomblob(2))),
|
||||
lower(hex(randomblob(6)))
|
||||
);
|
||||
Reference in New Issue
Block a user