Sha256: 2383d3e93bd80c0ef771033cbeebc49d9585f88c137d679d8ef36e8e62cacf5c
Contents?: true
Size: 779 Bytes
Versions: 8
Compression:
Stored size: 779 Bytes
Contents
class CreateEffectiveAddresses < ActiveRecord::Migration[4.2] 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 # Uncomment this if you want 3 address fields # t.string :address3 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
8 entries across 8 versions & 1 rubygems