20151115000003_update_history.rb 411 B

123456789101112
  1. class UpdateHistory < ActiveRecord::Migration
  2. def up
  3. remove_index :histories, [:value_from]
  4. remove_index :histories, [:value_to]
  5. change_table(:histories) do |t|
  6. t.change :value_from, :text, limit: 500, null: true
  7. t.change :value_to, :text, limit: 500, null: true
  8. end
  9. add_index :histories, [:value_from], length: 255
  10. add_index :histories, [:value_to], length: 255
  11. end
  12. end