aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-10-08 09:15:37 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-10-10 11:53:22 +0900
commit5025fd3a99c68f95bdd6fd43f382c62e9653236b (patch)
tree4dfbc554f4a66855b112aa971a904d2352a90c30 /activerecord/test/schema
parent02989ee38f8cc5e82e7106ff8689d4635b016f40 (diff)
downloadrails-5025fd3a99c68f95bdd6fd43f382c62e9653236b.tar.gz
rails-5025fd3a99c68f95bdd6fd43f382c62e9653236b.tar.bz2
rails-5025fd3a99c68f95bdd6fd43f382c62e9653236b.zip
Dump index options to pretty format
```ruby # Before t.index ["firm_id", "type", "rating"], name: "company_index", order: {"rating"=>:desc}, using: :btree # After t.index ["firm_id", "type", "rating"], name: "company_index", order: { rating: :desc }, using: :btree ```
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 a4756ec75a..d2fb090118 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -197,7 +197,7 @@ ActiveRecord::Schema.define do
t.integer :rating, default: 1
t.integer :account_id
t.string :description, default: ""
- t.index [:firm_id, :type, :rating], name: "company_index"
+ 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?