ipld-eth-db/db/migrations/00013_create_pending_tx_table.sql

13 lines
562 B
MySQL
Raw Normal View History

-- +goose Up
2022-08-30 17:06:01 +00:00
-- pending tx isn't tightly associated with a block height, so we can't insert the RLP encoded tx as an IPLD block
-- in public.blocks since it is denormalized by block number (we could do something hacky like using head height
-- when the block was seen, or 0 or -1 or something)
-- instead, what we are doing for the time being is embedding the RLP here
CREATE TABLE IF NOT EXISTS eth.pending_txs (
tx_hash VARCHAR(66) NOT NULL PRIMARY KEY,
2022-08-30 17:06:01 +00:00
raw BYTEA NOT NULL
);
-- +goose Down
DROP TABLE eth.pending_txs;