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.

fix: attachment table name

Johnny14fb38f37560
diff --git a/store/migration/mysql/LATEST.sql b/store/migration/mysql/LATEST.sql
index adc86a9eb..a11108ade 100644
--- a/store/migration/mysql/LATEST.sql
+++ b/store/migration/mysql/LATEST.sql
@@ -58,8 +58,8 @@ CREATE TABLE `memo_relation` (
UNIQUE(`memo_id`,`related_memo_id`,`type`)
);
--- resource
-CREATE TABLE `resource` (
+-- attachment
+CREATE TABLE `attachment` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
`uid` VARCHAR(256) NOT NULL UNIQUE,
`creator_id` INT NOT NULL,
diff --git a/store/migration/postgres/LATEST.sql b/store/migration/postgres/LATEST.sql
index b5b70a9ec..6f04c4fe7 100644
--- a/store/migration/postgres/LATEST.sql
+++ b/store/migration/postgres/LATEST.sql
@@ -58,8 +58,8 @@ CREATE TABLE memo_relation (
UNIQUE(memo_id, related_memo_id, type)
);
--- resource
-CREATE TABLE resource (
+-- attachment
+CREATE TABLE attachment (
id SERIAL PRIMARY KEY,
uid TEXT NOT NULL UNIQUE,
creator_id INTEGER NOT NULL,
diff --git a/store/migration/sqlite/LATEST.sql b/store/migration/sqlite/LATEST.sql
index 6a36e9338..7aceda3ea 100644
--- a/store/migration/sqlite/LATEST.sql
+++ b/store/migration/sqlite/LATEST.sql
@@ -63,8 +63,8 @@ CREATE TABLE memo_relation (
UNIQUE(memo_id, related_memo_id, type)
);
--- resource
-CREATE TABLE resource (
+-- attachment
+CREATE TABLE attachment (
id INTEGER PRIMARY KEY AUTOINCREMENT,
uid TEXT NOT NULL UNIQUE,
creator_id INTEGER NOT NULL,
@@ -80,9 +80,9 @@ CREATE TABLE resource (
payload TEXT NOT NULL DEFAULT '{}'
);
-CREATE INDEX idx_resource_creator_id ON resource (creator_id);
+CREATE INDEX idx_attachment_creator_id ON attachment (creator_id);
-CREATE INDEX idx_resource_memo_id ON resource (memo_id);
+CREATE INDEX idx_attachment_memo_id ON attachment (memo_id);
-- activity
CREATE TABLE activity (