diff --git a/cmd/curio/guidedsetup/shared.go b/cmd/curio/guidedsetup/shared.go index 1c8eab7fbf8..1ef394f31ec 100644 --- a/cmd/curio/guidedsetup/shared.go +++ b/cmd/curio/guidedsetup/shared.go @@ -390,7 +390,7 @@ func MigrateSectors(ctx context.Context, maddr address.Address, mmeta datastore. // Splitting the SQL statement for readability and adding new fields _, err = db.Exec(ctx, ` - INSERT INTO sector_meta_pieces ( + INSERT INTO sectors_meta_pieces ( sp_id, sector_num, piece_num, piece_cid, piece_size, requested_keep_data, raw_data_size, start_epoch, orig_end_epoch, f05_deal_id, ddo_pam diff --git a/curiosrc/seal/task_submit_commit.go b/curiosrc/seal/task_submit_commit.go index cb9c8c65440..123608afc6b 100644 --- a/curiosrc/seal/task_submit_commit.go +++ b/curiosrc/seal/task_submit_commit.go @@ -211,7 +211,7 @@ func (s *SubmitCommitTask) transferFinalizedSectorData(ctx context.Context, spID // Execute the query for piece metadata if _, err := s.db.Exec(ctx, ` - INSERT INTO sector_meta_pieces ( + INSERT INTO sectors_meta_pieces ( sp_id, sector_num, piece_num, diff --git a/lib/harmony/harmonydb/sql/20240425-sector_meta.sql b/lib/harmony/harmonydb/sql/20240425-sector_meta.sql index 76feab58677..4a83e0f95e4 100644 --- a/lib/harmony/harmonydb/sql/20240425-sector_meta.sql +++ b/lib/harmony/harmonydb/sql/20240425-sector_meta.sql @@ -22,7 +22,7 @@ CREATE TABLE sectors_meta ( PRIMARY KEY (sp_id, sector_num) ); -CREATE TABLE sector_meta_pieces ( +CREATE TABLE sectors_meta_pieces ( sp_id BIGINT NOT NULL, sector_num BIGINT NOT NULL, piece_num BIGINT NOT NULL,