# 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: 20141121211542) do create_table "admins", force: true 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 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 "username" t.string "name" t.string "firstname" t.string "file" end add_index "admins", ["email"], name: "index_admins_on_email", unique: true, using: :btree add_index "admins", ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true, using: :btree create_table "answer_sets", force: true do |t| t.integer "question_set_id" t.integer "survey_item_answer_id" t.text "content" t.boolean "is_checked" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "position" end add_index "answer_sets", ["question_set_id"], name: "index_answer_sets_on_question_set_id", using: :btree add_index "answer_sets", ["survey_item_answer_id"], name: "index_answer_sets_on_survey_item_answer_id", using: :btree create_table "archive_newsletters", force: true do |t| t.integer "newsletter_id" t.string "title" t.text "content" t.string "email_from" t.datetime "created_at" t.datetime "updated_at" end add_index "archive_newsletters", ["newsletter_id"], name: "index_archive_newsletters_on_newsletter_id", using: :btree create_table "donates", force: true do |t| t.date "paid_at" t.integer "amount" t.integer "payment_type" t.string "bank" t.string "check_number" t.text "comment" t.integer "sheet_id" t.datetime "created_at" t.datetime "updated_at" end create_table "followed_topics", force: true do |t| t.integer "forum_user_id" t.integer "forum_topic_id" t.boolean "enabled" t.datetime "created_at" t.datetime "updated_at" end add_index "followed_topics", ["forum_topic_id"], name: "index_followed_topics_on_forum_topic_id", using: :btree add_index "followed_topics", ["forum_user_id"], name: "index_followed_topics_on_forum_user_id", using: :btree create_table "forum_categories", force: true do |t| t.string "title" t.text "description" t.integer "parent_id" t.integer "forum_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "forum_messages", force: true do |t| t.integer "forum_user_id" t.integer "forum_topic_id" t.string "title" t.text "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "forum_messages", ["forum_user_id"], name: "index_forum_messages_on_forum_user_id", using: :btree create_table "forum_topics", force: true do |t| t.integer "forum_user_id" t.integer "category_id" t.string "title" t.text "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "forum_topics", ["forum_user_id"], name: "index_forum_topics_on_forum_user_id", using: :btree create_table "forum_user_images", force: true do |t| t.integer "album_id_id" t.integer "forum_user_id" t.string "image" t.string "title" t.integer "views" t.text "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "forum_user_images", ["album_id_id"], name: "index_forum_user_images_on_album_id_id", using: :btree add_index "forum_user_images", ["forum_user_id"], name: "index_forum_user_images_on_forum_user_id", using: :btree create_table "forum_users", force: true do |t| t.string "name" t.string "firstname" t.text "bio" t.string "avatar" 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.boolean "lock" t.datetime "locked_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "sheet_number" t.integer "sheet_id" t.boolean "show_email" t.boolean "new_message_notification" t.datetime "last_new_message_notification" t.boolean "new_message_on_my_topics_notification" t.datetime "last_new_message_on_my_topics_notification" t.string "auth_token" t.boolean "new_messages_notifications" t.boolean "new_topic_notifications" t.boolean "follow_new_topics" t.boolean "follow_participated_topics" end create_table "forums", force: true do |t| t.string "title" t.text "description" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "mail_archives", force: true do |t| t.integer "newsletter_id" t.integer "archive_newsletter_id" t.string "email" t.integer "sheet_id" t.integer "person_id" t.string "token" t.boolean "readed" t.datetime "created_at" t.datetime "updated_at" end add_index "mail_archives", ["archive_newsletter_id"], name: "index_mail_archives_on_archive_newsletter_id", using: :btree add_index "mail_archives", ["newsletter_id"], name: "index_mail_archives_on_newsletter_id", using: :btree add_index "mail_archives", ["person_id"], name: "index_mail_archives_on_person_id", using: :btree add_index "mail_archives", ["sheet_id"], name: "index_mail_archives_on_sheet_id", using: :btree create_table "newsgroups", force: true do |t| t.string "name" t.text "description" t.datetime "created_at" t.datetime "updated_at" end create_table "newsletters", force: true do |t| t.string "title" t.text "content" t.datetime "sendmail" t.boolean "archive" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "email_from" end create_table "note_files", force: true do |t| t.string "file" t.string "name" t.string "slug" t.text "description" t.integer "admin_id" t.integer "note_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "notes", force: true do |t| t.string "subject" t.text "message" t.integer "admin_id" t.integer "topic_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "notes", ["admin_id"], name: "index_notes_on_admin_id", using: :btree create_table "people", force: true do |t| t.boolean "newsletter" t.string "surname" t.string "firstname" t.string "email" t.string "phone" t.string "job" t.integer "sheet_id" t.integer "positon" t.datetime "created_at" t.datetime "updated_at" end create_table "people_newsgroups", force: true do |t| t.integer "person_id" t.integer "newsgroup_id" t.datetime "created_at" t.datetime "updated_at" end create_table "petition_signators", force: true do |t| t.integer "petition_id" t.string "firstname" t.string "name" t.string "address" t.string "address2" t.string "cp" t.string "city" t.string "country" t.string "email" t.boolean "enabled" t.string "token" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "petition_signators", ["petition_id"], name: "index_petition_signators_on_petition_id", using: :btree create_table "petitions", force: true do |t| t.string "name" t.text "description" t.string "slug" t.boolean "enabled" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "question_sets", force: true do |t| t.integer "survey_item_id" t.integer "survey_set_id" t.text "content" t.boolean "boolean_content" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "question_sets", ["survey_item_id"], name: "index_question_sets_on_survey_item_id", using: :btree add_index "question_sets", ["survey_set_id"], name: "index_question_sets_on_survey_set_id", using: :btree create_table "sheet_years", force: true do |t| t.integer "year" t.integer "join_type" t.boolean "gift_year" t.boolean "benefactor" t.date "paid_at" t.integer "amount" t.integer "payment_type" t.string "bank" t.string "check_number" t.integer "sheet_id" t.datetime "created_at" t.datetime "updated_at" t.boolean "plume" end create_table "sheets", force: true do |t| t.string "corporate" t.string "other_phone" t.string "other_mail" t.string "address" t.string "address2" t.string "address3" t.string "pc" t.string "city" t.string "country" t.text "skills" t.integer "sheet_type" t.integer "first_people" t.integer "first_year" t.integer "last_year" t.datetime "created_at" t.datetime "updated_at" t.boolean "plume" t.string "token" t.string "sheet_number" end create_table "survey_item_answers", force: true do |t| t.text "label_text" t.text "help_text" t.string "class_text" t.integer "field_type" t.integer "data_type" t.integer "survey_item_id" t.boolean "locked" t.boolean "archived" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "survey_item_answers", ["survey_item_id"], name: "index_survey_item_answers_on_survey_item_id", using: :btree create_table "survey_items", force: true do |t| t.integer "item_type" t.text "title" t.text "description" t.text "help" t.integer "questions_type" t.integer "display_type" t.integer "survey_type_id" t.integer "string_type" t.boolean "locked" t.boolean "archived" t.integer "text_presentation" t.integer "max_checkboxes" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "survey_items", ["survey_type_id"], name: "index_survey_items_on_survey_type_id", using: :btree create_table "survey_sets", force: true do |t| t.integer "survey_type_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "survey_sets", ["survey_type_id"], name: "index_survey_sets_on_survey_type_id", using: :btree create_table "survey_types", force: true do |t| t.string "name" t.string "slug" t.text "description" t.text "thank_text" t.text "intro_text" t.boolean "locked" t.boolean "archived" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "tiny_urls", force: true do |t| t.string "url" t.string "slug" t.text "description" t.datetime "start_at" t.datetime "stop_at" t.integer "nbr_views" t.datetime "created_at", null: false t.datetime "updated_at", null: false end create_table "topics", force: true do |t| t.string "title" t.text "description" t.integer "admin_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "topics", ["admin_id"], name: "index_topics_on_admin_id", using: :btree end