Sha256: 6cbda9f32f297c4188cbfcd4d6d32bf4406766135b2b4efd19bc467f01548739

Contents?: true

Size: 373 Bytes

Versions: 5

Compression:

Stored size: 373 Bytes

Contents

class RenameParentToAssociation < ActiveRecord::Migration
  def self.up
    rename_column :audits, :auditable_parent_id, :association_id
    rename_column :audits, :auditable_parent_type, :association_type
  end

  def self.down
    rename_column :audits, :association_type, :auditable_parent_type
    rename_column :audits, :association_id, :auditable_parent_id
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/db/migrate/20111124095055_rename_parent_to_association.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/db/migrate/20111124095055_rename_parent_to_association.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/db/migrate/20111124095055_rename_parent_to_association.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/db/migrate/20111124095055_rename_parent_to_association.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/db/migrate/20111124095055_rename_parent_to_association.rb