Sha256: 0b4c43d8ffc43a50059cc72a3abbba2b82da91f60ec87f3f184b9914ee2c41e8

Contents?: true

Size: 296 Bytes

Versions: 9

Compression:

Stored size: 296 Bytes

Contents

class <%= migration_class_name %> < <%= migration_parent %>
  def self.up
    add_column :audits, :association_id, :integer
    add_column :audits, :association_type, :string
  end

  def self.down
    remove_column :audits, :association_type
    remove_column :audits, :association_id
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
audited-4.10.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.9.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.8.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.7.1 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.7.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.6.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.5.0 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.4.1 lib/generators/audited/templates/add_association_to_audits.rb
audited-4.4.0 lib/generators/audited/templates/add_association_to_audits.rb