Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: drop redundant indexes in sqlite migration

Johnnyaf6a0726d84c
diff --git a/store/migration/sqlite/0.26/02__drop_indexes.sql b/store/migration/sqlite/0.26/02__drop_indexes.sql
new file mode 100644
index 000000000..2923ba4fa
--- /dev/null
+++ b/store/migration/sqlite/0.26/02__drop_indexes.sql
@@ -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;
diff --git a/store/migration/sqlite/LATEST.sql b/store/migration/sqlite/LATEST.sql
index 590027714..130b0404f 100644
--- a/store/migration/sqlite/LATEST.sql
+++ b/store/migration/sqlite/LATEST.sql
@@ -21,8 +21,6 @@ CREATE TABLE user (
description TEXT NOT NULL DEFAULT ''
);
-CREATE INDEX idx_user_username ON user (username);
-
-- user_setting
CREATE TABLE user_setting (
user_id INTEGER NOT NULL,
@@ -45,8 +43,6 @@ CREATE TABLE memo (
payload TEXT NOT NULL DEFAULT '{}'
);
-CREATE INDEX idx_memo_creator_id ON memo (creator_id);
-
-- memo_relation
CREATE TABLE memo_relation (
memo_id INTEGER NOT NULL,
@@ -72,10 +68,6 @@ CREATE TABLE attachment (
payload TEXT NOT NULL DEFAULT '{}'
);
-CREATE INDEX idx_attachment_creator_id ON attachment (creator_id);
-
-CREATE INDEX idx_attachment_memo_id ON attachment (memo_id);
-
-- activity
CREATE TABLE activity (
id INTEGER PRIMARY KEY AUTOINCREMENT,