From 9629bcc3cc9f528d5ddae21cce3b53eb9d0e8ae5 Mon Sep 17 00:00:00 2001 From: Thomas Krampl Date: Mon, 19 Feb 2024 13:53:11 +0100 Subject: [PATCH] Add reference to cost table --- internal/database/migrations/0001_schema.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/database/migrations/0001_schema.sql b/internal/database/migrations/0001_schema.sql index 8ba566700..290514e4b 100644 --- a/internal/database/migrations/0001_schema.sql +++ b/internal/database/migrations/0001_schema.sql @@ -74,7 +74,7 @@ CREATE TABLE audit_logs ( CREATE TABLE cost ( id serial PRIMARY KEY, environment text, - team_slug slug, + team_slug slug REFERENCES teams(slug) ON DELETE CASCADE, app text NOT NULL, cost_type text NOT NULL, date date NOT NULL, @@ -340,4 +340,4 @@ ALTER TABLE vulnerability_metrics -- triggers CREATE TRIGGER reconciler_states_set_updated BEFORE UPDATE - ON reconciler_states FOR EACH ROW EXECUTE PROCEDURE set_updated_at(); \ No newline at end of file + ON reconciler_states FOR EACH ROW EXECUTE PROCEDURE set_updated_at();