您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 

51 行
1.9 KiB

  1. # This file is auto-generated from the current state of the database. Instead
  2. # of editing this file, please use the migrations feature of Active Record to
  3. # incrementally modify your database, and then regenerate this schema definition.
  4. #
  5. # Note that this schema.rb definition is the authoritative source for your
  6. # database schema. If you need to create the application database on another
  7. # system, you should be using db:schema:load, not running all the migrations
  8. # from scratch. The latter is a flawed and unsustainable approach (the more migrations
  9. # you'll amass, the slower it'll run and the greater likelihood for issues).
  10. #
  11. # It's strongly recommended that you check this file into your version control system.
  12. ActiveRecord::Schema.define(version: 20161116161423) do
  13. create_table "carts", force: :cascade do |t|
  14. t.datetime "created_at", null: false
  15. t.datetime "updated_at", null: false
  16. end
  17. create_table "line_items", force: :cascade do |t|
  18. t.integer "product_id"
  19. t.integer "cart_id"
  20. t.datetime "created_at", null: false
  21. t.datetime "updated_at", null: false
  22. t.integer "quantity", default: 1
  23. t.integer "order_id"
  24. t.index ["cart_id"], name: "index_line_items_on_cart_id"
  25. t.index ["order_id"], name: "index_line_items_on_order_id"
  26. t.index ["product_id"], name: "index_line_items_on_product_id"
  27. end
  28. create_table "orders", force: :cascade do |t|
  29. t.string "name"
  30. t.text "address"
  31. t.string "email"
  32. t.integer "pay_type"
  33. t.datetime "created_at", null: false
  34. t.datetime "updated_at", null: false
  35. end
  36. create_table "products", force: :cascade do |t|
  37. t.string "title"
  38. t.text "description"
  39. t.string "image_url"
  40. t.decimal "price", precision: 8, scale: 2
  41. t.datetime "created_at", null: false
  42. t.datetime "updated_at", null: false
  43. end
  44. end