-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support labels with empty value (#722)
* support labels with empty value * support labels with empty value * support labels with empty value * support labels with empty value * support labels with empty value * support labels with empty value * support labels with empty value
- Loading branch information
Showing
10 changed files
with
155 additions
and
21 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
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
22 changes: 22 additions & 0 deletions
22
storage/postgres/migrations/20211125100000_alter_label_value.down.sql
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE visibility_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE visibility_labels ADD CONSTRAINT visibility_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE broker_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE broker_labels ADD CONSTRAINT broker_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE platform_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE platform_labels ADD CONSTRAINT platform_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE service_offering_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE service_offering_labels ADD CONSTRAINT service_offering_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE service_plan_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE service_plan_labels ADD CONSTRAINT service_plan_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE notification_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE notification_labels ADD CONSTRAINT notification_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE service_instance_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE service_instance_labels ADD CONSTRAINT service_instance_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE service_binding_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE service_binding_labels ADD CONSTRAINT service_binding_labels_val_check CHECK (val <> ''); | ||
ALTER TABLE broker_platform_credential_labels ALTER COLUMN val SET NOT NULL; | ||
ALTER TABLE broker_platform_credential_labels ADD CONSTRAINT broker_platform_credential_labels_val_check CHECK (val <> ''); | ||
|
||
COMMIT; |
22 changes: 22 additions & 0 deletions
22
storage/postgres/migrations/20211125100000_alter_label_value.up.sql
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
BEGIN; | ||
|
||
ALTER TABLE visibility_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE visibility_labels DROP CONSTRAINT visibility_labels_val_check; | ||
ALTER TABLE broker_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE broker_labels DROP CONSTRAINT broker_labels_val_check; | ||
ALTER TABLE platform_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE platform_labels DROP CONSTRAINT platform_labels_val_check; | ||
ALTER TABLE service_offering_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE service_offering_labels DROP CONSTRAINT service_offering_labels_val_check; | ||
ALTER TABLE service_plan_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE service_plan_labels DROP CONSTRAINT service_plan_labels_val_check; | ||
ALTER TABLE notification_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE notification_labels DROP CONSTRAINT notification_labels_val_check; | ||
ALTER TABLE service_instance_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE service_instance_labels DROP CONSTRAINT service_instance_labels_val_check; | ||
ALTER TABLE service_binding_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE service_binding_labels DROP CONSTRAINT service_binding_labels_val_check; | ||
ALTER TABLE broker_platform_credential_labels ALTER COLUMN val DROP NOT NULL; | ||
ALTER TABLE broker_platform_credential_labels DROP CONSTRAINT broker_platform_credential_labels_val_check; | ||
|
||
COMMIT; |
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
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