schema.rb 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # encoding: UTF-8
  2. # This file is auto-generated from the current state of the database. Instead
  3. # of editing this file, please use the migrations feature of Active Record to
  4. # incrementally modify your database, and then regenerate this schema definition.
  5. #
  6. # Note that this schema.rb definition is the authoritative source for your
  7. # database schema. If you need to create the application database on another
  8. # system, you should be using db:schema:load, not running all the migrations
  9. # from scratch. The latter is a flawed and unsustainable approach (the more migrations
  10. # you'll amass, the slower it'll run and the greater likelihood for issues).
  11. #
  12. # It's strongly recommended that you check this file into your version control system.
  13. ActiveRecord::Schema.define(version: 20170503204200) do
  14. create_table "clients", force: :cascade do |t|
  15. t.string "name", null: false
  16. t.string "nicks", default: "", null: false
  17. t.string "secret", null: false
  18. t.string "type", null: false
  19. t.integer "room_id", null: false
  20. t.datetime "created_at", null: false
  21. t.datetime "updated_at", null: false
  22. end
  23. add_index "clients", ["name"], name: "index_clients_on_name", unique: true
  24. add_index "clients", ["room_id"], name: "index_clients_on_room_id"
  25. create_table "messages", force: :cascade do |t|
  26. t.string "nick", null: false
  27. t.string "text", null: false
  28. t.integer "room_id", null: false
  29. t.datetime "created_at", null: false
  30. t.datetime "updated_at", null: false
  31. end
  32. add_index "messages", ["room_id"], name: "index_messages_on_room_id"
  33. create_table "rooms", force: :cascade do |t|
  34. t.boolean "is_public", default: true, null: false
  35. t.string "secret", null: false
  36. end
  37. end