2023-08-17 17:23:03 +00:00
|
|
|
create table sector_location
|
2023-08-09 01:19:48 +00:00
|
|
|
(
|
2023-08-16 19:36:00 +00:00
|
|
|
miner_id bigint not null,
|
|
|
|
sector_num bigint not null,
|
|
|
|
sector_filetype int not null,
|
|
|
|
storage_id varchar not null,
|
|
|
|
is_primary bool,
|
|
|
|
read_ts timestamp(6),
|
|
|
|
read_refs int,
|
|
|
|
write_ts timestamp(6),
|
|
|
|
write_lock_owner varchar,
|
|
|
|
constraint sectorlocation_pk
|
|
|
|
primary key (miner_id, sector_num, sector_filetype, storage_id)
|
2023-08-09 01:19:48 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
2023-08-16 19:36:00 +00:00
|
|
|
|
2023-08-17 17:23:03 +00:00
|
|
|
create table storage_path
|
2023-08-09 01:19:48 +00:00
|
|
|
(
|
|
|
|
"storage_id" varchar not null
|
2023-08-17 17:23:03 +00:00
|
|
|
constraint "storage_path_pkey"
|
2023-08-09 01:19:48 +00:00
|
|
|
primary key,
|
2023-08-10 22:35:35 +00:00
|
|
|
"urls" varchar, -- comma separated list of urls
|
|
|
|
"weight" bigint,
|
|
|
|
"max_storage" bigint,
|
2023-08-09 01:19:48 +00:00
|
|
|
"can_seal" bool,
|
|
|
|
"can_store" bool,
|
2023-08-10 22:35:35 +00:00
|
|
|
"groups" varchar, -- comma separated list of group names
|
|
|
|
"allow_to" varchar, -- comma separated list of allowed groups
|
|
|
|
"allow_types" varchar, -- comma separated list of allowed file types
|
|
|
|
"deny_types" varchar, -- comma separated list of denied file types
|
2023-08-09 01:19:48 +00:00
|
|
|
|
2023-08-10 22:35:35 +00:00
|
|
|
"capacity" bigint,
|
|
|
|
"available" bigint,
|
|
|
|
"fs_available" bigint,
|
|
|
|
"reserved" bigint,
|
|
|
|
"used" bigint,
|
2023-08-09 01:19:48 +00:00
|
|
|
"last_heartbeat" timestamp(6),
|
|
|
|
"heartbeat_err" varchar
|
|
|
|
);
|
|
|
|
|