Sha256: e9726503c673434122d23f78863434490274d9c50434dc1c7c4e210bbc10ef84
Contents?: true
Size: 459 Bytes
Versions: 16
Compression:
Stored size: 459 Bytes
Contents
class CreateOrdersLineItems < ActiveRecord::Migration def up create_table :refinery_line_items do |t| t.references :order t.references :product t.integer :quantity t.float :unit_price, :default => 0.0, :limit => 10, :null => false t.timestamps end add_index :refinery_line_items, :order_id add_index :refinery_line_items, :product_id end def down drop_table :refinery_line_items end end
Version data entries
16 entries across 16 versions & 1 rubygems