From 14fb38f37560541bf2719647e7e8b1468937f8ef Mon Sep 17 00:00:00 2001 From: Johnny Date: Wed, 7 Jan 2026 20:44:21 +0800 Subject: [PATCH] fix: attachment table name --- store/migration/mysql/LATEST.sql | 4 ++-- store/migration/postgres/LATEST.sql | 4 ++-- store/migration/sqlite/LATEST.sql | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) 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 (