# 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 => 20120213092115) do create_table "delayed_jobs", :force => true do |t| t.integer "priority", :default => 0 t.integer "attempts", :default => 0 t.text "handler" t.text "last_error" t.datetime "run_at" t.datetime "locked_at" t.datetime "failed_at" t.string "locked_by" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.string "queue" end add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" create_table "languages", :force => true do |t| t.string "name" t.string "native_name" t.text "display_name" t.string "iso_639_1" t.string "iso_639_2" t.string "iso_639_3" t.text "note" t.integer "position" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end create_table "library_groups", :force => true do |t| t.string "name", :null => false t.text "display_name" t.string "short_name", :null => false t.string "email" t.text "my_networks" t.text "login_banner" t.text "note" t.integer "valid_period_for_new_user", :default => 365, :null => false t.boolean "post_to_union_catalog", :default => false, :null => false t.integer "country_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.text "admin_networks" t.boolean "allow_bookmark_external_url", :default => false, :null => false t.integer "position" t.string "url", :default => "http://localhost:3000/" end add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name" create_table "message_requests", :force => true do |t| t.integer "sender_id" t.integer "receiver_id" t.integer "message_template_id" t.datetime "sent_at" t.datetime "deleted_at" t.text "body" t.string "state" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "message_requests", ["state"], :name => "index_message_requests_on_state" create_table "message_templates", :force => true do |t| t.string "status", :null => false t.text "title", :null => false t.text "body", :null => false t.integer "position" t.string "locale", :default => "en" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end add_index "message_templates", ["status"], :name => "index_message_templates_on_status", :unique => true create_table "messages", :force => true do |t| t.datetime "read_at" t.integer "receiver_id" t.integer "sender_id" t.string "subject", :null => false t.text "body" t.integer "message_request_id" t.string "state" t.integer "parent_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.integer "lft" t.integer "rgt" t.integer "depth" end add_index "messages", ["message_request_id"], :name => "index_messages_on_message_request_id" add_index "messages", ["parent_id"], :name => "index_messages_on_parent_id" add_index "messages", ["receiver_id"], :name => "index_messages_on_receiver_id" add_index "messages", ["sender_id"], :name => "index_messages_on_sender_id" create_table "patron_types", :force => true do |t| t.string "name", :null => false t.text "display_name" t.text "note" t.integer "position" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end create_table "patrons", :force => true do |t| t.integer "user_id" t.string "last_name" t.string "middle_name" t.string "first_name" t.string "last_name_transcription" t.string "middle_name_transcription" t.string "first_name_transcription" t.string "corporate_name" t.string "corporate_name_transcription" t.string "full_name" t.text "full_name_transcription" t.text "full_name_alternative" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false t.datetime "deleted_at" t.string "zip_code_1" t.string "zip_code_2" t.text "address_1" t.text "address_2" t.text "address_1_note" t.text "address_2_note" t.string "telephone_number_1" t.string "telephone_number_2" t.string "fax_number_1" t.string "fax_number_2" t.text "other_designation" t.text "place" t.string "postal_code" t.text "street" t.text "locality" t.text "region" t.datetime "date_of_birth" t.datetime "date_of_death" t.integer "language_id", :default => 1, :null => false t.integer "country_id", :default => 1, :null => false t.integer "patron_type_id", :default => 1, :null => false t.integer "lock_version", :default => 0, :null => false t.text "note" t.integer "creates_count", :default => 0, :null => false t.integer "realizes_count", :default => 0, :null => false t.integer "produces_count", :default => 0, :null => false t.integer "owns_count", :default => 0, :null => false t.integer "required_role_id", :default => 1, :null => false t.integer "required_score", :default => 0, :null => false t.string "state" t.text "email" t.text "url" end add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id" add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name" add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id" add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id" add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true create_table "roles", :force => true do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end create_table "user_groups", :force => true do |t| t.string "name" t.text "display_name" t.text "note" t.integer "position" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end create_table "user_has_roles", :force => true do |t| t.integer "user_id" t.integer "role_id" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false end create_table "users", :force => true do |t| t.integer "user_group_id" t.integer "required_role_id" t.string "username" t.text "note" t.string "locale" t.string "user_number" t.datetime "created_at", :null => false t.datetime "updated_at", :null => false 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.string "password_salt" t.string "confirmation_token" t.datetime "confirmed_at" t.datetime "confirmation_sent_at" t.string "unconfirmed_email" t.integer "failed_attempts", :default => 0 t.string "unlock_token" t.datetime "locked_at" t.string "authentication_token" end add_index "users", ["email"], :name => "index_users_on_email" add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true end