spec/dummy/db/schema.rb in enju_search_log-0.1.0.pre9 vs spec/dummy/db/schema.rb in enju_search_log-0.1.0.pre10
- old
+ new
@@ -7,121 +7,364 @@
# 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.
+# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20140811031145) do
+ActiveRecord::Schema.define(version: 20141003182825) do
- create_table "library_groups", :force => true do |t|
- t.string "name", :null => false
+ create_table "accepts", force: true do |t|
+ t.integer "basket_id"
+ t.integer "item_id"
+ t.integer "librarian_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
+ add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
+
+ create_table "baskets", force: true do |t|
+ t.integer "user_id"
+ t.text "note"
+ t.integer "lock_version", default: 0, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
+
+ create_table "bookstores", force: true do |t|
+ t.text "name", null: false
+ t.string "zip_code"
+ t.text "address"
+ t.text "note"
+ t.string "telephone_number"
+ t.string "fax_number"
+ t.string "url"
+ t.integer "position"
+ t.datetime "deleted_at"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "budget_types", force: true do |t|
+ t.string "name"
t.text "display_name"
- t.string "short_name", :null => false
- t.string "email"
+ t.text "note"
+ t.integer "position"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "colors", force: true do |t|
+ t.integer "library_group_id"
+ t.string "property"
+ t.string "code"
+ t.integer "position"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
+
+ create_table "libraries", force: true do |t|
+ t.string "name", null: false
+ t.text "display_name"
+ t.string "short_display_name", null: false
+ t.string "zip_code"
+ t.text "street"
+ t.text "locality"
+ t.text "region"
+ t.string "telephone_number_1"
+ t.string "telephone_number_2"
+ t.string "fax_number"
+ t.text "note"
+ t.integer "call_number_rows", default: 1, null: false
+ t.string "call_number_delimiter", default: "|", null: false
+ t.integer "library_group_id", default: 1, null: false
+ t.integer "users_count", default: 0, null: false
+ t.integer "position"
+ t.integer "country_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.datetime "deleted_at"
+ t.text "opening_hour"
+ t.string "isil"
+ t.float "latitude"
+ t.float "longitude"
+ end
+
+ add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
+ add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
+
+ create_table "library_groups", force: true do |t|
+ t.string "name", null: false
+ t.text "display_name"
+ t.string "short_name", null: false
t.text "my_networks"
t.text "login_banner"
t.text "note"
t.integer "country_id"
t.integer "position"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.text "admin_networks"
- t.string "url", :default => "http://localhost:3000/"
+ t.string "url", default: "http://localhost:3000/"
end
- add_index "library_groups", ["short_name"], :name => "index_library_groups_on_short_name"
+ add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
- create_table "profiles", :force => true do |t|
+ create_table "profiles", force: true do |t|
t.integer "user_id"
t.integer "user_group_id"
t.integer "library_id"
t.string "locale"
t.string "user_number"
t.text "full_name"
t.text "note"
t.text "keyword_list"
t.integer "required_role_id"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
t.datetime "expired_at"
+ t.boolean "save_search_history"
+ t.text "full_name_transcription"
+ t.datetime "date_of_birth"
end
- add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id"
- add_index "profiles", ["user_number"], :name => "index_profiles_on_user_number", :unique => true
+ add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
+ add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
- create_table "roles", :force => true do |t|
- t.string "name"
+ create_table "request_status_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
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
- create_table "search_histories", :force => true do |t|
+ create_table "request_types", force: true do |t|
+ t.string "name", null: false
+ t.text "display_name"
+ t.text "note"
+ t.integer "position"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "roles", force: true do |t|
+ t.string "name", null: false
+ t.string "display_name"
+ t.text "note"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "score", default: 0, null: false
+ t.integer "position"
+ end
+
+ create_table "search_engines", force: true do |t|
+ t.string "name", null: false
+ t.text "display_name"
+ t.string "url", null: false
+ t.text "base_url", null: false
+ t.text "http_method", null: false
+ t.text "query_param", null: false
+ t.text "additional_param"
+ t.text "note"
+ t.integer "position"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "search_histories", force: true do |t|
t.integer "user_id"
- t.string "operation", :default => "searchRetrieve"
- t.float "sru_version", :default => 1.2
+ t.string "operation", default: "searchRetrieve"
+ t.float "sru_version", default: 1.2
t.string "query"
t.integer "start_record"
t.integer "maximum_records"
t.string "record_packing"
t.string "record_schema"
t.integer "result_set_ttl"
t.string "stylesheet"
t.string "extra_request_data"
- t.integer "number_of_records", :default => 0
+ t.integer "number_of_records", default: 0
t.string "result_set_id"
t.integer "result_set_idle_time"
t.text "records"
t.integer "next_record_position"
t.text "diagnostics"
t.text "extra_response_data"
t.text "echoed_search_retrieve_request"
- t.datetime "created_at", :null => false
- t.datetime "updated_at", :null => false
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
- add_index "search_histories", ["user_id"], :name => "index_search_histories_on_user_id"
+ add_index "search_histories", ["user_id"], name: "index_search_histories_on_user_id"
- create_table "user_has_roles", :force => true do |t|
+ create_table "shelves", force: true do |t|
+ t.string "name", null: false
+ t.text "display_name"
+ t.text "note"
+ t.integer "library_id", default: 1, null: false
+ t.integer "items_count", default: 0, null: false
+ t.integer "position"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.datetime "deleted_at"
+ t.boolean "closed", default: false, null: false
+ end
+
+ add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
+
+ create_table "subscribes", force: true do |t|
+ t.integer "subscription_id", null: false
+ t.integer "work_id", null: false
+ t.datetime "start_at", null: false
+ t.datetime "end_at", null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
+ add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
+
+ create_table "subscriptions", force: true do |t|
+ t.text "title", null: false
+ t.text "note"
t.integer "user_id"
+ t.integer "order_list_id"
+ t.datetime "deleted_at"
+ t.integer "subscribes_count", default: 0, null: false
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
+ add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
+
+ create_table "user_export_file_transitions", force: true do |t|
+ t.string "to_state"
+ t.text "metadata", default: "{}"
+ t.integer "sort_key"
+ t.integer "user_export_file_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
+ add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
+
+ create_table "user_export_files", force: true do |t|
+ t.integer "user_id"
+ t.string "user_export_file_name"
+ t.string "user_export_content_type"
+ t.integer "user_export_file_size"
+ t.datetime "user_export_updated_at"
+ t.datetime "executed_at"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ 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"
+ t.datetime "updated_at"
+ t.datetime "deleted_at"
+ t.integer "valid_period_for_new_user", default: 0, null: false
+ t.datetime "expired_at"
+ 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
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
- create_table "users", :force => true do |t|
- t.integer "user_group_id"
- t.integer "required_role_id"
- t.string "username"
+ add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
+ add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
+
+ create_table "user_import_file_transitions", force: true do |t|
+ t.string "to_state"
+ t.text "metadata", default: "{}"
+ t.integer "sort_key"
+ t.integer "user_import_file_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
+ add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
+
+ create_table "user_import_files", force: true do |t|
+ t.integer "user_id"
t.text "note"
- t.string "locale"
- 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.datetime "executed_at"
+ t.string "user_import_file_name"
+ t.string "user_import_content_type"
+ t.string "user_import_file_size"
+ t.datetime "user_import_updated_at"
+ t.string "user_import_fingerprint"
+ t.string "edit_mode"
+ t.text "error_message"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.string "user_encoding"
+ t.integer "default_library_id"
+ t.integer "default_user_group_id"
+ end
+
+ create_table "user_import_results", force: true do |t|
+ t.integer "user_import_file_id"
+ t.integer "user_id"
+ t.text "body"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "users", 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.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.datetime "created_at"
+ t.datetime "updated_at"
+ t.boolean "save_search_history", default: false, null: false
+ t.string "username"
+ t.datetime "deleted_at"
+ t.datetime "expired_at"
+ t.integer "failed_attempts", default: 0
t.string "unlock_token"
t.datetime "locked_at"
- t.string "authentication_token"
- t.boolean "save_search_history", :default => false, :null => false
+ t.datetime "confirmed_at"
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
+ add_index "users", ["email"], name: "index_users_on_email"
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
+ add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
+ add_index "users", ["username"], name: "index_users_on_username", unique: true
+
+ create_table "versions", force: true do |t|
+ t.string "item_type", null: false
+ t.integer "item_id", null: false
+ t.string "event", null: false
+ t.string "whodunnit"
+ t.text "object"
+ t.datetime "created_at"
+ end
+
+ add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
end