projects
/
cs356-p2-videostore.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add the has_many_polymorphs purchaseable model
[cs356-p2-videostore.git]
/
db
/
migrate
/
016_create_purchases.rb
1
class CreatePurchases < ActiveRecord::Migration
2
def self.up
3
create_table :purchases do |t|
4
t.column :customer_id, :integer
5
t.column :purchaseable_id, :integer
6
t.column :purchaseable_type, :string
7
end
8
end
9
10
def self.down
11
drop_table :purchases
12
end
13
end