mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
feat!: Validate monotonic numbers for rich parameters (#6046)
* Database changes * protobuf * Fix: docs * workspaces_test * Validation in coderd * Fix: resources * omitempty * UI changes * UI tests * fix
This commit is contained in:
@ -0,0 +1,3 @@
|
||||
ALTER TABLE template_version_parameters DROP CONSTRAINT validation_monotonic_order;
|
||||
|
||||
ALTER TABLE template_version_parameters DROP COLUMN validation_monotonic;
|
@ -0,0 +1,6 @@
|
||||
ALTER TABLE template_version_parameters ADD COLUMN validation_monotonic text NOT NULL DEFAULT '';
|
||||
|
||||
ALTER TABLE template_version_parameters ADD CONSTRAINT validation_monotonic_order CHECK (validation_monotonic IN ('increasing', 'decreasing', ''));
|
||||
|
||||
COMMENT ON COLUMN template_version_parameters.validation_monotonic
|
||||
IS 'Validation: consecutive values preserve the monotonic order';
|
Reference in New Issue
Block a user