X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=db%2Fmigrate%2F20090304153613_create_line_items.rb;fp=db%2Fmigrate%2F20090304153613_create_line_items.rb;h=6870a05a03e9c333977d843f037b0683ab2dd149;hb=3ac66882338fa1c3f6d73ba68093b7fcfb399574;hp=0000000000000000000000000000000000000000;hpb=1b429173b63fb15c46a8bc319ae58e9c5584054c;p=depot.git diff --git a/db/migrate/20090304153613_create_line_items.rb b/db/migrate/20090304153613_create_line_items.rb new file mode 100644 index 0000000..6870a05 --- /dev/null +++ b/db/migrate/20090304153613_create_line_items.rb @@ -0,0 +1,16 @@ +class CreateLineItems < ActiveRecord::Migration + def self.up + create_table :line_items do |t| + t.integer :product_id + t.integer :order_id + t.integer :quantity + t.decimal :total_price + + t.timestamps + end + end + + def self.down + drop_table :line_items + end +end