blockstore integration (#650)

* blockstore migration
* use a testdb for tests,
* cut down test sizes so they run a bit faster
* test init/cleanup code improvements
This commit is contained in:
Mike Sawka
2024-05-06 10:24:34 -07:00
committed by GitHub
parent 46b9c22f10
commit d6b82e3792
10 changed files with 246 additions and 136 deletions
@@ -0,0 +1 @@
-- nothing
@@ -0,0 +1,19 @@
CREATE TABLE block_file (
blockid varchar(36) NOT NULL,
name varchar(200) NOT NULL,
maxsize bigint NOT NULL,
circular boolean NOT NULL,
size bigint NOT NULL,
createdts bigint NOT NULL,
modts bigint NOT NULL,
meta json NOT NULL,
PRIMARY KEY (blockid, name)
);
CREATE TABLE block_data (
blockid varchar(36) NOT NULL,
name varchar(200) NOT NULL,
partidx int NOT NULL,
data blob NOT NULL,
PRIMARY KEY(blockid, name, partidx)
);
+3
View File
@@ -10,3 +10,6 @@ import "embed"
//go:embed migrations/*.sql
var MigrationFS embed.FS
//go:embed blockstore-migrations/*.sql
var BlockstoreMigrationFS embed.FS