aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorfatkodima <fatkodima123@gmail.com>2018-03-16 07:19:40 +0200
committerRafael França <rafaelmfranca@gmail.com>2018-03-16 01:19:40 -0400
commit471bec310d1ecc50311f18b545df1d789d6bac0d (patch)
tree44d83b4a877fa20211e3376f3cf92c79fc3e6b0e /activerecord/test/schema
parent81843bcf65f1f5fce0bab1d1437e2815eb20e904 (diff)
downloadrails-471bec310d1ecc50311f18b545df1d789d6bac0d.tar.gz
rails-471bec310d1ecc50311f18b545df1d789d6bac0d.tar.bz2
rails-471bec310d1ecc50311f18b545df1d789d6bac0d.zip
Fix multiline expression indexes for postgresql (#31621)
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r--activerecord/test/schema/schema.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 8b0106dbf0..ca86100bc5 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -210,7 +210,7 @@ ActiveRecord::Schema.define do
t.index [:firm_id, :type, :rating], name: "company_index", length: { type: 10 }, order: { rating: :desc }
t.index [:firm_id, :type], name: "company_partial_index", where: "(rating > 10)"
t.index :name, name: "company_name_index", using: :btree
- t.index "lower(name)", name: "company_expression_index" if supports_expression_index?
+ t.index "(CASE WHEN rating > 0 THEN lower(name) END)", name: "company_expression_index" if supports_expression_index?
end
create_table :content, force: true do |t|