mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #43371 from rails/fix_postgresql_14_tests
Specify ORDER BY enumsortorder for postgres enums
This commit is contained in:
commit
766b84dfe1
1 changed files with 1 additions and 1 deletions
|
@ -459,7 +459,7 @@ module ActiveRecord
|
||||||
query = <<~SQL
|
query = <<~SQL
|
||||||
SELECT
|
SELECT
|
||||||
type.typname AS name,
|
type.typname AS name,
|
||||||
string_agg(enum.enumlabel, ',') AS value
|
string_agg(enum.enumlabel, ',' ORDER BY enum.enumsortorder) AS value
|
||||||
FROM pg_enum AS enum
|
FROM pg_enum AS enum
|
||||||
JOIN pg_type AS type
|
JOIN pg_type AS type
|
||||||
ON (type.oid = enum.enumtypid)
|
ON (type.oid = enum.enumtypid)
|
||||||
|
|
Loading…
Reference in a new issue