lotus/lib/harmony/harmonydb/sql/20230823.sql

36 lines
1.3 KiB
MySQL
Raw Normal View History

create table wdpost_partition_tasks
2023-08-30 16:34:11 +00:00
(
task_id bigint not null
constraint wdpost_partition_tasks_pk
2023-10-05 15:52:22 +00:00
primary key,
sp_id bigint not null,
proving_period_start bigint not null,
deadline_index bigint not null,
partition_index bigint not null,
constraint wdpost_partition_tasks_identity_key
unique (sp_id, proving_period_start, deadline_index, partition_index)
2023-08-30 16:34:11 +00:00
);
comment on column wdpost_partition_tasks.task_id is 'harmonytask task ID';
comment on column wdpost_partition_tasks.sp_id is 'storage provider ID';
comment on column wdpost_partition_tasks.proving_period_start is 'proving period start';
comment on column wdpost_partition_tasks.deadline_index is 'deadline index within the proving period';
comment on column wdpost_partition_tasks.partition_index is 'partition index within the deadline';
2023-10-12 17:35:10 +00:00
create table wdpost_proofs
(
2023-11-04 11:32:27 +00:00
sp_id bigint not null,
proving_period_start bigint not null,
deadline bigint not null,
partition bigint not null,
submit_at_epoch bigint not null,
submit_by_epoch bigint not null,
proof_message bytea,
2023-11-03 20:53:15 +00:00
2023-11-04 11:32:27 +00:00
submit_task_id bigint,
message_cid text,
2023-11-03 20:53:15 +00:00
constraint wdpost_proofs_identity_key
2023-11-04 11:32:27 +00:00
unique (sp_id, proving_period_start, deadline, partition)
2023-10-12 17:35:10 +00:00
);