diff options
author | Joshua Pinter <joshuapinter@gmail.com> | 2015-09-20 13:30:56 -0600 |
---|---|---|
committer | Joshua Pinter <joshuapinter@gmail.com> | 2015-09-20 13:30:56 -0600 |
commit | 5df94c6ffd82a7d42f36e36892281a4b28ce2ebc (patch) | |
tree | 78d3472a118d4d41f2c14eb06d3c180e179acb58 /activerecord/lib | |
parent | 64766e82d6b80e89eea98dfb4798ac0e40d88a59 (diff) | |
download | rails-5df94c6ffd82a7d42f36e36892281a4b28ce2ebc.tar.gz rails-5df94c6ffd82a7d42f36e36892281a4b28ce2ebc.tar.bz2 rails-5df94c6ffd82a7d42f36e36892281a4b28ce2ebc.zip |
Add title for key lengths for multiple keys.
Previously there was no separator between the two code examples so it looked like:
```ruby
CREATE INDEX by_name ON accounts(name(10))
add_index(:accounts, [:name, :surname], name: 'by_name_surname', length: {name: 10, surname: 15})
```
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 035637f7ab..1e9bf8ff14 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -563,6 +563,8 @@ module ActiveRecord # # CREATE INDEX by_name ON accounts(name(10)) # + # ====== Creating an index with specific key lengths for multiple keys + # # add_index(:accounts, [:name, :surname], name: 'by_name_surname', length: {name: 10, surname: 15}) # # generates: |