mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: mark coder_parameter as "required" (#6433)
* Add required column * Pass through providerd * Pass the required property down * Optional * Fix * Fix * Fix * fix * CLI create: support for optional fields * Use HTML API to mark fields required * Fix * Improve validation * more fixes * make fmt * Fix * WIP * Fix: test * CLI update tets * OptionalParameterAdded * Fix: migration
This commit is contained in:
3
coderd/database/dump.sql
generated
3
coderd/database/dump.sql
generated
@ -351,6 +351,7 @@ CREATE TABLE template_version_parameters (
|
||||
validation_max integer NOT NULL,
|
||||
validation_error text DEFAULT ''::text NOT NULL,
|
||||
validation_monotonic text DEFAULT ''::text NOT NULL,
|
||||
required boolean DEFAULT true NOT NULL,
|
||||
CONSTRAINT validation_monotonic_order CHECK ((validation_monotonic = ANY (ARRAY['increasing'::text, 'decreasing'::text, ''::text])))
|
||||
);
|
||||
|
||||
@ -378,6 +379,8 @@ COMMENT ON COLUMN template_version_parameters.validation_error IS 'Validation: e
|
||||
|
||||
COMMENT ON COLUMN template_version_parameters.validation_monotonic IS 'Validation: consecutive values preserve the monotonic order';
|
||||
|
||||
COMMENT ON COLUMN template_version_parameters.required IS 'Is parameter required?';
|
||||
|
||||
CREATE TABLE template_version_variables (
|
||||
template_version_id uuid NOT NULL,
|
||||
name text NOT NULL,
|
||||
|
Reference in New Issue
Block a user