blockchain-etl / ethereum-etl-postgres

ETL for moving Ethereum data to PostgreSQL database

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing unique constraints

infinidi4s opened this issue · comments

Hi!

I don't have time to do a pull request yet, I'm just testing it out quickly, but this was missing in SQL for me for streaming to work:

alter table logs add constraint log_pair_uq unique (log_index, transaction_hash);
alter table token_transfers add constraint token_transfers_pair_uq unique (log_index, transaction_hash);

This fixed it, thank you for your work! :)