Skip to content

Commit

Permalink
Add billing_addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunn committed Jul 7, 2010
1 parent a9d2e5f commit 9943171
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/billing_address.rb
@@ -0,0 +1,2 @@
class BillingAddress < ActiveRecord::Base
end
23 changes: 23 additions & 0 deletions db/migrate/20100707090604_create_billing_addresses.rb
@@ -0,0 +1,23 @@
class CreateBillingAddresses < ActiveRecord::Migration
def self.up
create_table :billing_addresses do |t|
t.string :name
t.string :address1
t.string :address2
t.string :city
t.string :state
t.string :country
t.string :zip
t.string :phone

t.timestamps
end

add_column :orders, :billing_address_id, :integer
end

def self.down
remove_column :orders, :billing_address_id
drop_table :billing_addresses
end
end

0 comments on commit 9943171

Please sign in to comment.