-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix enum constraint checks missing from Liquibase changelog
Fixes DependencyTrack/hyades#1030 Signed-off-by: nscuro <[email protected]>
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2416,4 +2416,28 @@ | |
<column name="LOG_SUCCESSFUL_PUBLISH" type="BOOLEAN"/> | ||
</addColumn> | ||
</changeSet> | ||
|
||
<changeSet id="v5.3.0-11" author="[email protected]"> | ||
<sql splitStatements="true"> | ||
ALTER TABLE "COMPONENT" DROP CONSTRAINT IF EXISTS "COMPONENT_CLASSIFIER_check"; | ||
ALTER TABLE "COMPONENT" ADD CONSTRAINT "COMPONENT_CLASSIFIER_check" | ||
CHECK ("CLASSIFIER" IS NULL OR "CLASSIFIER"::TEXT = ANY(ARRAY['APPLICATION', 'CONTAINER', 'DEVICE', 'FILE', 'FIRMWARE', 'FRAMEWORK', 'LIBRARY', 'OPERATING_SYSTEM'])); | ||
|
||
ALTER TABLE "INTEGRITY_META_COMPONENT" DROP CONSTRAINT IF EXISTS "INTEGRITY_META_COMPONENT_STATUS_check"; | ||
ALTER TABLE "INTEGRITY_META_COMPONENT" ADD CONSTRAINT "INTEGRITY_META_COMPONENT_STATUS_check" | ||
CHECK ("STATUS" IS NULL OR "STATUS"::TEXT = ANY(ARRAY['IN_PROGRESS', 'NOT_AVAILABLE', 'PROCESSED'])); | ||
|
||
ALTER TABLE "PROJECT" DROP CONSTRAINT IF EXISTS "PROJECT_CLASSIFIER_check"; | ||
ALTER TABLE "PROJECT" ADD CONSTRAINT "PROJECT_CLASSIFIER_check" | ||
CHECK ("CLASSIFIER" IS NULL OR "CLASSIFIER"::TEXT = ANY(ARRAY['APPLICATION', 'CONTAINER', 'DEVICE', 'FILE', 'FIRMWARE', 'FRAMEWORK', 'LIBRARY', 'OPERATING_SYSTEM'])); | ||
|
||
ALTER TABLE "WORKFLOW_STATE" DROP CONSTRAINT IF EXISTS "WORKFLOW_STATE_STEP_check"; | ||
ALTER TABLE "WORKFLOW_STATE" ADD CONSTRAINT "WORKFLOW_STATE_STEP_check" | ||
CHECK ("STEP"::TEXT = ANY(ARRAY['BOM_CONSUMPTION', 'BOM_PROCESSING', 'METRICS_UPDATE', 'POLICY_BUNDLE_SYNC', 'POLICY_EVALUATION', 'REPO_META_ANALYSIS', 'VULN_ANALYSIS'])); | ||
|
||
ALTER TABLE "WORKFLOW_STATE" DROP CONSTRAINT IF EXISTS "WORKFLOW_STATE_STATUS_check"; | ||
ALTER TABLE "WORKFLOW_STATE" ADD CONSTRAINT "WORKFLOW_STATE_STATUS_check" | ||
CHECK ("STATUS"::TEXT = ANY(ARRAY['CANCELLED', 'COMPLETED', 'FAILED', 'NOT_APPLICABLE', 'PENDING', 'TIMED_OUT'])); | ||
</sql> | ||
</changeSet> | ||
</databaseChangeLog> |