Module: ChronoModel::Migrate

Extended by:
Migrate
Included in:
Migrate
Defined in:
lib/chrono_model/utils.rb

Instance Method Summary collapse

Instance Method Details

#upgrade_indexes!(base = ActiveRecord::Base) ⇒ Object


73
74
75
76
77
78
79
80
81
82
83
# File 'lib/chrono_model/utils.rb', line 73

def upgrade_indexes!(base = ActiveRecord::Base)
  use base

  db.on_schema(Adapter::HISTORY_SCHEMA) do
    db.tables.each do |table|
      if db.is_chrono?(table)
        upgrade_indexes_for(table)
      end
    end
  end
end