-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow workflows to be empty or undefined (#9039)
### What? - Makes `jobs.workflows` optional - Dynamically include the `workflowSlugs` select field in the jobs collection as needed ### Why? When configuring jobs, it should be possible to define `job` with just some simple tasks and not be forced to define workflows. ### How? Workflows type was made optional and optional chaining is added where needed. The workflowSlugs field is added to the jobs collection if workflows are defined. Fixes # When using postgres, the workflowSlugs being an empty enum cause an error when drizzle fails to detect the enum already exists. This results in the error `"enum_payload_jobs_workflow_slug" already exists`. Drizzle tries to make the enum as: `enum_payload_jobs_workflow_slug as enum();` and the check for existing enums only works when it has values.
- Loading branch information
1 parent
0165ab8
commit f0f96e7
Showing
3 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters