mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Block store (#578)
Contains the implementation of the block store In this pr is a simple way to send and receive data through a database I have implemented the base functionality as well as quite a few tests to make sure that everything works There are a few methods that have yet to be implemented, but theoretically they should be implemented as calls to the other functions, ie append should just be a call to WriteAt This doesn't affect anything yet so it can safely be merged whenever. I don't want this pr to stagnate like file view, so I'm happy to write multiple prs for this
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
CREATE TABLE schema_migrations (version uint64,dirty bool);
|
||||
CREATE UNIQUE INDEX version_unique ON schema_migrations (version);
|
||||
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)
|
||||
);
|
||||
Reference in New Issue
Block a user