Sha256: ec72c103cdc6c77ffb6475f2d51b30cc580014340ddf1b5081cbc2637f6f5673

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 Bytes

Contents

class CreateAddresses < ActiveRecord::Migration
  def self.up
    create_table :addresses do |t|
      t.references :addressable, :polymorphic => true, :null => false
      t.string :street_1, :null => false
      t.string :street_2
      t.string :city, :null => false
      t.references :region
      t.string :custom_region
      t.string :postal_code, :null => false
      t.references :country
      t.timestamps
    end
  end
  
  def self.down
    drop_table :addresses
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
has_addresses-0.5.2 generators/has_addresses/templates/003_create_addresses.rb
has_addresses-0.5.0 db/migrate/003_create_addresses.rb
has_addresses-0.5.1 db/migrate/003_create_addresses.rb