# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20161117095917) do

  # These are extensions that must be enabled in order to support this database
  enable_extension "plpgsql"

  create_table "ipcad_summary", id: false, force: :cascade do |t|
    t.bigint "date"
    t.bigint "dst"
    t.bigint "bytes",     default: 0, null: false
  end

  create_table "squid_summary", id: false, force: :cascade do |t|
    t.integer "uid",       default: 0, null: false
    t.string  "date",      default: 0, null: false
    t.string  "bytes",     default: 0, null: false
  end

  create_table "squid_users", force: :cascade do |t|
    t.string "name", limit: 255, null: false
  end

  create_table "squid_full", id: false, force: :cascade do |t|
    t.integer "uid",                     default: 0
    t.bigint  "date",                    default: 0
    t.string  "client_ip",   limit: 255
    t.string  "result_code", limit: 255
    t.bigint  "bytes",                   default: 0
    t.string  "method",      limit: 255
    t.text    "url"
    t.string  "url_ip",      limit: 255
    t.index ["uid", "date"], name: "squid_full_index", using: :btree
  end

  create_table "users", force: :cascade do |t|
    t.string   "name"
    t.string   "password"
    t.string   "session_token"
  end

end
