first commit
Some checks failed
Backend Tests / Static Checks (push) Has been cancelled
Backend Tests / Tests (other) (push) Has been cancelled
Backend Tests / Tests (plugin) (push) Has been cancelled
Backend Tests / Tests (server) (push) Has been cancelled
Backend Tests / Tests (store) (push) Has been cancelled
Build Canary Image / build-frontend (push) Has been cancelled
Build Canary Image / build-push (linux/amd64) (push) Has been cancelled
Build Canary Image / build-push (linux/arm64) (push) Has been cancelled
Build Canary Image / merge (push) Has been cancelled
Frontend Tests / Lint (push) Has been cancelled
Frontend Tests / Build (push) Has been cancelled
Proto Linter / Lint Protos (push) Has been cancelled
Some checks failed
Backend Tests / Static Checks (push) Has been cancelled
Backend Tests / Tests (other) (push) Has been cancelled
Backend Tests / Tests (plugin) (push) Has been cancelled
Backend Tests / Tests (server) (push) Has been cancelled
Backend Tests / Tests (store) (push) Has been cancelled
Build Canary Image / build-frontend (push) Has been cancelled
Build Canary Image / build-push (linux/amd64) (push) Has been cancelled
Build Canary Image / build-push (linux/arm64) (push) Has been cancelled
Build Canary Image / merge (push) Has been cancelled
Frontend Tests / Lint (push) Has been cancelled
Frontend Tests / Build (push) Has been cancelled
Proto Linter / Lint Protos (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
ALTER TABLE `resource` RENAME TO `attachment`;
|
||||
DROP INDEX IF EXISTS `idx_resource_creator_id`;
|
||||
CREATE INDEX `idx_attachment_creator_id` ON `attachment` (`creator_id`);
|
||||
DROP INDEX IF EXISTS `idx_resource_memo_id`;
|
||||
CREATE INDEX `idx_attachment_memo_id` ON `attachment` (`memo_id`);
|
||||
1
store/migration/sqlite/0.26/01__drop_memo_organizer.sql
Normal file
1
store/migration/sqlite/0.26/01__drop_memo_organizer.sql
Normal file
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS memo_organizer;
|
||||
4
store/migration/sqlite/0.26/02__drop_indexes.sql
Normal file
4
store/migration/sqlite/0.26/02__drop_indexes.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
DROP INDEX IF EXISTS idx_user_username;
|
||||
DROP INDEX IF EXISTS idx_memo_creator_id;
|
||||
DROP INDEX IF EXISTS idx_attachment_creator_id;
|
||||
DROP INDEX IF EXISTS idx_attachment_memo_id;
|
||||
24
store/migration/sqlite/0.26/03__alter_user_role.sql
Normal file
24
store/migration/sqlite/0.26/03__alter_user_role.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
ALTER TABLE user RENAME TO user_old;
|
||||
|
||||
CREATE TABLE user (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
updated_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')),
|
||||
row_status TEXT NOT NULL CHECK (row_status IN ('NORMAL', 'ARCHIVED')) DEFAULT 'NORMAL',
|
||||
username TEXT NOT NULL UNIQUE,
|
||||
role TEXT NOT NULL DEFAULT 'USER',
|
||||
email TEXT NOT NULL DEFAULT '',
|
||||
nickname TEXT NOT NULL DEFAULT '',
|
||||
password_hash TEXT NOT NULL,
|
||||
avatar_url TEXT NOT NULL DEFAULT '',
|
||||
description TEXT NOT NULL DEFAULT ''
|
||||
);
|
||||
|
||||
INSERT INTO user (
|
||||
id, created_ts, updated_ts, row_status, username, role, email, nickname, password_hash, avatar_url, description
|
||||
)
|
||||
SELECT
|
||||
id, created_ts, updated_ts, row_status, username, role, email, nickname, password_hash, avatar_url, description
|
||||
FROM user_old;
|
||||
|
||||
DROP TABLE user_old;
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE user SET role = 'ADMIN' WHERE role = 'HOST';
|
||||
@@ -0,0 +1,5 @@
|
||||
-- Set storage type to DATABASE for existing instances that have no storage setting configured.
|
||||
-- This preserves backward-compatible behavior before the default was changed to LOCAL.
|
||||
INSERT INTO system_setting (name, value, description)
|
||||
SELECT 'STORAGE', '{"storageType":"DATABASE"}', ''
|
||||
WHERE NOT EXISTS (SELECT 1 FROM system_setting WHERE name = 'STORAGE');
|
||||
Reference in New Issue
Block a user