schema.rb 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #---
  2. # Excerpted from "Agile Web Development with Rails",
  3. # published by The Pragmatic Bookshelf.
  4. # Copyrights apply to this code. It may not be used to create training material,
  5. # courses, books, articles, and the like. Contact us if you are in doubt.
  6. # We make no guarantees that this code is fit for any purpose.
  7. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  8. #---
  9. # encoding: UTF-8
  10. # This file is auto-generated from the current state of the database. Instead
  11. # of editing this file, please use the migrations feature of Active Record to
  12. # incrementally modify your database, and then regenerate this schema definition.
  13. #
  14. # Note that this schema.rb definition is the authoritative source for your
  15. # database schema. If you need to create the application database on another
  16. # system, you should be using db:schema:load, not running all the migrations
  17. # from scratch. The latter is a flawed and unsustainable approach (the more migrations
  18. # you'll amass, the slower it'll run and the greater likelihood for issues).
  19. #
  20. # It's strongly recommended to check this file into your version control system.
  21. ActiveRecord::Schema.define(:version => 20110711000009) do
  22. create_table "carts", :force => true do |t|
  23. t.datetime "created_at", :null => false
  24. t.datetime "updated_at", :null => false
  25. end
  26. create_table "line_items", :force => true do |t|
  27. t.integer "product_id"
  28. t.integer "cart_id"
  29. t.datetime "created_at", :null => false
  30. t.datetime "updated_at", :null => false
  31. t.integer "quantity", :default => 1
  32. t.decimal "price"
  33. t.integer "order_id"
  34. end
  35. create_table "orders", :force => true do |t|
  36. t.string "name"
  37. t.text "address"
  38. t.string "email"
  39. t.string "pay_type"
  40. t.datetime "created_at", :null => false
  41. t.datetime "updated_at", :null => false
  42. end
  43. create_table "products", :force => true do |t|
  44. t.string "title"
  45. t.text "description"
  46. t.string "image_url"
  47. t.decimal "price", :precision => 8, :scale => 2
  48. t.datetime "created_at", :null => false
  49. t.datetime "updated_at", :null => false
  50. end
  51. create_table "users", :force => true do |t|
  52. t.string "name"
  53. t.string "password_digest"
  54. t.datetime "created_at", :null => false
  55. t.datetime "updated_at", :null => false
  56. end
  57. end