schema.rb 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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: 20161111073417) do
  13. create_table "accounts", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
  14. t.bigint "ipaddr", null: false
  15. t.integer "pulled", null: false
  16. t.boolean "isused", null: false
  17. t.string "login", null: false
  18. t.string "password"
  19. t.integer "issue"
  20. t.string "comment"
  21. t.string "owner", null: false
  22. t.datetime "created_at", null: false
  23. t.datetime "updated_at", null: false
  24. t.index ["created_at"], name: "index_accounts_on_created_at", using: :btree
  25. t.index ["ipaddr"], name: "index_accounts_on_ipaddr", using: :btree
  26. t.index ["issue"], name: "index_accounts_on_issue", using: :btree
  27. t.index ["isused"], name: "index_accounts_on_isused", using: :btree
  28. t.index ["login"], name: "index_accounts_on_login", using: :btree
  29. t.index ["password"], name: "index_accounts_on_password", using: :btree
  30. t.index ["pulled"], name: "index_accounts_on_pulled", using: :btree
  31. t.index ["updated_at"], name: "index_accounts_on_updated_at", using: :btree
  32. end
  33. create_table "ipaddrs", primary_key: "ipaddr", unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
  34. t.datetime "doc", default: -> { "CURRENT_TIMESTAMP" }, null: false
  35. t.datetime "dom", null: false
  36. t.bigint "pulled", default: 0
  37. t.boolean "isused", default: false
  38. t.bigint "uid", unsigned: true
  39. t.index ["uid"], name: "uid", using: :btree
  40. t.index ["uid"], name: "uni_uid", unique: true, using: :btree
  41. end
  42. create_table "radacct", primary_key: "RadAcctId", id: :bigint, force: :cascade, options: "ENGINE=MyISAM DEFAULT CHARSET=utf8" do |t|
  43. t.string "AcctSessionId", limit: 32, default: "", null: false
  44. t.string "AcctUniqueId", limit: 32, default: "", null: false
  45. t.string "UserName", limit: 64, default: "", null: false
  46. t.string "Realm", limit: 64, default: ""
  47. t.string "NASIPAddress", limit: 15, default: "", null: false
  48. t.string "NASPortId", limit: 15
  49. t.string "NASPortType", limit: 32
  50. t.datetime "AcctStartTime", null: false
  51. t.datetime "AcctStopTime", null: false
  52. t.integer "AcctSessionTime"
  53. t.string "AcctAuthentic", limit: 32
  54. t.string "ConnectInfo_start", limit: 50
  55. t.string "ConnectInfo_stop", limit: 50
  56. t.bigint "AcctInputOctets"
  57. t.bigint "AcctOutputOctets"
  58. t.string "CalledStationId", limit: 50, default: "", null: false
  59. t.string "CallingStationId", limit: 50, default: "", null: false
  60. t.string "AcctTerminateCause", limit: 32, default: "", null: false
  61. t.string "ServiceType", limit: 32
  62. t.string "FramedProtocol", limit: 32
  63. t.string "FramedIPAddress", limit: 15, default: "", null: false
  64. t.integer "AcctStartDelay"
  65. t.integer "AcctStopDelay"
  66. t.string "XAscendSessionSvrKey", limit: 10
  67. t.index ["AcctSessionId"], name: "AcctSessionId", using: :btree
  68. t.index ["AcctStartTime"], name: "AcctStartTime", using: :btree
  69. t.index ["AcctStopTime"], name: "AcctStopTime", using: :btree
  70. t.index ["AcctUniqueId"], name: "AcctUniqueId", using: :btree
  71. t.index ["FramedIPAddress"], name: "FramedIPAddress", using: :btree
  72. t.index ["NASIPAddress"], name: "NASIPAddress", using: :btree
  73. t.index ["UserName"], name: "UserName", using: :btree
  74. end
  75. create_table "sessions", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
  76. t.string "session_id", null: false
  77. t.string "cas_ticket"
  78. t.text "data", limit: 65535
  79. t.datetime "created_at"
  80. t.datetime "updated_at"
  81. t.index ["cas_ticket"], name: "index_sessions_on_cas_ticket", using: :btree
  82. t.index ["session_id"], name: "index_sessions_on_session_id", using: :btree
  83. t.index ["updated_at"], name: "index_sessions_on_updated_at", using: :btree
  84. end
  85. create_table "users", primary_key: "uid", id: :bigint, unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
  86. t.datetime "doc", default: -> { "CURRENT_TIMESTAMP" }, null: false
  87. t.datetime "dom", null: false
  88. t.string "username", limit: 64, null: false
  89. t.string "password"
  90. t.bigint "issue"
  91. t.text "comment", limit: 65535
  92. t.string "owner"
  93. t.index ["password"], name: "password", using: :btree
  94. t.index ["username"], name: "username", unique: true, using: :btree
  95. end
  96. create_table "users_old", primary_key: "uid", id: :bigint, unsigned: true, force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
  97. t.datetime "doc", default: -> { "CURRENT_TIMESTAMP" }, null: false
  98. t.datetime "dom", null: false
  99. t.string "username", limit: 64, null: false
  100. t.string "password"
  101. t.bigint "issue"
  102. t.text "comment", limit: 65535
  103. t.index ["password"], name: "password", using: :btree
  104. t.index ["username"], name: "username", unique: true, using: :btree
  105. end
  106. add_foreign_key "ipaddrs", "users", column: "uid", primary_key: "uid", name: "ipaddrs_ibfk_1", on_update: :cascade, on_delete: :cascade
  107. end