# 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: 20161020160659) do

  create_table "admins", force: true do |t|
    t.string   "name"
    t.string   "firstname"
    t.string   "avatar"
    t.string   "username",               default: "", null: false
    t.string   "email",                  default: "", null: false
    t.string   "password_digest",        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
    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.string   "remember_token"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "color"
    t.boolean  "contact_role"
  end

  create_table "albums", force: true do |t|
    t.string   "name"
    t.boolean  "super_admin"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "allowed_block_contents", force: true do |t|
    t.integer  "block_id"
    t.integer  "content_type_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "articles", force: true do |t|
    t.datetime "published_at"
    t.string   "title"
    t.string   "slug"
    t.string   "tag"
    t.text     "description"
    t.boolean  "enabled"
    t.integer  "image_file_id"
    t.string   "tags_cache"
    t.string   "tags_cache_slug"
    t.integer  "category_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "author"
  end

  create_table "block_contents", force: true do |t|
    t.integer  "style"
    t.integer  "nbr_columns"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "row1"
    t.integer  "row2"
    t.integer  "row3"
    t.integer  "row4"
  end

  create_table "blocks", force: true do |t|
    t.string   "block_name"
    t.string   "blockable_type"
    t.integer  "blockable_id"
    t.text     "content"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "break_contents", force: true do |t|
    t.boolean  "line"
    t.integer  "height"
    t.string   "style"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "categories", force: true do |t|
    t.string   "name"
    t.string   "slug"
    t.boolean  "enabled"
    t.text     "description"
    t.integer  "image_file_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "cel_tables", force: true do |t|
    t.integer  "position"
    t.integer  "style"
    t.integer  "table_row_id"
    t.integer  "table_content_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "cible_aliases", force: true do |t|
    t.integer  "menu_item_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "cible_types", force: true do |t|
    t.string   "slug"
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "cible_urls", force: true do |t|
    t.string   "url"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "comments", force: true do |t|
    t.string   "pseudo",           default: ""
    t.string   "email",            default: ""
    t.string   "website",          default: ""
    t.boolean  "enabled"
    t.text     "comment"
    t.integer  "commentable_id"
    t.string   "commentable_type"
    t.integer  "user_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "comments", ["commentable_id"], name: "index_comments_on_commentable_id", using: :btree
  add_index "comments", ["commentable_type"], name: "index_comments_on_commentable_type", length: {"commentable_type"=>191}, using: :btree

  create_table "contact_action_patterns", force: true do |t|
    t.string   "title"
    t.text     "description"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "contact_actions", force: true do |t|
    t.integer  "admin_id"
    t.datetime "action_at"
    t.integer  "contact_id"
    t.string   "action_title"
    t.text     "action_message"
    t.integer  "contact_action_pattern_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "contact_actions", ["contact_id"], name: "index_contact_actions_on_contact_id", using: :btree

  create_table "contact_files", force: true do |t|
    t.integer  "admin_id"
    t.integer  "contact_id"
    t.string   "name"
    t.text     "description"
    t.string   "file"
    t.string   "token"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "contact_files", ["admin_id"], name: "index_contact_files_on_admin_id", using: :btree
  add_index "contact_files", ["contact_id"], name: "index_contact_files_on_contact_id", using: :btree

  create_table "contacts", force: true do |t|
    t.string   "name"
    t.string   "email"
    t.string   "tel"
    t.string   "website"
    t.text     "message"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "place"
    t.string   "address"
    t.string   "address2"
    t.string   "cp"
    t.string   "city"
    t.string   "country"
    t.text     "notes"
    t.string   "statut"
    t.boolean  "readed"
    t.integer  "admin_id"
    t.boolean  "archived",      default: false
    t.integer  "provenance_id", default: 1
    t.string   "sheet_type"
    t.string   "owner"
  end

  create_table "content_types", force: true do |t|
    t.string   "slug"
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "data_files", force: true do |t|
    t.string   "file"
    t.string   "name"
    t.string   "slug"
    t.string   "description"
    t.integer  "file_folder_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "token"
  end

  create_table "download_contents", force: true do |t|
    t.string   "title"
    t.string   "style"
    t.text     "description"
    t.integer  "data_file_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "dynamic_contents", force: true do |t|
    t.string   "name"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "event_contents", force: true do |t|
    t.string   "title"
    t.text     "description"
    t.datetime "start_at"
    t.boolean  "tremplin"
    t.string   "artist"
    t.integer  "event_type"
    t.string   "place"
    t.text     "address"
    t.decimal  "latitude",      precision: 15, scale: 10
    t.decimal  "longitude",     precision: 15, scale: 10
    t.integer  "image_file_id"
    t.integer  "cible_id"
    t.string   "cible_type"
    t.boolean  "with_cible"
    t.boolean  "popup"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "external_links", force: true do |t|
    t.string   "title"
    t.text     "description"
    t.string   "url"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "file_folders", force: true do |t|
    t.string   "name"
    t.boolean  "super_admin"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "gallery_contents", force: true do |t|
    t.string   "name"
    t.text     "description"
    t.integer  "style"
    t.integer  "nbr_img"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "gallery_images", force: true do |t|
    t.string   "title"
    t.text     "description"
    t.integer  "position"
    t.integer  "image_file_id"
    t.integer  "gallery_content_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "html_contents", force: true do |t|
    t.text     "content"
    t.string   "style"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "content_type"
  end

  create_table "image_contents", force: true do |t|
    t.integer  "image_file_id"
    t.integer  "width"
    t.integer  "height"
    t.string   "alignement"
    t.boolean  "expandable"
    t.string   "style"
    t.string   "alt"
    t.integer  "cible_id"
    t.string   "cible_type"
    t.boolean  "with_cible"
    t.boolean  "popup"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "image_files", force: true do |t|
    t.string   "file"
    t.string   "name"
    t.string   "slug"
    t.text     "description"
    t.string   "tags"
    t.integer  "album_id"
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "photograph"
    t.string   "cible_type"
    t.integer  "cible_id"
  end

  create_table "link_contents", force: true do |t|
    t.integer  "type"
    t.string   "name"
    t.string   "title"
    t.boolean  "popup"
    t.string   "url"
    t.string   "style"
    t.integer  "cible_id"
    t.string   "cible_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "map_contents", force: true do |t|
    t.string   "address"
    t.string   "name"
    t.integer  "view"
    t.boolean  "info_bule"
    t.integer  "zoom"
    t.decimal  "lat",        precision: 10, scale: 6
    t.decimal  "lng",        precision: 10, scale: 6
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menu_aliases", force: true do |t|
    t.integer  "menu_item_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menu_item_content_types", force: true do |t|
    t.string   "name"
    t.string   "slug"
    t.boolean  "super_admin"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menu_items", force: true do |t|
    t.string   "name"
    t.string   "slug"
    t.string   "permalink"
    t.integer  "parent_id"
    t.integer  "position"
    t.boolean  "super_admin"
    t.boolean  "enabled"
    t.boolean  "visible"
    t.boolean  "deleted"
    t.integer  "menu_id"
    t.integer  "menu_content_id"
    t.string   "menu_content_type"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menu_urls", force: true do |t|
    t.string   "url"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menus", force: true do |t|
    t.string   "name"
    t.string   "max_levels"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "pages", force: true do |t|
    t.text     "title"
    t.text     "description"
    t.text     "keywords"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "portlets", force: true do |t|
    t.integer  "block_id"
    t.integer  "content_id"
    t.string   "content_type"
    t.integer  "position"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "table_contents", force: true do |t|
    t.integer  "style"
    t.integer  "nbr_rows"
    t.integer  "nbr_cols"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "table_rows", force: true do |t|
    t.integer  "position"
    t.integer  "style"
    t.integer  "table_content_id"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "text_contents", force: true do |t|
    t.string   "style"
    t.text     "content"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "title_contents", force: true do |t|
    t.text     "content"
    t.integer  "level"
    t.string   "style"
    t.datetime "created_at"
    t.datetime "updated_at"
  end

end
