schema.rb 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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: 20171222171109) do
  13. create_table "conversation_participations", force: :cascade do |t|
  14. t.integer "user_id"
  15. t.integer "conversation_id"
  16. t.datetime "viewed_at"
  17. t.datetime "created_at", null: false
  18. t.datetime "updated_at", null: false
  19. t.index ["user_id", "conversation_id"], name: "index_participation_user_conversation", unique: true
  20. end
  21. create_table "conversations", force: :cascade do |t|
  22. t.string "name"
  23. t.datetime "created_at", null: false
  24. t.datetime "updated_at", null: false
  25. end
  26. create_table "messages", force: :cascade do |t|
  27. t.integer "user_id"
  28. t.integer "conversation_id"
  29. t.text "content"
  30. t.datetime "created_at", null: false
  31. t.datetime "updated_at", null: false
  32. t.index ["conversation_id", "created_at"], name: "index_messages_on_conversation_id_and_created_at"
  33. t.index ["conversation_id"], name: "index_messages_on_conversation_id"
  34. t.index ["user_id"], name: "index_messages_on_user_id"
  35. end
  36. create_table "users", force: :cascade do |t|
  37. t.string "name"
  38. t.string "login"
  39. t.string "email"
  40. t.datetime "created_at", null: false
  41. t.datetime "updated_at", null: false
  42. t.string "password_digest"
  43. t.string "remember_digest"
  44. t.integer "gender", default: 0
  45. t.string "phone"
  46. t.date "birth_date"
  47. t.string "picture"
  48. t.index ["login"], name: "index_users_on_login", unique: true
  49. end
  50. end