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')
Comments
Post a Comment