class AddIndexToSecdomain < ActiveRecord::Migration def change add_index(:secdomains, :subname, unique: true) end end