schema.rb 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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. #---
  10. # Excerpted from "Agile Web Development with Rails, 4rd Ed.",
  11. # published by The Pragmatic Bookshelf.
  12. # Copyrights apply to this code. It may not be used to create training material,
  13. # courses, books, articles, and the like. Contact us if you are in doubt.
  14. # We make no guarantees that this code is fit for any purpose.
  15. # Visit http://www.pragmaticprogrammer.com/titles/rails4 for more book information.
  16. #---
  17. # This file is auto-generated from the current state of the database. Instead of editing this file,
  18. # please use the migrations feature of Active Record to incrementally modify your database, and
  19. # then regenerate this schema definition.
  20. #
  21. # Note that this schema.rb definition is the authoritative source for your database schema. If you need
  22. # to create the application database on another system, you should be using db:schema:load, not running
  23. # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
  24. # you'll amass, the slower it'll run and the greater likelihood for issues).
  25. #
  26. # It's strongly recommended to check this file into your version control system.
  27. ActiveRecord::Schema.define(:version => 20100301000016) do
  28. create_table "carts", :force => true do |t|
  29. t.datetime "created_at"
  30. t.datetime "updated_at"
  31. end
  32. create_table "discounts", :force => true do |t|
  33. t.datetime "created_at"
  34. t.datetime "updated_at"
  35. end
  36. create_table "line_items", :force => true do |t|
  37. t.integer "product_id"
  38. t.integer "cart_id"
  39. t.datetime "created_at"
  40. t.datetime "updated_at"
  41. t.integer "quantity", :default => 1
  42. t.integer "order_id"
  43. end
  44. create_table "order_notes", :force => true do |t|
  45. t.integer "order_id", :null => false
  46. t.text "notes"
  47. t.text "text"
  48. t.datetime "created_at"
  49. t.datetime "updated_at"
  50. end
  51. create_table "orders", :force => true do |t|
  52. t.string "name"
  53. t.text "address"
  54. t.string "email"
  55. t.string "pay_type", :limit => 10
  56. t.datetime "created_at"
  57. t.datetime "updated_at"
  58. t.string "customer_email"
  59. t.datetime "placed_at", :default => '2009-09-28 13:42:04'
  60. t.string "attn", :limit => 100
  61. t.string "order_type"
  62. t.string "ship_class", :default => "priority", :null => false
  63. t.decimal "amount"
  64. t.string "state", :limit => 2
  65. end
  66. create_table "products", :force => true do |t|
  67. t.string "title"
  68. t.text "description"
  69. t.string "image_url"
  70. t.decimal "price", :precision => 8, :scale => 2
  71. t.datetime "created_at"
  72. t.datetime "updated_at"
  73. end
  74. create_table "users", :force => true do |t|
  75. t.string "name"
  76. t.string "hashed_password"
  77. t.string "salt"
  78. t.datetime "created_at"
  79. t.datetime "updated_at"
  80. t.string "status"
  81. end
  82. end