Updated order display
[depot.git] / db / schema.rb
1 # This file is auto-generated from the current state of the database. Instead of editing this file,
2 # please use the migrations feature of Active Record to incrementally modify your database, and
3 # then regenerate this schema definition.
4 #
5 # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6 # to create the application database on another system, you should be using db:schema:load, not running
7 # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8 # you'll amass, the slower it'll run and the greater likelihood for issues).
9 #
10 # It's strongly recommended to check this file into your version control system.
11
12 ActiveRecord::Schema.define(:version => 20090311202750) do
13
14 create_table "line_items", :force => true do |t|
15 t.integer "product_id", :null => false
16 t.integer "order_id", :null => false
17 t.integer "quantity", :null => false
18 t.decimal "total_price", :precision => 8, :scale => 2, :null => false
19 t.datetime "created_at"
20 t.datetime "updated_at"
21 end
22
23 add_index "line_items", ["order_id"], :name => "fk_line_item_orders"
24 add_index "line_items", ["product_id"], :name => "fk_line_item_products"
25
26 create_table "orders", :force => true do |t|
27 t.string "name"
28 t.text "address"
29 t.string "email"
30 t.string "pay_type", :limit => 10
31 t.datetime "created_at"
32 t.datetime "updated_at"
33 end
34
35 create_table "products", :force => true do |t|
36 t.string "title"
37 t.text "description"
38 t.string "image_url"
39 t.datetime "created_at"
40 t.datetime "updated_at"
41 t.decimal "price", :precision => 8, :scale => 2, :default => 0.0
42 t.date "date_available"
43 t.date "date_available_until"
44 end
45
46 create_table "sessions", :force => true do |t|
47 t.string "session_id", :default => "", :null => false
48 t.text "data"
49 t.datetime "created_at"
50 t.datetime "updated_at"
51 end
52
53 add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
54 add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
55
56 create_table "users", :force => true do |t|
57 t.string "name"
58 t.string "hashed_password"
59 t.string "salt"
60 t.datetime "created_at"
61 t.datetime "updated_at"
62 end
63
64 end