2019-01-22 12:15:29 +00:00
|
|
|
-- +goose Up
|
2017-12-19 20:14:41 +00:00
|
|
|
ALTER TABLE blocks
|
2019-08-27 03:11:28 +00:00
|
|
|
ADD COLUMN node_id INTEGER NOT NULL,
|
|
|
|
ADD CONSTRAINT node_fk
|
|
|
|
FOREIGN KEY (node_id)
|
|
|
|
REFERENCES nodes (id)
|
|
|
|
ON DELETE CASCADE;
|
2017-12-19 20:14:41 +00:00
|
|
|
|
2019-01-22 12:15:29 +00:00
|
|
|
-- +goose Down
|
|
|
|
ALTER TABLE blocks
|
2019-08-27 03:11:28 +00:00
|
|
|
DROP COLUMN node_id;
|