schema.rb 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "room", null: false
  16. t.text "nicks", null: false
  17. t.string "secret", null: false
  18. t.string "type", null: false
  19. t.datetime "created_at", null: false
  20. t.datetime "updated_at", null: false
  21. end
  22. add_index "clients", ["room"], name: "index_clients_on_room", unique: true
  23. create_table "messages", force: :cascade do |t|
  24. t.string "nick", null: false
  25. t.string "text", null: false
  26. t.integer "client_id", null: false
  27. t.datetime "created_at", null: false
  28. t.datetime "updated_at", null: false
  29. end
  30. add_index "messages", ["client_id"], name: "index_messages_on_client_id"
  31. create_table "subscribers", force: :cascade do |t|
  32. t.integer "client_id"
  33. t.integer "message_id"
  34. end
  35. end