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: resource table migration (#369)

boojack0ccfd0c74344
diff --git a/store/db/migration/prod/0.7/00__remove_fk.sql b/store/db/migration/prod/0.7/00__remove_fk.sql
index 13d8ce091..b4e301df8 100644
--- a/store/db/migration/prod/0.7/00__remove_fk.sql
+++ b/store/db/migration/prod/0.7/00__remove_fk.sql
@@ -93,7 +93,23 @@ CREATE TABLE resource (
size INTEGER NOT NULL DEFAULT 0
);
-INSERT INTO resource SELECT * FROM _resource_old;
+INSERT INTO resource (
+ id, creator_id, created_ts, updated_ts,
+ filename, blob, external_link, type,
+ size
+)
+SELECT
+ id,
+ creator_id,
+ created_ts,
+ updated_ts,
+ filename,
+ blob,
+ external_link,
+ type,
+ size
+FROM
+ _resource_old;
DROP TABLE IF EXISTS _resource_old;