# 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 to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20150619080555) do

  create_table "blogit_comments", :force => true do |t|
    t.string   "name",       :limit => nil, :null => false
    t.string   "email",      :limit => nil, :null => false
    t.string   "website",    :limit => nil
    t.text     "body",                      :null => false
    t.integer  "post_id",                   :null => false
    t.string   "state",      :limit => nil
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "blogit_comments", ["post_id"], :name => "index_blogit_comments_on_post_id"

  create_table "blogit_posts", :force => true do |t|
    t.string   "title",          :limit => nil,                      :null => false
    t.text     "body",                                               :null => false
    t.string   "state",          :limit => nil, :default => "draft", :null => false
    t.integer  "comments_count",                :default => 0,       :null => false
    t.integer  "blogger_id"
    t.string   "blogger_type",   :limit => nil
    t.datetime "created_at"
    t.datetime "updated_at"
    t.text     "description"
  end

  add_index "blogit_posts", ["blogger_type", "blogger_id"], :name => "index_blogit_posts_on_blogger_type_and_blogger_id"

  create_table "people", :force => true do |t|
    t.string   "name",       :limit => nil
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "taggings", :force => true do |t|
    t.integer  "tag_id"
    t.integer  "taggable_id"
    t.string   "taggable_type", :limit => nil
    t.integer  "tagger_id"
    t.string   "tagger_type",   :limit => nil
    t.string   "context",       :limit => 128
    t.datetime "created_at"
  end

  add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], :name => "taggings_idx", :unique => true
  add_index "taggings", ["taggable_id", "taggable_type", "context"], :name => "index_taggings_on_taggable_id_and_taggable_type_and_context"

  create_table "tags", :force => true do |t|
    t.string  "name",           :limit => nil
    t.integer "taggings_count",                :default => 0
  end

  add_index "tags", ["name"], :name => "index_tags_on_name", :unique => true

  create_table "users", :force => true do |t|
    t.string   "username",   :limit => nil
    t.string   "password",   :limit => nil
    t.datetime "created_at"
    t.datetime "updated_at"
  end

end
