ipld-eth-server/db/migrations/00016_add_receipts_fk_to_logs.sql

18 lines
374 B
MySQL
Raw Normal View History

-- +goose Up
ALTER TABLE full_sync_logs
ADD COLUMN receipt_id INT;
2018-01-15 21:27:45 +00:00
ALTER TABLE full_sync_logs
ADD CONSTRAINT receipts_fk
FOREIGN KEY (receipt_id)
REFERENCES full_sync_receipts (id)
ON DELETE CASCADE;
2018-01-15 21:27:45 +00:00
-- +goose Down
ALTER TABLE full_sync_logs
DROP CONSTRAINT receipts_fk;
ALTER TABLE full_sync_logs
DROP COLUMN receipt_id;