fix: resource table migration (#369)

* fix: resource table migration

* chore: update
This commit is contained in:
boojack 2022-10-29 19:47:31 +08:00 committed by GitHub
parent 0ea1733acc
commit 0ccfd0c743
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,23 @@ CREATE TABLE resource (
size INTEGER NOT NULL DEFAULT 0 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; DROP TABLE IF EXISTS _resource_old;