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.
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).
10 # It's strongly recommended to check this file into your version control system.
12 ActiveRecord
::Schema.define(:version => 20090311202750) do
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"
23 add_index
"line_items", ["order_id"], :name => "fk_line_item_orders"
24 add_index
"line_items", ["product_id"], :name => "fk_line_item_products"
26 create_table
"orders", :force => true do |t
|
30 t
.string
"pay_type", :limit => 10
31 t
.datetime
"created_at"
32 t
.datetime
"updated_at"
35 create_table
"products", :force => true do |t
|
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"
46 create_table
"sessions", :force => true do |t
|
47 t
.string
"session_id", :default => "", :null => false
49 t
.datetime
"created_at"
50 t
.datetime
"updated_at"
53 add_index
"sessions", ["session_id"], :name => "index_sessions_on_session_id"
54 add_index
"sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
56 create_table
"users", :force => true do |t
|
58 t
.string
"hashed_password"
60 t
.datetime
"created_at"
61 t
.datetime
"updated_at"