2019-01-22 12:15:29 +00:00
|
|
|
-- +goose Up
|
2019-07-18 21:24:25 +00:00
|
|
|
ALTER TABLE full_sync_logs
|
2019-08-06 21:57:08 +00:00
|
|
|
ADD COLUMN receipt_id INT;
|
2018-01-15 21:27:45 +00:00
|
|
|
|
2019-07-18 21:24:25 +00:00
|
|
|
ALTER TABLE full_sync_logs
|
2019-08-06 21:57:08 +00:00
|
|
|
ADD CONSTRAINT receipts_fk
|
|
|
|
FOREIGN KEY (receipt_id)
|
|
|
|
REFERENCES full_sync_receipts (id)
|
|
|
|
ON DELETE CASCADE;
|
2018-01-15 21:27:45 +00:00
|
|
|
|
2019-01-22 12:15:29 +00:00
|
|
|
|
|
|
|
-- +goose Down
|
2019-07-18 21:24:25 +00:00
|
|
|
ALTER TABLE full_sync_logs
|
2019-08-06 21:57:08 +00:00
|
|
|
DROP CONSTRAINT receipts_fk;
|
2019-01-22 12:15:29 +00:00
|
|
|
|
2019-07-18 21:24:25 +00:00
|
|
|
ALTER TABLE full_sync_logs
|
2019-08-06 21:57:08 +00:00
|
|
|
DROP COLUMN receipt_id;
|