# public.workflow_published_version

## Columns

| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| workflowId | varchar(36) |  | false |  | [public.workflow_entity](public.workflow_entity.md) |  |
| publishedVersionId | varchar(36) |  | false |  | [public.workflow_history](public.workflow_history.md) |  |
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false |  |  |  |

## Constraints

| Name | Type | Definition |
| ---- | ---- | ---------- |
| workflow_published_version_createdAt_not_null | n | NOT NULL "createdAt" |
| workflow_published_version_publishedVersionId_not_null | n | NOT NULL "publishedVersionId" |
| workflow_published_version_updatedAt_not_null | n | NOT NULL "updatedAt" |
| workflow_published_version_workflowId_not_null | n | NOT NULL "workflowId" |
| FK_5c76fb7ee939fe2530374d3f75a | FOREIGN KEY | FOREIGN KEY ("workflowId") REFERENCES workflow_entity(id) ON DELETE RESTRICT |
| FK_df3428a541b802d6a63ac56e330 | FOREIGN KEY | FOREIGN KEY ("publishedVersionId") REFERENCES workflow_history("versionId") ON DELETE RESTRICT |
| PK_5c76fb7ee939fe2530374d3f75a | PRIMARY KEY | PRIMARY KEY ("workflowId") |

## Indexes

| Name | Definition |
| ---- | ---------- |
| PK_5c76fb7ee939fe2530374d3f75a | CREATE UNIQUE INDEX "PK_5c76fb7ee939fe2530374d3f75a" ON public.workflow_published_version USING btree ("workflowId") |

## Relations

```mermaid
erDiagram

"public.workflow_published_version" |o--|| "public.workflow_entity" : "FOREIGN KEY (#quot;workflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT"
"public.workflow_published_version" }o--|| "public.workflow_history" : "FOREIGN KEY (#quot;publishedVersionId#quot;) REFERENCES workflow_history(#quot;versionId#quot;) ON DELETE RESTRICT"

"public.workflow_published_version" {
  varchar_36_ workflowId FK
  varchar_36_ publishedVersionId FK
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
}
"public.workflow_entity" {
  varchar_128_ name
  boolean active
  json nodes
  json connections
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
  json settings
  json staticData
  json pinData
  character_36_ versionId
  integer triggerCount
  varchar_36_ id
  json meta
  varchar_36_ parentFolderId FK
  boolean isArchived
  integer versionCounter
  text description
  varchar_36_ activeVersionId FK
  json nodeGroups
  varchar sourceWorkflowId
}
"public.workflow_history" {
  varchar_36_ versionId
  varchar_36_ workflowId FK
  varchar_255_ authors
  timestamp_3__with_time_zone createdAt
  timestamp_3__with_time_zone updatedAt
  json nodes
  json connections
  varchar_128_ name
  boolean autosaved
  text description
  json nodeGroups
}
```

---

> Generated by [tbls](https://github.com/k1LoW/tbls)
