Class: CreateAddresses

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/forge/db/migrate/20130405172026_create_addresses.rb

Instance Method Summary collapse

Instance Method Details

#downObject



25
26
27
# File 'lib/forge/db/migrate/20130405172026_create_addresses.rb', line 25

def down
  drop_table :addresses
end

#upObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/forge/db/migrate/20130405172026_create_addresses.rb', line 2

def up
  create_table "addresses" do |t|
    t.string   "address1"
    t.string   "address2"
    t.string   "city"
    t.string   "postal"
    t.integer  "country_id"
    t.string   "phone"
    t.integer  "user_id"
    t.string   "first_name"
    t.string   "last_name"
    t.string   "email"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "province_id"
    t.string   "company"
  end

  add_index "addresses", ["country_id"], :name => "index_addresses_on_country_id"
  add_index "addresses", ["province_id"], :name => "index_addresses_on_province_id"
  add_index "addresses", ["user_id"], :name => "index_addresses_on_user_id"
end