From 95c31f382fb27939e55d5bff5aeb7f27e85d56d9 Mon Sep 17 00:00:00 2001 From: Roy Crihfield Date: Tue, 28 May 2024 22:24:28 +0800 Subject: [PATCH] Add eth.blob_hashes table Map transaction hashes to (externally stored) blob versioned hashes. --- .../00022_create_eth_blob_hash_cids_table.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 db/migrations/00022_create_eth_blob_hash_cids_table.sql diff --git a/db/migrations/00022_create_eth_blob_hash_cids_table.sql b/db/migrations/00022_create_eth_blob_hash_cids_table.sql new file mode 100644 index 0000000..f0f2386 --- /dev/null +++ b/db/migrations/00022_create_eth_blob_hash_cids_table.sql @@ -0,0 +1,12 @@ +-- +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;