Files
firezone/elixir/apps
Jamil 6e336fc3bc fix(portal): Update flows fkey constraints to cascade deletes (#8645)
The `flows` table currently has `ON DELETE SET NULL` behavior for many
of its foreign key constraints. The problem is that if we try to delete
any of the associated entities, setting a null here causes the DB
operation to fail with:

```
ERROR:  null value in column "policy_id" of relation "flows" violates not-null constraint
```

I can understand why it was originally architected like this to preserve
connection log data, but we'll be using another approach for that that
doesn't require maintaining relational data in perpetuity.

Related: #949
2025-04-03 16:29:19 -07:00
..