Workflows
workflows¶
- Schema: public
- PK:
workflow_id(uuid,gen_random_uuid())
Columns¶
| Column | Type | Nullable | Default | Notes |
|---|---|---|---|---|
| workflow_id | uuid | NO | gen_random_uuid() |
PK |
| workflow_name | varchar | NO | ||
| is_shared_with_workspace | bool | YES | false |
|
| workflow_status | varchar | NO | active, paused, deleted, etc. |
|
| workspace_id | bigint | YES | FK to workspaces |
|
| created_by | bigint | NO | FK to users |
|
| created_time | timestamp | YES | now() |
|
| last_modified_by | bigint | NO | FK to users |
|
| last_modified_time | timestamp | YES | now() |
|
| workflow_resource_id | varchar | NO | Human-readable resource ID | |
| parent_folders | jsonb | YES | Folder hierarchy path |
Key indexes¶
workflows_pkeyon (workflow_id)unique_workflow_resource_idUNIQUE on (workflow_resource_id,workspace_id) WHEREworkflow_status <> 'deleted'unique_workflow_nameUNIQUE on (workflow_name,workspace_id) WHEREworkflow_status <> 'deleted'
Notes¶
- Soft-deleted via
workflow_status = 'deleted'; partial unique indexes exclude deleted rows. - Workflow logic lives in
workflows_versions; this table is the header/metadata record.