class UpgradeAuditsTable

Public Class Methods

down() click to toggle source
# File lib/generators/auditor/upgrade/templates/upgrade.rb, line 9
def self.down
  remove_column :audits, :owner_type
  remove_column :audits, :owner_id
end
up() click to toggle source
# File lib/generators/auditor/upgrade/templates/upgrade.rb, line 2
def self.up
  add_column :audits, :owner_id, :integer
  add_column :audits, :owner_type, :string

  add_index :audits, [:owner_id, :owner_type], :name => 'owner_index'
end