Sha256: a6887b8eff3b7a0cd703db3dd494352989f07fa55ac8aeb9ddaec4aab2d54950

Contents?: true

Size: 501 Bytes

Versions: 4

Compression:

Stored size: 501 Bytes

Contents

class ActsAsContactableAddressMigration < ActiveRecord::Migration<%= migration_version %>
  def self.up
    create_table :addresses do |t|

      t.references :addressable, :polymorphic => true

      t.string :name
      t.string :street
      t.string :street2
      t.string :city
      t.string :state
      t.string :zip
      t.boolean :primary

      t.timestamps
    end

    add_index :addresses, [:addressable_id, :addressable_type]
  end

  def self.down
    drop_table :addresses
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
acts-as-contactable-0.2.2 lib/generators/acts_as_contactable/migration/templates/active_record/address_migration.erb
acts-as-contactable-0.2.1 lib/generators/acts_as_contactable/migration/templates/active_record/address_migration.erb
acts-as-contactable-0.2.0 lib/generators/acts_as_contactable/migration/templates/active_record/address_migration.erb
acts-as-contactable-0.1.10 lib/generators/acts_as_contactable/migration/templates/active_record/address_migration.erb