mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00: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:
committed by
GitHub
parent
5802c29c38
commit
cef622d77c
@ -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