When deleting rows from the job table, make sure the delete is cascaded to the dependencies and heartbeat tables.
6 lines
151 B
SQL
6 lines
151 B
SQL
ALTER TABLE heartbeats
|
|
|
|
DROP CONSTRAINT heartbeats_id_fkey,
|
|
|
|
ADD CONSTRAINT heartbeats_id_fkey
|
|
FOREIGN KEY (id) REFERENCES jobs(id) ON DELETE CASCADE;
|