lotus/lib/harmony/harmonydb/sql/20230712.sql

46 lines
1.3 KiB
MySQL
Raw Normal View History

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-12-01 22:12:53 +00:00
alter table sector_location
alter column read_refs set not null;
2023-08-09 01:19:48 +00:00
2023-12-01 22:12:53 +00:00
alter table sector_location
alter column read_refs set default 0;
2023-08-16 19:36:00 +00:00
create table storage_path
2023-08-09 01:19:48 +00:00
(
"storage_id" varchar not null
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
);