-- +goose Up CREATE TABLE goal_notifications ( goal_id bigint NOT NULL REFERENCES goals (id) ON DELETE CASCADE, notification_date date NOT NULL, sent_at timestamptz NOT NULL DEFAULT now(), PRIMARY KEY (goal_id, notification_date) ); -- +goose Down DROP TABLE goal_notifications;