# encoding: UTF-8 # 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: 20150808102442) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "ahoy_events", id: :uuid, default: nil, force: :cascade do |t| t.uuid "visit_id" t.integer "user_id" t.string "name" t.jsonb "properties" t.datetime "time" t.string "ip" end add_index "ahoy_events", ["time"], name: "index_ahoy_events_on_time", using: :btree add_index "ahoy_events", ["user_id"], name: "index_ahoy_events_on_user_id", using: :btree add_index "ahoy_events", ["visit_id"], name: "index_ahoy_events_on_visit_id", using: :btree create_table "comments", force: :cascade do |t| t.integer "commentable_id" t.string "commentable_type" t.string "title" t.text "body" t.string "subject" t.integer "user_id", null: false t.integer "parent_id" t.integer "lft" t.integer "rgt" t.datetime "created_at" t.datetime "updated_at" end add_index "comments", ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type", using: :btree add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree create_table "debates", force: :cascade do |t| t.string "title", limit: 80 t.text "description" t.integer "author_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "visit_id" end create_table "taggings", force: :cascade do |t| t.integer "tag_id" t.integer "taggable_id" t.string "taggable_type" t.integer "tagger_id" t.string "tagger_type" t.string "context", limit: 128 t.datetime "created_at" end add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree create_table "tags", force: :cascade do |t| t.string "name" t.integer "taggings_count", default: 0 end add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree create_table "users", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at" t.datetime "remember_created_at" t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at" t.datetime "last_sign_in_at" t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "first_name" t.string "last_name" t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" t.string "nickname" t.boolean "use_nickname", default: false, null: false t.boolean "email_on_debate_comment", default: false t.boolean "email_on_comment_reply", default: false end add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree create_table "visits", id: :uuid, default: nil, force: :cascade do |t| t.uuid "visitor_id" t.string "ip" t.text "user_agent" t.text "referrer" t.text "landing_page" t.integer "user_id" t.string "referring_domain" t.string "search_keyword" t.string "browser" t.string "os" t.string "device_type" t.integer "screen_height" t.integer "screen_width" t.string "country" t.string "region" t.string "city" t.string "postal_code" t.decimal "latitude" t.decimal "longitude" t.string "utm_source" t.string "utm_medium" t.string "utm_term" t.string "utm_content" t.string "utm_campaign" t.datetime "started_at" end add_index "visits", ["user_id"], name: "index_visits_on_user_id", using: :btree create_table "votes", force: :cascade do |t| t.integer "votable_id" t.string "votable_type" t.integer "voter_id" t.string "voter_type" t.boolean "vote_flag" t.string "vote_scope" t.integer "vote_weight" t.datetime "created_at" t.datetime "updated_at" end add_index "votes", ["votable_id", "votable_type", "vote_scope"], name: "index_votes_on_votable_id_and_votable_type_and_vote_scope", using: :btree add_index "votes", ["voter_id", "voter_type", "vote_scope"], name: "index_votes_on_voter_id_and_voter_type_and_vote_scope", using: :btree end