WIP: v1.0.0
This commit is contained in:
parent
cc84c6ac37
commit
a811f7750a
4 changed files with 71 additions and 17 deletions
|
@ -1,8 +1,8 @@
|
|||
create table objects
|
||||
(
|
||||
hash text not null,
|
||||
hash text not null, -- BLAKE3, 265 bits, base 16
|
||||
size integer not null, -- in bytes
|
||||
media_type text not null,
|
||||
media_type text not null, -- RFC 6838 format
|
||||
creation_date text not null, -- RFC 3339 format
|
||||
primary key (hash)
|
||||
) without rowid, strict;
|
||||
|
@ -16,13 +16,19 @@ create table object_replicas
|
|||
foreign key (hash) references objects (hash) on delete restrict on update restrict
|
||||
) strict;
|
||||
|
||||
create table uploads
|
||||
create table ongoing_uploads
|
||||
(
|
||||
id text not null,
|
||||
current_size integer not null, -- in bytes
|
||||
total_size integer, -- in bytes, or null if the upload was not started yet
|
||||
primary key (id)
|
||||
) without rowid, strict;
|
||||
|
||||
hash text,
|
||||
primary key (id),
|
||||
foreign key (hash) references objects (hash) on delete restrict on update restrict
|
||||
)
|
||||
create table finished_uploads
|
||||
(
|
||||
id text not null,
|
||||
size integer not null, -- in bytes
|
||||
hash text not null, -- BLAKE3, 265 bits, base 16
|
||||
media_type text not null, -- RFC 6838 format
|
||||
primary key (id)
|
||||
) without rowid, strict;
|
Loading…
Add table
Add a link
Reference in a new issue