mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
Return template parameters in consistent order (#2975)
* return parameters from Terraform provisioner in sorted order * persist parameter indices in database and return them in correct order from API * don't re-sort parameters by name when creating templates
This commit is contained in:
@ -4,7 +4,9 @@ SELECT
|
||||
FROM
|
||||
parameter_schemas
|
||||
WHERE
|
||||
job_id = $1;
|
||||
job_id = $1
|
||||
ORDER BY
|
||||
index;
|
||||
|
||||
-- name: GetParameterSchemasCreatedAfter :many
|
||||
SELECT * FROM parameter_schemas WHERE created_at > $1;
|
||||
@ -27,7 +29,8 @@ INSERT INTO
|
||||
validation_error,
|
||||
validation_condition,
|
||||
validation_type_system,
|
||||
validation_value_type
|
||||
validation_value_type,
|
||||
index
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
@ -46,5 +49,6 @@ VALUES
|
||||
$13,
|
||||
$14,
|
||||
$15,
|
||||
$16
|
||||
$16,
|
||||
$17
|
||||
) RETURNING *;
|
||||
|
Reference in New Issue
Block a user