From 0ccfd0c74344c38d5ebabb9b90e37d314f599072 Mon Sep 17 00:00:00 2001 From: boojack Date: Sat, 29 Oct 2022 19:47:31 +0800 Subject: [PATCH] fix: resource table migration (#369) * fix: resource table migration * chore: update --- store/db/migration/prod/0.7/00__remove_fk.sql | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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 13d8ce09..b4e301df 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;