app.automation_conditions
TableRow level security on
One condition of an automation, or a group of conditions (ADR 0047). A condition compares a path of the event with a value using an API filter operator (ADR 0003); a group combines the conditions under it with all or any. Groups nest one level.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.automations on insert; never accepted from the caller and never changed.References app.organizations.id |
| automation_id | uuid | No | Automation the condition belongs to.References app.automations.id |
| parent_condition_id | uuid | Yes | Group the condition sits in; null for a top-level condition or group.References app.automation_conditions.id |
| position | smallint | No | Order within its parent, 1 first. |
| group_match | app.automation_match | Yes | For a group: all or any of the conditions under it. Null for a condition. |
| field | text | Yes | Path into the event, such as data.record_kind or subject.table. Null for a group. |
| operator | app.filter_operator | Yes | eq, ne, lt, lte, gt, gte, in (comma-separated values), is_null (true or false) or contains. Null for a group. |
| value_text | text | Yes | Value compared, as text; null for is_null meaning true, and for a group. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |