Skip to content

Commit

Permalink
feat: notification silences list (#1072)
Browse files Browse the repository at this point in the history
* fix: add foreign keys on notification_silences to the resource tables
  • Loading branch information
adityathebe authored Sep 19, 2024
1 parent 121917f commit ee02526
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions schema/notifications.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,28 @@ table "notification_silences" {
type = BRIN
columns = [column.until]
}
foreign_key "notification_silence_check_id_fkey" {
columns = [column.check_id]
ref_columns = [table.checks.column.id]
on_update = NO_ACTION
on_delete = NO_ACTION
}
foreign_key "notification_silence_config_id_fkey" {
columns = [column.config_id]
ref_columns = [table.config_items.column.id]
on_update = NO_ACTION
on_delete = NO_ACTION
}
foreign_key "notification_silence_component_id_fkey" {
columns = [column.component_id]
ref_columns = [table.components.column.id]
on_update = NO_ACTION
on_delete = NO_ACTION
}
foreign_key "notification_silence_canary_id_fkey" {
columns = [column.canary_id]
ref_columns = [table.canaries.column.id]
on_update = NO_ACTION
on_delete = NO_ACTION
}
}
2 changes: 1 addition & 1 deletion views/021_notification.sql
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ BEGIN
VALUES (p_notification_id, p_status, p_source_event, p_resource_id);
END IF;
END;
$$ LANGUAGE plpgsql;
$$ LANGUAGE plpgsql;

0 comments on commit ee02526

Please sign in to comment.