mysql - Rails LHM migration - specify name of index -


using lhm (large hadron migrator) there syntax documentation add indexes:

require 'lhm' class somemigration < activerecord::migration   def self.up     lhm.change_table :foos |m|       m.add_unique_index  [:bar_id, :baz] # add_index if don't want uniqueness     end   end   def self.down     lhm.change_table :foos |m|       m.remove_index  [:bar_id, :baz]     end   end end 

how can specific name index specified in lhm? adding , removing

i concerned hit index name length limit using many columns

m.add_unique_index([:long_column, :super_long_column], 'shortened_index_name') 

link lhm docs #add_unique_index


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -