public.promotion_run¶
Columns¶
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| createdById | uuid | true | public.user | The user who ran Promote or Apply. | ||
| details | json | true | Payload for type. A git run stores schemaVersion, branchName and commitSha. NULL when the type has no details. | |||
| direction | varchar(16) | false | PromotionDirection enum: "promote" pushes to the remote, "apply" imports from it. Copied from the environment when the run is written. | |||
| environmentId | uuid | true | public.promotion_environment | The environment this run used. NULL after the environment is deleted. | ||
| id | uuid | false | ||||
| reviewId | uuid | true | public.promotion_review | The review this run belongs to. NULL when the push has no review. Not unique: an amend adds another run. | ||
| type | varchar(16) | false | PromotionRunType enum: "git". Git covers GitHub, GitLab and plain Git. |
Constraints¶
| Name | Type | Definition |
|---|---|---|
| CHK_promotion_run_direction | CHECK | CHECK (((direction)::text = ANY ((ARRAY['apply'::character varying, 'promote'::character varying])::text[]))) |
| CHK_promotion_run_type | CHECK | CHECK (((type)::text = 'git'::text)) |
| FK_promotion_run_createdById | FOREIGN KEY | FOREIGN KEY ("createdById") REFERENCES "user"(id) ON DELETE SET NULL |
| FK_promotion_run_environmentId | FOREIGN KEY | FOREIGN KEY ("environmentId") REFERENCES promotion_environment(id) ON DELETE SET NULL |
| FK_promotion_run_reviewId | FOREIGN KEY | FOREIGN KEY ("reviewId") REFERENCES promotion_review(id) ON DELETE SET NULL |
| PK_f5b941d810bf2eb7a5f8327f446 | PRIMARY KEY | PRIMARY KEY (id) |
| promotion_run_createdAt_not_null | n | NOT NULL "createdAt" |
| promotion_run_direction_not_null | n | NOT NULL direction |
| promotion_run_id_not_null | n | NOT NULL id |
| promotion_run_type_not_null | n | NOT NULL type |
Indexes¶
| Name | Definition |
|---|---|
| IDX_b24c3e6b803dc496c8702f12ab | CREATE INDEX "IDX_b24c3e6b803dc496c8702f12ab" ON public.promotion_run USING btree ("reviewId") |
| IDX_fedd808ad4d5b9f813190e0ec7 | CREATE INDEX "IDX_fedd808ad4d5b9f813190e0ec7" ON public.promotion_run USING btree ("environmentId") |
| PK_f5b941d810bf2eb7a5f8327f446 | CREATE UNIQUE INDEX "PK_f5b941d810bf2eb7a5f8327f446" ON public.promotion_run USING btree (id) |
Relations¶
erDiagram
"public.promotion_run" }o--o| "public.user" : "FOREIGN KEY (#quot;createdById#quot;) REFERENCES #quot;user#quot;(id) ON DELETE SET NULL"
"public.promotion_run" }o--o| "public.promotion_environment" : "FOREIGN KEY (#quot;environmentId#quot;) REFERENCES promotion_environment(id) ON DELETE SET NULL"
"public.promotion_run" }o--o| "public.promotion_review" : "FOREIGN KEY (#quot;reviewId#quot;) REFERENCES promotion_review(id) ON DELETE SET NULL"
"public.promotion_run" {
timestamp_3__with_time_zone createdAt
uuid createdById FK
json details
varchar_16_ direction
uuid environmentId FK
uuid id
uuid reviewId FK
varchar_16_ type
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
varchar_16_ kind
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
"public.promotion_environment" {
timestamp_3__with_time_zone createdAt
varchar_16_ direction
uuid id
varchar_128_ name
varchar_36_ providerId FK
json remote
varchar_16_ scope
json settings
timestamp_3__with_time_zone updatedAt
}
"public.promotion_review" {
timestamp_3__with_time_zone approvedAt
uuid approvedById FK
timestamp_3__with_time_zone createdAt
uuid createdById FK
uuid environmentId FK
uuid id
timestamp_3__with_time_zone lastStateChangeAt
varchar_255_ remoteReviewId
varchar_32_ state
varchar_16_ type
}Generated by tbls
Markdown source: View on AtomGit·Content from the open-source project n8/n8n