schema.rb 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. # This file is auto-generated from the current state of the database. Instead of editing this file,
  10. # please use the migrations feature of Active Record to incrementally modify your database, and
  11. # then regenerate this schema definition.
  12. #
  13. # Note that this schema.rb definition is the authoritative source for your database schema. If you need
  14. # to create the application database on another system, you should be using db:schema:load, not running
  15. # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
  16. # you'll amass, the slower it'll run and the greater likelihood for issues).
  17. #
  18. # It's strongly recommended to check this file into your version control system.
  19. ActiveRecord::Schema.define(:version => 20100301000016) do
  20. create_table "carts", :force => true do |t|
  21. t.datetime "created_at"
  22. t.datetime "updated_at"
  23. end
  24. create_table "discounts", :force => true do |t|
  25. t.datetime "created_at"
  26. t.datetime "updated_at"
  27. end
  28. create_table "line_items", :force => true do |t|
  29. t.integer "product_id"
  30. t.integer "cart_id"
  31. t.datetime "created_at"
  32. t.datetime "updated_at"
  33. t.integer "quantity", :default => 1
  34. t.integer "order_id"
  35. end
  36. create_table "order_notes", :force => true do |t|
  37. t.integer "order_id", :null => false
  38. t.text "notes"
  39. t.text "text"
  40. t.datetime "created_at"
  41. t.datetime "updated_at"
  42. end
  43. create_table "orders", :force => true do |t|
  44. t.string "name"
  45. t.text "address"
  46. t.string "email"
  47. t.string "pay_type", :limit => 10
  48. t.datetime "created_at"
  49. t.datetime "updated_at"
  50. t.string "customer_email"
  51. t.datetime "placed_at", :default => '2009-09-28 13:42:04'
  52. t.string "attn", :limit => 100
  53. t.string "order_type"
  54. t.string "ship_class", :default => "priority", :null => false
  55. t.decimal "amount"
  56. t.string "state", :limit => 2
  57. end
  58. create_table "products", :force => true do |t|
  59. t.string "title"
  60. t.text "description"
  61. t.string "image_url"
  62. t.decimal "price", :precision => 8, :scale => 2
  63. t.datetime "created_at"
  64. t.datetime "updated_at"
  65. end
  66. create_table "users", :force => true do |t|
  67. t.string "name"
  68. t.string "hashed_password"
  69. t.string "salt"
  70. t.datetime "created_at"
  71. t.datetime "updated_at"
  72. t.string "status"
  73. end
  74. end