ipld-eth-server/db/migrations/1516050071_add_log_fk_constraint.down.sql
Matt Krump 6583ce72b8 Remove log_uc
* Logs now are attached to receipt, so removing block + index unique
constraint
2018-01-16 09:44:46 -06:00

12 lines
180 B
PL/PgSQL

BEGIN;
ALTER TABLE logs
DROP CONSTRAINT receipts_fk;
ALTER TABLE logs
DROP COLUMN receipt_id;
ALTER TABLE logs
ADD CONSTRAINT log_uc UNIQUE (block_number, index);
COMMIT;