mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: Order database queries for templates (#3249)
* fix: Order database queries for templates Fixes a race in a test where the order of templates varies. * fix: Add sorting to databasefake as well
This commit is contained in:
@@ -34,6 +34,7 @@ WHERE
|
||||
id = ANY(@ids)
|
||||
ELSE true
|
||||
END
|
||||
ORDER BY (created_at, id) ASC
|
||||
;
|
||||
|
||||
-- name: GetTemplateByOrganizationAndName :one
|
||||
@@ -49,7 +50,9 @@ LIMIT
|
||||
1;
|
||||
|
||||
-- name: GetTemplates :many
|
||||
SELECT * FROM templates;
|
||||
SELECT * FROM templates
|
||||
ORDER BY (created_at, id) ASC
|
||||
;
|
||||
|
||||
-- name: InsertTemplate :one
|
||||
INSERT INTO
|
||||
|
||||
Reference in New Issue
Block a user