Skip to content

Commit

Permalink
fix: add fk to agents on playbook_run for postgREST
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe authored and moshloop committed Jan 9, 2025
1 parent 770fd01 commit 0c9e529
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions schema/playbooks.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ table "playbook_run_actions" {
on_update = NO_ACTION
on_delete = CASCADE
}
foreign_key "playbook_run_agent_id_fkey" {
columns = [column.agent_id]
ref_columns = [table.agents.column.id]
on_update = NO_ACTION
on_delete = NO_ACTION
}
check "playbook_action_not_null_run_id" {
expr = <<EOF
(playbook_run_id IS NULL AND agent_id IS NOT NULL) OR
Expand Down

0 comments on commit 0c9e529

Please sign in to comment.