Write event logs to database before transforming
- enables decoupling event extraction/persistence from transformation - modifies event transformer, converter, and log chunker to accept payload that includes internal log database ID with log data - remove alias for transformer pkg as shared_t - remove unused mock watcher repository
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
-- +goose Up
|
||||
-- SQL in this section is executed when the migration is applied.
|
||||
CREATE TABLE header_sync_logs
|
||||
(
|
||||
id SERIAL PRIMARY KEY,
|
||||
header_id INTEGER NOT NULL REFERENCES headers (id) ON DELETE CASCADE,
|
||||
address VARCHAR(66),
|
||||
topics BYTEA[],
|
||||
data BYTEA,
|
||||
block_number BIGINT,
|
||||
block_hash VARCHAR(66),
|
||||
tx_hash VARCHAR(66),
|
||||
tx_index INTEGER,
|
||||
log_index INTEGER,
|
||||
raw JSONB,
|
||||
UNIQUE (header_id, tx_index, log_index)
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
-- SQL in this section is executed when the migration is rolled back.
|
||||
DROP TABLE header_sync_logs;
|
||||
Reference in New Issue
Block a user