From 71ee299de7e14d55da97540579e34ca3e55970a1 Mon Sep 17 00:00:00 2001 From: Steven Date: Wed, 27 Sep 2023 07:28:17 +0800 Subject: [PATCH] chore: drop shortcut --- server/version/version.go | 2 +- store/db/migration/dev/LATEST__SCHEMA.sql | 11 ----------- .../prod/0.16/00__add_memo_id_to_resource.sql | 4 ++-- .../migration/prod/0.16/01__drop_shortcut_table.sql | 1 + 4 files changed, 4 insertions(+), 14 deletions(-) create mode 100644 store/db/migration/prod/0.16/01__drop_shortcut_table.sql diff --git a/server/version/version.go b/server/version/version.go index 9b3833b1..82c89b85 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -12,7 +12,7 @@ import ( var Version = "0.15.2" // DevVersion is the service current development version. -var DevVersion = "0.15.2" +var DevVersion = "0.16.0" func GetCurrentVersion(mode string) string { if mode == "dev" || mode == "demo" { diff --git a/store/db/migration/dev/LATEST__SCHEMA.sql b/store/db/migration/dev/LATEST__SCHEMA.sql index a3a909f1..029bc40e 100644 --- a/store/db/migration/dev/LATEST__SCHEMA.sql +++ b/store/db/migration/dev/LATEST__SCHEMA.sql @@ -59,17 +59,6 @@ CREATE TABLE memo_organizer ( UNIQUE(memo_id, user_id) ); --- shortcut -CREATE TABLE shortcut ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - creator_id INTEGER NOT NULL, - 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', - title TEXT NOT NULL DEFAULT '', - payload TEXT NOT NULL DEFAULT '{}' -); - -- resource CREATE TABLE resource ( id INTEGER PRIMARY KEY AUTOINCREMENT, diff --git a/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql b/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql index a4d780bc..5af8ad63 100644 --- a/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql +++ b/store/db/migration/prod/0.16/00__add_memo_id_to_resource.sql @@ -8,6 +8,6 @@ SET memo_id = ( LIMIT 1 ); -DROP TABLE memo_resource; - CREATE INDEX idx_resource_memo_id ON resource (memo_id); + +DROP TABLE IF EXISTS memo_resource; diff --git a/store/db/migration/prod/0.16/01__drop_shortcut_table.sql b/store/db/migration/prod/0.16/01__drop_shortcut_table.sql new file mode 100644 index 00000000..d830a5b4 --- /dev/null +++ b/store/db/migration/prod/0.16/01__drop_shortcut_table.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS shortcut;