-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Gustavo Inacio <[email protected]>
- Loading branch information
Showing
5 changed files
with
207 additions
and
34 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- Add down migration script here | ||
DROP TABLE IF EXISTS scalar_tap_receipts CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
-- Add up migration script here | ||
CREATE TABLE IF NOT EXISTS tap_horizon_receipts ( | ||
id BIGSERIAL PRIMARY KEY, -- id being SERIAL is important for the function of tap-agent | ||
signer_address CHAR(40) NOT NULL, | ||
|
||
-- Values below are the individual fields of the EIP-712 receipt | ||
signature BYTEA NOT NULL, | ||
allocation_id CHAR(40) NOT NULL, | ||
payer CHAR(40) NOT NULL, | ||
data_service CHAR(40) NOT NULL, | ||
service_provider CHAR(40) NOT NULL, | ||
timestamp_ns NUMERIC(20) NOT NULL, | ||
nonce NUMERIC(20) NOT NULL, | ||
value NUMERIC(39) NOT NULL | ||
); | ||
|
||
CREATE INDEX IF NOT EXISTS scalar_tap_receipts_allocation_id_idx ON scalar_tap_receipts (allocation_id); | ||
CREATE INDEX IF NOT EXISTS scalar_tap_receipts_timestamp_ns_idx ON scalar_tap_receipts (timestamp_ns); |