diff --git a/db/db.go b/db/db.go index b13b72fbb..3dfaf3fb8 100644 --- a/db/db.go +++ b/db/db.go @@ -5,8 +5,8 @@ package db import "embed" -//go:embed migrations-blockstore/*.sql -var BlockstoreMigrationFS embed.FS +//go:embed migrations-filestore/*.sql +var FilestoreMigrationFS embed.FS //go:embed migrations-wstore/*.sql var WStoreMigrationFS embed.FS diff --git a/db/migrations-blockstore/000001_init.down.sql b/db/migrations-blockstore/000001_init.down.sql deleted file mode 100644 index 1cb72b3fd..000000000 --- a/db/migrations-blockstore/000001_init.down.sql +++ /dev/null @@ -1,3 +0,0 @@ -DROP TABLE block_file; - -DROP TABLE block_data; diff --git a/db/migrations-filestore/000001_init.down.sql b/db/migrations-filestore/000001_init.down.sql new file mode 100644 index 000000000..534c404e7 --- /dev/null +++ b/db/migrations-filestore/000001_init.down.sql @@ -0,0 +1,3 @@ +DROP TABLE db_wave_file; + +DROP TABLE db_file_data; diff --git a/db/migrations-blockstore/000001_init.up.sql b/db/migrations-filestore/000001_init.up.sql similarity index 56% rename from db/migrations-blockstore/000001_init.up.sql rename to db/migrations-filestore/000001_init.up.sql index fce5a6986..af9fcf8c0 100644 --- a/db/migrations-blockstore/000001_init.up.sql +++ b/db/migrations-filestore/000001_init.up.sql @@ -1,19 +1,19 @@ -CREATE TABLE db_block_file ( - blockid varchar(36) NOT NULL, +CREATE TABLE db_wave_file ( + zoneid varchar(36) NOT NULL, name varchar(200) NOT NULL, size bigint NOT NULL, createdts bigint NOT NULL, modts bigint NOT NULL, opts json NOT NULL, meta json NOT NULL, - PRIMARY KEY (blockid, name) + PRIMARY KEY (zoneid, name) ); -CREATE TABLE db_block_data ( - blockid varchar(36) NOT NULL, +CREATE TABLE db_file_data ( + zoneid varchar(36) NOT NULL, name varchar(200) NOT NULL, partidx int NOT NULL, data blob NOT NULL, - PRIMARY KEY(blockid, name, partidx) + PRIMARY KEY(zoneid, name, partidx) ); diff --git a/frontend/app/view/preview.tsx b/frontend/app/view/preview.tsx index 90693287b..dacfee4ea 100644 --- a/frontend/app/view/preview.tsx +++ b/frontend/app/view/preview.tsx @@ -59,6 +59,13 @@ function MarkdownPreview({ contentAtom }: { contentAtom: jotai.Atom +