@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS tap_horizon_receipts (
55
66 -- Values below are the individual fields of the EIP-712 receipt
77 signature BYTEA NOT NULL ,
8- allocation_id CHAR (40 ) NOT NULL ,
8+ collection_id CHAR (64 ) NOT NULL ,
99 payer CHAR (40 ) NOT NULL ,
1010 data_service CHAR (40 ) NOT NULL ,
1111 service_provider CHAR (40 ) NOT NULL ,
@@ -14,14 +14,14 @@ CREATE TABLE IF NOT EXISTS tap_horizon_receipts (
1414 value NUMERIC (39 ) NOT NULL
1515);
1616
17- CREATE INDEX IF NOT EXISTS tap_horizon_receipts_allocation_id_idx ON tap_horizon_receipts (allocation_id );
17+ CREATE INDEX IF NOT EXISTS tap_horizon_receipts_collection_id_idx ON tap_horizon_receipts (collection_id );
1818CREATE INDEX IF NOT EXISTS tap_horizon_receipts_timestamp_ns_idx ON tap_horizon_receipts (timestamp_ns);
1919
2020CREATE FUNCTION tap_horizon_receipt_notify ()
2121RETURNS trigger AS
2222$$
2323BEGIN
24- PERFORM pg_notify(' tap_horizon_receipt_notification' , format(' {"id": %s, "allocation_id ": "%s", "signer_address": "%s", "timestamp_ns": %s, "value": %s}' , NEW .id , NEW .allocation_id , NEW .signer_address , NEW .timestamp_ns , NEW .value ));
24+ PERFORM pg_notify(' tap_horizon_receipt_notification' , format(' {"id": %s, "collection_id ": "%s", "signer_address": "%s", "timestamp_ns": %s, "value": %s}' , NEW .id , NEW .collection_id , NEW .signer_address , NEW .timestamp_ns , NEW .value ));
2525 RETURN NEW;
2626END;
2727$$ LANGUAGE ' plpgsql' ;
@@ -39,7 +39,7 @@ CREATE TABLE IF NOT EXISTS tap_horizon_receipts_invalid (
3939
4040 -- Values below are the individual fields of the EIP-712 receipt
4141 signature BYTEA NOT NULL ,
42- allocation_id CHAR (40 ) NOT NULL ,
42+ collection_id CHAR (64 ) NOT NULL ,
4343 payer CHAR (40 ) NOT NULL ,
4444 data_service CHAR (40 ) NOT NULL ,
4545 service_provider CHAR (40 ) NOT NULL ,
0 commit comments