Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
47 changes: 30 additions & 17 deletions db/create.sql
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
CREATE TABLE DealLogs (
DealID varchar(128),
CREATE TABLE IF NOT EXISTS DealLogs (
DealID TEXT,
CreatedAt DateTime,
LogText varchar(1024)
LogTEXT TEXT
);

CREATE TABLE Deals (
ID varchar(128),
CREATE TABLE IF NOT EXISTS Deals (
ID TEXT,
CreatedAt DateTime,
PieceCID varchar(255),
PieceSize int,
Address varchar(255),
Client varchar(255),
Provider varchar(255),
Label varchar(255),
StartEpoch int,
EndEpoch int,
StoragePricePerEpoch int,
ProviderCollateral int,
ClientCollateral int,
State varchar(32),
DealProposalSignature BLOB,
PieceCID TEXT,
PieceSize INT,
VerifiedDeal BOOL,
ClientAddress TEXT,
ProviderAddress TEXT,
Label TEXT,
StartEpoch INT,
EndEpoch INT,
StoragePricePerEpoch BLOB,
ProviderCollateral BLOB,
ClientCollateral BLOB,
SelfPeerID TEXT,
ClientPeerID TEXT,
DealDataRoot TEXT,
InboundFilePath TEXT,
TransferType TEXT,
TransferParams BLOB,
ChainDealID INT,
PublishCID TEXT,
SectorID INT,
Offset INT,
Length INT,
Checkpoint TEXT,
Error TEXT,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dirk, my experience has been that persisting errors to DB never works out well, especially when there's resumption involved. Can we get rid of this and add it back only if we absolutely need it ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a checkpoint value called "Complete" but we don't have a way to distinguish between "Completed successfully" and "Completed with error". I'm open to suggestions here.

PRIMARY KEY(ID)
) WITHOUT ROWID;
Loading