233 lines
7.4 KiB
Ruby
233 lines
7.4 KiB
Ruby
# -*- 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 => 20121202213550) 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
|
|
add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true
|
|
|
|
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
|
|
end
|
|
|
|
add_index "answer_sets", ["question_set_id"], :name => "index_answer_sets_on_question_set_id"
|
|
add_index "answer_sets", ["survey_item_answer_id"], :name => "index_answer_sets_on_survey_item_answer_id"
|
|
|
|
create_table "donates", :force => true do |t|
|
|
t.date "paid_at"
|
|
t.decimal "amount", :precision => 10, :scale => 0
|
|
t.integer "payment_type"
|
|
t.string "bank"
|
|
t.string "check_number"
|
|
t.text "comment"
|
|
t.integer "sheet_id"
|
|
t.datetime "created_at", :null => false
|
|
t.datetime "updated_at", :null => false
|
|
end
|
|
|
|
create_table "newsgroups", :force => true do |t|
|
|
t.string "name"
|
|
t.text "description"
|
|
t.datetime "created_at", :null => false
|
|
t.datetime "updated_at", :null => false
|
|
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"
|
|
|
|
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 "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"
|
|
add_index "question_sets", ["survey_set_id"], :name => "index_question_sets_on_survey_set_id"
|
|
|
|
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"
|
|
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"
|
|
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"
|
|
|
|
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"
|
|
|
|
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"
|
|
|
|
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"
|
|
|
|
end
|