You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously Rails expected indexes to be an array of columns, but for
PostgreSQL a expression index can just be a string of text. Handle this
by forcing `Index#columns` to be an Array inside `index_exists?`.
Closesrails#36739
Steps to reproduce
This appears to happen because
indexes(TABLE_NAME).columns
returnslower(column1)
. However,rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
Lines 101 to 103 in d3327ca
The workaround appears to use
index_name_exists?
to skip the column name check.Expected behavior
index_exists? returns
true
.Actual behavior
index_exists? returns
false
.System configuration
Rails version: 5.2.3
Ruby version: 2.6.3
The text was updated successfully, but these errors were encountered: