Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add table eligible_deals #485

Merged
merged 5 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions migrations/062.do.eligible-deals.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE eligible_deals (
miner_id TEXT NOT NULL,
client_id TEXT NOT NULL,
piece_cid TEXT NOT NULL,
piece_size BIGINT NOT NULL,
payload_cid TEXT NOT NULL,
expires_at TIMESTAMPTZ NOT NULL,

sourced_from_f05_state BOOLEAN NOT NULL DEFAULT TRUE,

PRIMARY KEY (miner_id, client_id, piece_cid, piece_size)
);

CREATE INDEX eligible_deals_miner_id ON eligible_deals (miner_id);
CREATE INDEX eligible_deals_client_id ON eligible_deals (client_id);
Loading
Loading