Class: UpdateAudits

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/auditable/templates/update.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
# File 'lib/generators/auditable/templates/update.rb', line 2

def change
  add_column :audits, :version, :integer

  add_index :audits, [:auditable_id, :auditable_type, :version], :name => 'auditable_version_idx'
end