Merge pull request #43371 from rails/fix_postgresql_14_tests

Specify ORDER BY enumsortorder for postgres enums
This commit is contained in:
John Hawthorn 2021-10-04 12:03:08 -07:00 committed by GitHub
commit 766b84dfe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ module ActiveRecord
query = <<~SQL
SELECT
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
JOIN pg_type AS type
ON (type.oid = enum.enumtypid)