Sha256: a0cd7917ecf227aacdc6b85f14036a0dc5a9879815ccdf839f0b79d19241ce5e

Contents?: true

Size: 693 Bytes

Versions: 33

Compression:

Stored size: 693 Bytes

Contents

class CreateEffectiveAddresses < ActiveRecord::Migration
  def self.up
    create_table <%= @addresses_table_name %> do |t|
      t.string :addressable_type
      t.integer :addressable_id
      t.string :category, :limit => 64
      t.string :full_name
      t.string :address1
      t.string :address2
      t.string :city
      t.string :state_code
      t.string :country_code
      t.string :postal_code
      t.datetime :updated_at
      t.datetime :created_at
    end
    add_index <%= @addresses_table_name %>, [:addressable_type, :addressable_id]
    add_index <%= @addresses_table_name %>, :addressable_id
  end

  def self.down
    drop_table <%= @addresses_table_name %>
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
effective_addresses-1.7.1 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.7.0 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.6.3 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.6.2 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.6.1 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.6.0 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.5.1 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.5.0 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.4.1 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.4.0 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.9 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.8 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.7 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.6 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.5 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.4 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.2 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.1 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.3.0 db/migrate/01_create_effective_addresses.rb.erb
effective_addresses-1.2.4 db/migrate/01_create_effective_addresses.rb.erb