ipld-eth-db/db/migrations/00022_create_eth_blob_hash_cids_table.sql
Roy Crihfield 89d08ac1b9
All checks were successful
Publish Docker image / Build and publish image (release) Successful in 20s
Add eth.blob_hashes table (#8)
Adds `eth.blob_hashes`, indexed by blob transaction hash.

Currently based on #7

Reviewed-on: #8
2024-08-01 00:21:06 +00:00

13 lines
307 B
SQL

-- +goose Up
CREATE TABLE eth.blob_hashes (
tx_hash VARCHAR(66) NOT NULL,
index INTEGER NOT NULL,
blob_hash BYTEA NOT NULL
);
CREATE UNIQUE INDEX blob_hashes_tx_hash_index ON eth.blob_hashes(tx_hash, index);
-- +goose Down
DROP INDEX eth.blob_hashes_tx_hash_index;
DROP TABLE eth.blob_hashes;