enju_message 0.2.4 → 0.3.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +4 -4
- data/Rakefile +2 -2
- data/app/assets/config/enju_message_manifest.js +0 -0
- data/app/controllers/message_requests_controller.rb +3 -2
- data/app/controllers/message_templates_controller.rb +4 -3
- data/app/controllers/messages_controller.rb +3 -2
- data/app/models/concerns/enju_message/enju_user.rb +2 -2
- data/app/models/message.rb +4 -4
- data/app/models/message_request.rb +12 -13
- data/app/models/message_request_transition.rb +1 -1
- data/app/models/message_template.rb +2 -2
- data/app/models/message_transition.rb +1 -1
- data/app/views/messages/index.atom.builder +1 -1
- data/app/views/messages/index.rss.builder +7 -12
- data/config/routes.rb +1 -1
- data/db/migrate/149_create_message_templates.rb +6 -6
- data/db/migrate/154_create_messages.rb +1 -1
- data/db/migrate/20080819181903_create_message_requests.rb +1 -1
- data/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +1 -1
- data/db/migrate/20120125050502_add_depth_to_message.rb +1 -1
- data/db/migrate/20140518111006_create_message_transitions.rb +1 -1
- data/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
- data/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
- data/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
- data/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +2 -2
- data/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +2 -2
- data/lib/enju_message/engine.rb +1 -0
- data/lib/enju_message/version.rb +1 -1
- data/lib/generators/enju_message/setup/setup_generator.rb +1 -1
- data/lib/tasks/enju_message_tasks.rake +3 -3
- data/lib/tasks/message_template.rb +1 -1
- data/spec/controllers/message_requests_controller_spec.rb +28 -28
- data/spec/controllers/message_templates_controller_spec.rb +45 -45
- data/spec/controllers/messages_controller_spec.rb +49 -49
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/bin/rails +1 -1
- data/spec/dummy/bin/setup +21 -12
- data/spec/dummy/bin/update +29 -0
- data/spec/dummy/bin/yarn +11 -0
- data/spec/dummy/config/application.rb +6 -16
- data/spec/dummy/config/boot.rb +4 -9
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +17 -22
- data/spec/dummy/config/environment.rb +4 -4
- data/spec/dummy/config/environments/development.rb +24 -11
- data/spec/dummy/config/environments/production.rb +28 -16
- data/spec/dummy/config/environments/test.rb +6 -8
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +14 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +9 -3
- data/spec/dummy/config/initializers/mime_types.rb +0 -1
- data/spec/dummy/config/initializers/wrap_parameters.rb +5 -5
- data/spec/dummy/config/puma.rb +56 -0
- data/spec/dummy/config/secrets.yml +32 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config/sunspot.yml +23 -0
- data/spec/dummy/db/migrate/001_create_agents.rb +7 -7
- data/spec/dummy/db/migrate/002_devise_create_users.rb +6 -6
- data/spec/dummy/db/migrate/005_create_manifestations.rb +13 -13
- data/spec/dummy/db/migrate/006_create_items.rb +6 -6
- data/spec/dummy/db/migrate/012_create_owns.rb +3 -3
- data/spec/dummy/db/migrate/015_create_creates.rb +3 -3
- data/spec/dummy/db/migrate/041_create_roles.rb +3 -3
- data/spec/dummy/db/migrate/047_create_produces.rb +3 -3
- data/spec/dummy/db/migrate/059_create_libraries.rb +1 -1
- data/spec/dummy/db/migrate/069_create_shelves.rb +1 -1
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +2 -2
- data/spec/dummy/db/migrate/077_create_user_groups.rb +2 -2
- data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
- data/spec/dummy/db/migrate/112_create_frequencies.rb +2 -2
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +2 -2
- data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
- data/spec/dummy/db/migrate/124_create_bookstores.rb +2 -2
- data/spec/dummy/db/migrate/125_create_donates.rb +3 -3
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +2 -2
- data/spec/dummy/db/migrate/131_create_request_types.rb +2 -2
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +2 -2
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +3 -3
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +4 -4
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +2 -2
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -1
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +6 -6
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +5 -5
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +6 -6
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -2
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20090719201843_create_extents.rb +2 -2
- data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +2 -2
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +2 -2
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +2 -2
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +2 -2
- data/spec/dummy/db/migrate/20091202124834_create_versions.rb +4 -4
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +1 -1
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +1 -1
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +1 -1
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +1 -1
- data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +2 -2
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +2 -2
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +2 -2
- data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +1 -1
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +3 -3
- data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +1 -1
- data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +1 -1
- data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +1 -1
- data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +1 -1
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +2 -2
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +2 -2
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +4 -4
- data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
- data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +1 -1
- data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +3 -3
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +2 -2
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +1 -1
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
- data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
- data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +1 -1
- data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +1 -1
- data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
- data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
- data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +1 -1
- data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
- data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +1 -1
- data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +1 -1
- data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
- data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
- data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +2 -2
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +2 -2
- data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +2 -2
- data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +2 -2
- data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +2 -2
- data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +2 -2
- data/spec/dummy/db/schema.rb +634 -684
- data/spec/dummy/package.json +5 -0
- data/spec/factories/library.rb +1 -1
- data/spec/factories/message.rb +6 -5
- data/spec/factories/message_request.rb +5 -5
- data/spec/rails_helper.rb +1 -14
- data/spec/views/messages/index.html.erb_spec.rb +5 -5
- metadata +77 -52
data/spec/dummy/db/schema.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: UTF-8
|
2
1
|
# This file is auto-generated from the current state of the database. Instead
|
3
2
|
# of editing this file, please use the migrations feature of Active Record to
|
4
3
|
# incrementally modify your database, and then regenerate this schema definition.
|
@@ -14,787 +13,755 @@
|
|
14
13
|
ActiveRecord::Schema.define(version: 20180107162711) do
|
15
14
|
|
16
15
|
create_table "accepts", force: :cascade do |t|
|
17
|
-
t.integer
|
18
|
-
t.integer
|
19
|
-
t.integer
|
16
|
+
t.integer "basket_id"
|
17
|
+
t.integer "item_id"
|
18
|
+
t.integer "librarian_id"
|
20
19
|
t.datetime "created_at"
|
21
20
|
t.datetime "updated_at"
|
21
|
+
t.index ["basket_id"], name: "index_accepts_on_basket_id"
|
22
|
+
t.index ["item_id"], name: "index_accepts_on_item_id"
|
23
|
+
t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
|
22
24
|
end
|
23
25
|
|
24
|
-
add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
|
25
|
-
add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
|
26
|
-
add_index "accepts", ["librarian_id"], name: "index_accepts_on_librarian_id"
|
27
|
-
|
28
26
|
create_table "agent_import_file_transitions", force: :cascade do |t|
|
29
|
-
t.string
|
30
|
-
t.text
|
31
|
-
t.integer
|
32
|
-
t.integer
|
27
|
+
t.string "to_state"
|
28
|
+
t.text "metadata", default: "{}"
|
29
|
+
t.integer "sort_key"
|
30
|
+
t.integer "agent_import_file_id"
|
33
31
|
t.datetime "created_at"
|
34
32
|
t.datetime "updated_at"
|
35
|
-
t.boolean
|
33
|
+
t.boolean "most_recent", null: false
|
34
|
+
t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
35
|
+
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
36
|
+
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
36
37
|
end
|
37
38
|
|
38
|
-
add_index "agent_import_file_transitions", ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true
|
39
|
-
add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
40
|
-
add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
41
|
-
|
42
39
|
create_table "agent_import_files", force: :cascade do |t|
|
43
|
-
t.integer
|
44
|
-
t.string
|
45
|
-
t.integer
|
46
|
-
t.integer
|
47
|
-
t.text
|
40
|
+
t.integer "parent_id"
|
41
|
+
t.string "content_type"
|
42
|
+
t.integer "size"
|
43
|
+
t.integer "user_id"
|
44
|
+
t.text "note"
|
48
45
|
t.datetime "executed_at"
|
49
|
-
t.string
|
50
|
-
t.string
|
51
|
-
t.integer
|
46
|
+
t.string "agent_import_file_name"
|
47
|
+
t.string "agent_import_content_type"
|
48
|
+
t.integer "agent_import_file_size"
|
52
49
|
t.datetime "agent_import_updated_at"
|
53
50
|
t.datetime "created_at"
|
54
51
|
t.datetime "updated_at"
|
55
|
-
t.string
|
56
|
-
t.text
|
57
|
-
t.string
|
58
|
-
t.string
|
52
|
+
t.string "agent_import_fingerprint"
|
53
|
+
t.text "error_message"
|
54
|
+
t.string "edit_mode"
|
55
|
+
t.string "user_encoding"
|
56
|
+
t.index ["parent_id"], name: "index_agent_import_files_on_parent_id"
|
57
|
+
t.index ["user_id"], name: "index_agent_import_files_on_user_id"
|
59
58
|
end
|
60
59
|
|
61
|
-
add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
|
62
|
-
add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
|
63
|
-
|
64
60
|
create_table "agent_import_results", force: :cascade do |t|
|
65
|
-
t.integer
|
66
|
-
t.integer
|
67
|
-
t.text
|
61
|
+
t.integer "agent_import_file_id"
|
62
|
+
t.integer "agent_id"
|
63
|
+
t.text "body"
|
68
64
|
t.datetime "created_at"
|
69
65
|
t.datetime "updated_at"
|
70
66
|
end
|
71
67
|
|
72
68
|
create_table "agent_merge_lists", force: :cascade do |t|
|
73
|
-
t.string
|
69
|
+
t.string "title"
|
74
70
|
t.datetime "created_at"
|
75
71
|
t.datetime "updated_at"
|
76
72
|
end
|
77
73
|
|
78
74
|
create_table "agent_merges", force: :cascade do |t|
|
79
|
-
t.integer
|
80
|
-
t.integer
|
75
|
+
t.integer "agent_id", null: false
|
76
|
+
t.integer "agent_merge_list_id", null: false
|
81
77
|
t.datetime "created_at"
|
82
78
|
t.datetime "updated_at"
|
79
|
+
t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
|
80
|
+
t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
83
81
|
end
|
84
82
|
|
85
|
-
add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
|
86
|
-
add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
87
|
-
|
88
83
|
create_table "agent_relationship_types", force: :cascade do |t|
|
89
|
-
t.string
|
90
|
-
t.text
|
91
|
-
t.text
|
92
|
-
t.integer
|
84
|
+
t.string "name", null: false
|
85
|
+
t.text "display_name"
|
86
|
+
t.text "note"
|
87
|
+
t.integer "position"
|
93
88
|
t.datetime "created_at"
|
94
89
|
t.datetime "updated_at"
|
95
90
|
end
|
96
91
|
|
97
92
|
create_table "agent_relationships", force: :cascade do |t|
|
98
|
-
t.integer
|
99
|
-
t.integer
|
100
|
-
t.integer
|
93
|
+
t.integer "parent_id"
|
94
|
+
t.integer "child_id"
|
95
|
+
t.integer "agent_relationship_type_id"
|
101
96
|
t.datetime "created_at"
|
102
97
|
t.datetime "updated_at"
|
103
|
-
t.integer
|
98
|
+
t.integer "position"
|
99
|
+
t.index ["child_id"], name: "index_agent_relationships_on_child_id"
|
100
|
+
t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
104
101
|
end
|
105
102
|
|
106
|
-
add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
|
107
|
-
add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
108
|
-
|
109
103
|
create_table "agent_types", force: :cascade do |t|
|
110
|
-
t.string
|
111
|
-
t.text
|
112
|
-
t.text
|
113
|
-
t.integer
|
104
|
+
t.string "name", null: false
|
105
|
+
t.text "display_name"
|
106
|
+
t.text "note"
|
107
|
+
t.integer "position"
|
114
108
|
t.datetime "created_at"
|
115
109
|
t.datetime "updated_at"
|
116
110
|
end
|
117
111
|
|
118
112
|
create_table "agents", force: :cascade do |t|
|
119
|
-
t.string
|
120
|
-
t.string
|
121
|
-
t.string
|
122
|
-
t.string
|
123
|
-
t.string
|
124
|
-
t.string
|
125
|
-
t.string
|
126
|
-
t.string
|
127
|
-
t.string
|
128
|
-
t.text
|
129
|
-
t.text
|
113
|
+
t.string "last_name"
|
114
|
+
t.string "middle_name"
|
115
|
+
t.string "first_name"
|
116
|
+
t.string "last_name_transcription"
|
117
|
+
t.string "middle_name_transcription"
|
118
|
+
t.string "first_name_transcription"
|
119
|
+
t.string "corporate_name"
|
120
|
+
t.string "corporate_name_transcription"
|
121
|
+
t.string "full_name"
|
122
|
+
t.text "full_name_transcription"
|
123
|
+
t.text "full_name_alternative"
|
130
124
|
t.datetime "created_at"
|
131
125
|
t.datetime "updated_at"
|
132
126
|
t.datetime "deleted_at"
|
133
|
-
t.string
|
134
|
-
t.string
|
135
|
-
t.text
|
136
|
-
t.text
|
137
|
-
t.text
|
138
|
-
t.text
|
139
|
-
t.string
|
140
|
-
t.string
|
141
|
-
t.string
|
142
|
-
t.string
|
143
|
-
t.text
|
144
|
-
t.text
|
145
|
-
t.string
|
146
|
-
t.text
|
147
|
-
t.text
|
148
|
-
t.text
|
127
|
+
t.string "zip_code_1"
|
128
|
+
t.string "zip_code_2"
|
129
|
+
t.text "address_1"
|
130
|
+
t.text "address_2"
|
131
|
+
t.text "address_1_note"
|
132
|
+
t.text "address_2_note"
|
133
|
+
t.string "telephone_number_1"
|
134
|
+
t.string "telephone_number_2"
|
135
|
+
t.string "fax_number_1"
|
136
|
+
t.string "fax_number_2"
|
137
|
+
t.text "other_designation"
|
138
|
+
t.text "place"
|
139
|
+
t.string "postal_code"
|
140
|
+
t.text "street"
|
141
|
+
t.text "locality"
|
142
|
+
t.text "region"
|
149
143
|
t.datetime "date_of_birth"
|
150
144
|
t.datetime "date_of_death"
|
151
|
-
t.integer
|
152
|
-
t.integer
|
153
|
-
t.integer
|
154
|
-
t.integer
|
155
|
-
t.text
|
156
|
-
t.integer
|
157
|
-
t.integer
|
158
|
-
t.text
|
159
|
-
t.text
|
160
|
-
t.text
|
161
|
-
t.string
|
162
|
-
t.string
|
163
|
-
t.string
|
164
|
-
t.integer
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
|
145
|
+
t.integer "language_id", default: 1, null: false
|
146
|
+
t.integer "country_id", default: 1, null: false
|
147
|
+
t.integer "agent_type_id", default: 1, null: false
|
148
|
+
t.integer "lock_version", default: 0, null: false
|
149
|
+
t.text "note"
|
150
|
+
t.integer "required_role_id", default: 1, null: false
|
151
|
+
t.integer "required_score", default: 0, null: false
|
152
|
+
t.text "email"
|
153
|
+
t.text "url"
|
154
|
+
t.text "full_name_alternative_transcription"
|
155
|
+
t.string "birth_date"
|
156
|
+
t.string "death_date"
|
157
|
+
t.string "agent_identifier"
|
158
|
+
t.integer "profile_id"
|
159
|
+
t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
160
|
+
t.index ["country_id"], name: "index_agents_on_country_id"
|
161
|
+
t.index ["full_name"], name: "index_agents_on_full_name"
|
162
|
+
t.index ["language_id"], name: "index_agents_on_language_id"
|
163
|
+
t.index ["profile_id"], name: "index_agents_on_profile_id"
|
164
|
+
t.index ["required_role_id"], name: "index_agents_on_required_role_id"
|
165
|
+
end
|
173
166
|
|
174
167
|
create_table "baskets", force: :cascade do |t|
|
175
|
-
t.integer
|
176
|
-
t.text
|
177
|
-
t.integer
|
168
|
+
t.integer "user_id"
|
169
|
+
t.text "note"
|
170
|
+
t.integer "lock_version", default: 0, null: false
|
178
171
|
t.datetime "created_at"
|
179
172
|
t.datetime "updated_at"
|
173
|
+
t.index ["user_id"], name: "index_baskets_on_user_id"
|
180
174
|
end
|
181
175
|
|
182
|
-
add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
|
183
|
-
|
184
176
|
create_table "bookstores", force: :cascade do |t|
|
185
|
-
t.text
|
186
|
-
t.string
|
187
|
-
t.text
|
188
|
-
t.text
|
189
|
-
t.string
|
190
|
-
t.string
|
191
|
-
t.string
|
192
|
-
t.integer
|
177
|
+
t.text "name", null: false
|
178
|
+
t.string "zip_code"
|
179
|
+
t.text "address"
|
180
|
+
t.text "note"
|
181
|
+
t.string "telephone_number"
|
182
|
+
t.string "fax_number"
|
183
|
+
t.string "url"
|
184
|
+
t.integer "position"
|
193
185
|
t.datetime "deleted_at"
|
194
186
|
t.datetime "created_at"
|
195
187
|
t.datetime "updated_at"
|
196
188
|
end
|
197
189
|
|
198
190
|
create_table "budget_types", force: :cascade do |t|
|
199
|
-
t.string
|
200
|
-
t.text
|
201
|
-
t.text
|
202
|
-
t.integer
|
191
|
+
t.string "name"
|
192
|
+
t.text "display_name"
|
193
|
+
t.text "note"
|
194
|
+
t.integer "position"
|
203
195
|
t.datetime "created_at"
|
204
196
|
t.datetime "updated_at"
|
205
197
|
end
|
206
198
|
|
207
199
|
create_table "carrier_types", force: :cascade do |t|
|
208
|
-
t.string
|
209
|
-
t.text
|
210
|
-
t.text
|
211
|
-
t.integer
|
200
|
+
t.string "name", null: false
|
201
|
+
t.text "display_name"
|
202
|
+
t.text "note"
|
203
|
+
t.integer "position"
|
212
204
|
t.datetime "created_at"
|
213
205
|
t.datetime "updated_at"
|
214
|
-
t.string
|
215
|
-
t.string
|
216
|
-
t.integer
|
206
|
+
t.string "attachment_file_name"
|
207
|
+
t.string "attachment_content_type"
|
208
|
+
t.integer "attachment_file_size"
|
217
209
|
t.datetime "attachment_updated_at"
|
218
210
|
end
|
219
211
|
|
220
212
|
create_table "colors", force: :cascade do |t|
|
221
|
-
t.integer
|
222
|
-
t.string
|
223
|
-
t.string
|
224
|
-
t.integer
|
213
|
+
t.integer "library_group_id"
|
214
|
+
t.string "property"
|
215
|
+
t.string "code"
|
216
|
+
t.integer "position"
|
225
217
|
t.datetime "created_at"
|
226
218
|
t.datetime "updated_at"
|
219
|
+
t.index ["library_group_id"], name: "index_colors_on_library_group_id"
|
227
220
|
end
|
228
221
|
|
229
|
-
add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
|
230
|
-
|
231
222
|
create_table "content_types", force: :cascade do |t|
|
232
|
-
t.string
|
233
|
-
t.text
|
234
|
-
t.text
|
235
|
-
t.integer
|
223
|
+
t.string "name", null: false
|
224
|
+
t.text "display_name"
|
225
|
+
t.text "note"
|
226
|
+
t.integer "position"
|
236
227
|
t.datetime "created_at"
|
237
228
|
t.datetime "updated_at"
|
238
229
|
end
|
239
230
|
|
240
231
|
create_table "countries", force: :cascade do |t|
|
241
|
-
t.string
|
242
|
-
t.text
|
243
|
-
t.string
|
244
|
-
t.string
|
245
|
-
t.string
|
246
|
-
t.text
|
232
|
+
t.string "name", null: false
|
233
|
+
t.text "display_name"
|
234
|
+
t.string "alpha_2"
|
235
|
+
t.string "alpha_3"
|
236
|
+
t.string "numeric_3"
|
237
|
+
t.text "note"
|
247
238
|
t.integer "position"
|
239
|
+
t.index ["alpha_2"], name: "index_countries_on_alpha_2"
|
240
|
+
t.index ["alpha_3"], name: "index_countries_on_alpha_3"
|
241
|
+
t.index ["name"], name: "index_countries_on_name"
|
242
|
+
t.index ["numeric_3"], name: "index_countries_on_numeric_3"
|
248
243
|
end
|
249
244
|
|
250
|
-
add_index "countries", ["alpha_2"], name: "index_countries_on_alpha_2"
|
251
|
-
add_index "countries", ["alpha_3"], name: "index_countries_on_alpha_3"
|
252
|
-
add_index "countries", ["name"], name: "index_countries_on_name"
|
253
|
-
add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
|
254
|
-
|
255
245
|
create_table "create_types", force: :cascade do |t|
|
256
|
-
t.string
|
257
|
-
t.text
|
258
|
-
t.text
|
259
|
-
t.integer
|
246
|
+
t.string "name"
|
247
|
+
t.text "display_name"
|
248
|
+
t.text "note"
|
249
|
+
t.integer "position"
|
260
250
|
t.datetime "created_at"
|
261
251
|
t.datetime "updated_at"
|
262
252
|
end
|
263
253
|
|
264
254
|
create_table "creates", force: :cascade do |t|
|
265
|
-
t.integer
|
266
|
-
t.integer
|
267
|
-
t.integer
|
255
|
+
t.integer "agent_id", null: false
|
256
|
+
t.integer "work_id", null: false
|
257
|
+
t.integer "position"
|
268
258
|
t.datetime "created_at"
|
269
259
|
t.datetime "updated_at"
|
270
|
-
t.integer
|
260
|
+
t.integer "create_type_id"
|
261
|
+
t.index ["agent_id"], name: "index_creates_on_agent_id"
|
262
|
+
t.index ["work_id"], name: "index_creates_on_work_id"
|
271
263
|
end
|
272
264
|
|
273
|
-
add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
|
274
|
-
add_index "creates", ["work_id"], name: "index_creates_on_work_id"
|
275
|
-
|
276
265
|
create_table "donates", force: :cascade do |t|
|
277
|
-
t.integer
|
278
|
-
t.integer
|
266
|
+
t.integer "agent_id", null: false
|
267
|
+
t.integer "item_id", null: false
|
279
268
|
t.datetime "created_at"
|
280
269
|
t.datetime "updated_at"
|
270
|
+
t.index ["agent_id"], name: "index_donates_on_agent_id"
|
271
|
+
t.index ["item_id"], name: "index_donates_on_item_id"
|
281
272
|
end
|
282
273
|
|
283
|
-
add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
|
284
|
-
add_index "donates", ["item_id"], name: "index_donates_on_item_id"
|
285
|
-
|
286
274
|
create_table "exemplifies", force: :cascade do |t|
|
287
|
-
t.integer
|
288
|
-
t.integer
|
289
|
-
t.integer
|
275
|
+
t.integer "manifestation_id", null: false
|
276
|
+
t.integer "item_id", null: false
|
277
|
+
t.integer "position"
|
290
278
|
t.datetime "created_at"
|
291
279
|
t.datetime "updated_at"
|
280
|
+
t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true
|
281
|
+
t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
|
292
282
|
end
|
293
283
|
|
294
|
-
add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
|
295
|
-
add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
|
296
|
-
|
297
284
|
create_table "extents", force: :cascade do |t|
|
298
|
-
t.string
|
299
|
-
t.text
|
300
|
-
t.text
|
301
|
-
t.integer
|
285
|
+
t.string "name", null: false
|
286
|
+
t.text "display_name"
|
287
|
+
t.text "note"
|
288
|
+
t.integer "position"
|
302
289
|
t.datetime "created_at"
|
303
290
|
t.datetime "updated_at"
|
304
291
|
end
|
305
292
|
|
306
293
|
create_table "form_of_works", force: :cascade do |t|
|
307
|
-
t.string
|
308
|
-
t.text
|
309
|
-
t.text
|
310
|
-
t.integer
|
294
|
+
t.string "name", null: false
|
295
|
+
t.text "display_name"
|
296
|
+
t.text "note"
|
297
|
+
t.integer "position"
|
311
298
|
t.datetime "created_at"
|
312
299
|
t.datetime "updated_at"
|
313
300
|
end
|
314
301
|
|
315
302
|
create_table "frequencies", force: :cascade do |t|
|
316
|
-
t.string
|
317
|
-
t.text
|
318
|
-
t.text
|
319
|
-
t.integer
|
303
|
+
t.string "name", null: false
|
304
|
+
t.text "display_name"
|
305
|
+
t.text "note"
|
306
|
+
t.integer "position"
|
320
307
|
t.datetime "created_at"
|
321
308
|
t.datetime "updated_at"
|
322
309
|
end
|
323
310
|
|
324
311
|
create_table "identifier_types", force: :cascade do |t|
|
325
|
-
t.string
|
326
|
-
t.text
|
327
|
-
t.text
|
328
|
-
t.integer
|
312
|
+
t.string "name"
|
313
|
+
t.text "display_name"
|
314
|
+
t.text "note"
|
315
|
+
t.integer "position"
|
329
316
|
t.datetime "created_at"
|
330
317
|
t.datetime "updated_at"
|
331
318
|
end
|
332
319
|
|
333
320
|
create_table "identifiers", force: :cascade do |t|
|
334
|
-
t.string
|
335
|
-
t.integer
|
336
|
-
t.integer
|
337
|
-
t.boolean
|
338
|
-
t.integer
|
321
|
+
t.string "body", null: false
|
322
|
+
t.integer "identifier_type_id", null: false
|
323
|
+
t.integer "manifestation_id"
|
324
|
+
t.boolean "primary"
|
325
|
+
t.integer "position"
|
339
326
|
t.datetime "created_at"
|
340
327
|
t.datetime "updated_at"
|
328
|
+
t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
329
|
+
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
341
330
|
end
|
342
331
|
|
343
|
-
add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
344
|
-
add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
345
|
-
|
346
332
|
create_table "import_request_transitions", force: :cascade do |t|
|
347
|
-
t.string
|
348
|
-
t.text
|
349
|
-
t.integer
|
350
|
-
t.integer
|
333
|
+
t.string "to_state"
|
334
|
+
t.text "metadata", default: "{}"
|
335
|
+
t.integer "sort_key"
|
336
|
+
t.integer "import_request_id"
|
351
337
|
t.datetime "created_at"
|
352
338
|
t.datetime "updated_at"
|
353
|
-
t.boolean
|
339
|
+
t.boolean "most_recent", null: false
|
340
|
+
t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
341
|
+
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
342
|
+
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
354
343
|
end
|
355
344
|
|
356
|
-
add_index "import_request_transitions", ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true
|
357
|
-
add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
358
|
-
add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
359
|
-
|
360
345
|
create_table "import_requests", force: :cascade do |t|
|
361
|
-
t.string
|
362
|
-
t.integer
|
363
|
-
t.integer
|
346
|
+
t.string "isbn"
|
347
|
+
t.integer "manifestation_id"
|
348
|
+
t.integer "user_id"
|
364
349
|
t.datetime "created_at"
|
365
350
|
t.datetime "updated_at"
|
351
|
+
t.index ["isbn"], name: "index_import_requests_on_isbn"
|
352
|
+
t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
353
|
+
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
366
354
|
end
|
367
355
|
|
368
|
-
add_index "import_requests", ["isbn"], name: "index_import_requests_on_isbn"
|
369
|
-
add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
370
|
-
add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
|
371
|
-
|
372
356
|
create_table "items", force: :cascade do |t|
|
373
|
-
t.string
|
374
|
-
t.string
|
357
|
+
t.string "call_number"
|
358
|
+
t.string "item_identifier"
|
375
359
|
t.datetime "created_at"
|
376
360
|
t.datetime "updated_at"
|
377
361
|
t.datetime "deleted_at"
|
378
|
-
t.integer
|
379
|
-
t.boolean
|
380
|
-
t.text
|
381
|
-
t.string
|
382
|
-
t.integer
|
383
|
-
t.integer
|
384
|
-
t.integer
|
385
|
-
t.integer
|
362
|
+
t.integer "shelf_id", default: 1, null: false
|
363
|
+
t.boolean "include_supplements", default: false, null: false
|
364
|
+
t.text "note"
|
365
|
+
t.string "url"
|
366
|
+
t.integer "price"
|
367
|
+
t.integer "lock_version", default: 0, null: false
|
368
|
+
t.integer "required_role_id", default: 1, null: false
|
369
|
+
t.integer "required_score", default: 0, null: false
|
386
370
|
t.datetime "acquired_at"
|
387
|
-
t.integer
|
388
|
-
t.integer
|
389
|
-
t.string
|
390
|
-
t.string
|
371
|
+
t.integer "bookstore_id"
|
372
|
+
t.integer "budget_type_id"
|
373
|
+
t.string "binding_item_identifier"
|
374
|
+
t.string "binding_call_number"
|
391
375
|
t.datetime "binded_at"
|
392
|
-
t.integer
|
376
|
+
t.integer "manifestation_id", null: false
|
377
|
+
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
378
|
+
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
379
|
+
t.index ["item_identifier"], name: "index_items_on_item_identifier"
|
380
|
+
t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
|
381
|
+
t.index ["required_role_id"], name: "index_items_on_required_role_id"
|
382
|
+
t.index ["shelf_id"], name: "index_items_on_shelf_id"
|
393
383
|
end
|
394
384
|
|
395
|
-
add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
396
|
-
add_index "items", ["bookstore_id"], name: "index_items_on_bookstore_id"
|
397
|
-
add_index "items", ["item_identifier"], name: "index_items_on_item_identifier"
|
398
|
-
add_index "items", ["manifestation_id"], name: "index_items_on_manifestation_id"
|
399
|
-
add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
|
400
|
-
add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
|
401
|
-
|
402
385
|
create_table "languages", force: :cascade do |t|
|
403
|
-
t.string
|
404
|
-
t.string
|
405
|
-
t.text
|
406
|
-
t.string
|
407
|
-
t.string
|
408
|
-
t.string
|
409
|
-
t.text
|
386
|
+
t.string "name", null: false
|
387
|
+
t.string "native_name"
|
388
|
+
t.text "display_name"
|
389
|
+
t.string "iso_639_1"
|
390
|
+
t.string "iso_639_2"
|
391
|
+
t.string "iso_639_3"
|
392
|
+
t.text "note"
|
410
393
|
t.integer "position"
|
394
|
+
t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
|
395
|
+
t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
|
396
|
+
t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
|
397
|
+
t.index ["name"], name: "index_languages_on_name", unique: true
|
411
398
|
end
|
412
399
|
|
413
|
-
add_index "languages", ["iso_639_1"], name: "index_languages_on_iso_639_1"
|
414
|
-
add_index "languages", ["iso_639_2"], name: "index_languages_on_iso_639_2"
|
415
|
-
add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
|
416
|
-
add_index "languages", ["name"], name: "index_languages_on_name", unique: true
|
417
|
-
|
418
400
|
create_table "libraries", force: :cascade do |t|
|
419
|
-
t.string
|
420
|
-
t.text
|
421
|
-
t.string
|
422
|
-
t.string
|
423
|
-
t.text
|
424
|
-
t.text
|
425
|
-
t.text
|
426
|
-
t.string
|
427
|
-
t.string
|
428
|
-
t.string
|
429
|
-
t.text
|
430
|
-
t.integer
|
431
|
-
t.string
|
432
|
-
t.integer
|
433
|
-
t.integer
|
434
|
-
t.integer
|
435
|
-
t.integer
|
401
|
+
t.string "name", null: false
|
402
|
+
t.text "display_name"
|
403
|
+
t.string "short_display_name", null: false
|
404
|
+
t.string "zip_code"
|
405
|
+
t.text "street"
|
406
|
+
t.text "locality"
|
407
|
+
t.text "region"
|
408
|
+
t.string "telephone_number_1"
|
409
|
+
t.string "telephone_number_2"
|
410
|
+
t.string "fax_number"
|
411
|
+
t.text "note"
|
412
|
+
t.integer "call_number_rows", default: 1, null: false
|
413
|
+
t.string "call_number_delimiter", default: "|", null: false
|
414
|
+
t.integer "library_group_id", null: false
|
415
|
+
t.integer "users_count", default: 0, null: false
|
416
|
+
t.integer "position"
|
417
|
+
t.integer "country_id"
|
436
418
|
t.datetime "created_at"
|
437
419
|
t.datetime "updated_at"
|
438
420
|
t.datetime "deleted_at"
|
439
|
-
t.text
|
440
|
-
t.string
|
441
|
-
t.float
|
442
|
-
t.float
|
421
|
+
t.text "opening_hour"
|
422
|
+
t.string "isil"
|
423
|
+
t.float "latitude"
|
424
|
+
t.float "longitude"
|
425
|
+
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
426
|
+
t.index ["name"], name: "index_libraries_on_name"
|
443
427
|
end
|
444
428
|
|
445
|
-
add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
|
446
|
-
add_index "libraries", ["name"], name: "index_libraries_on_name"
|
447
|
-
|
448
429
|
create_table "library_group_translations", force: :cascade do |t|
|
449
|
-
t.integer
|
450
|
-
t.string
|
451
|
-
t.datetime "created_at",
|
452
|
-
t.datetime "updated_at",
|
453
|
-
t.text
|
454
|
-
t.text
|
430
|
+
t.integer "library_group_id", null: false
|
431
|
+
t.string "locale", null: false
|
432
|
+
t.datetime "created_at", null: false
|
433
|
+
t.datetime "updated_at", null: false
|
434
|
+
t.text "login_banner"
|
435
|
+
t.text "footer_banner"
|
436
|
+
t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
|
437
|
+
t.index ["locale"], name: "index_library_group_translations_on_locale"
|
455
438
|
end
|
456
439
|
|
457
|
-
add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
|
458
|
-
add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
|
459
|
-
|
460
440
|
create_table "library_groups", force: :cascade do |t|
|
461
|
-
t.string
|
462
|
-
t.text
|
463
|
-
t.string
|
464
|
-
t.text
|
465
|
-
t.text
|
466
|
-
t.text
|
467
|
-
t.integer
|
468
|
-
t.integer
|
469
|
-
t.datetime "created_at"
|
470
|
-
t.datetime "updated_at"
|
471
|
-
t.text
|
472
|
-
t.string
|
473
|
-
t.text
|
474
|
-
t.text
|
475
|
-
t.integer
|
476
|
-
t.boolean
|
477
|
-
t.integer
|
478
|
-
t.integer
|
479
|
-
t.boolean
|
480
|
-
t.string
|
481
|
-
t.string
|
482
|
-
t.integer
|
441
|
+
t.string "name", null: false
|
442
|
+
t.text "display_name"
|
443
|
+
t.string "short_name", null: false
|
444
|
+
t.text "my_networks"
|
445
|
+
t.text "old_login_banner"
|
446
|
+
t.text "note"
|
447
|
+
t.integer "country_id"
|
448
|
+
t.integer "position"
|
449
|
+
t.datetime "created_at"
|
450
|
+
t.datetime "updated_at"
|
451
|
+
t.text "admin_networks"
|
452
|
+
t.string "url", default: "http://localhost:3000/"
|
453
|
+
t.text "settings"
|
454
|
+
t.text "html_snippet"
|
455
|
+
t.integer "max_number_of_results", default: 500
|
456
|
+
t.boolean "family_name_first", default: true
|
457
|
+
t.integer "pub_year_facet_range_interval", default: 10
|
458
|
+
t.integer "user_id"
|
459
|
+
t.boolean "csv_charset_conversion", default: false, null: false
|
460
|
+
t.string "header_logo_file_name"
|
461
|
+
t.string "header_logo_content_type"
|
462
|
+
t.integer "header_logo_file_size"
|
483
463
|
t.datetime "header_logo_updated_at"
|
484
|
-
t.text
|
464
|
+
t.text "header_logo_meta"
|
465
|
+
t.index ["short_name"], name: "index_library_groups_on_short_name"
|
466
|
+
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
485
467
|
end
|
486
468
|
|
487
|
-
add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
|
488
|
-
add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
|
489
|
-
|
490
469
|
create_table "licenses", force: :cascade do |t|
|
491
|
-
t.string
|
492
|
-
t.string
|
493
|
-
t.text
|
494
|
-
t.integer
|
470
|
+
t.string "name", null: false
|
471
|
+
t.string "display_name"
|
472
|
+
t.text "note"
|
473
|
+
t.integer "position"
|
495
474
|
t.datetime "created_at"
|
496
475
|
t.datetime "updated_at"
|
497
476
|
end
|
498
477
|
|
499
478
|
create_table "manifestation_relationship_types", force: :cascade do |t|
|
500
|
-
t.string
|
501
|
-
t.text
|
502
|
-
t.text
|
503
|
-
t.integer
|
479
|
+
t.string "name", null: false
|
480
|
+
t.text "display_name"
|
481
|
+
t.text "note"
|
482
|
+
t.integer "position"
|
504
483
|
t.datetime "created_at"
|
505
484
|
t.datetime "updated_at"
|
506
485
|
end
|
507
486
|
|
508
487
|
create_table "manifestation_relationships", force: :cascade do |t|
|
509
|
-
t.integer
|
510
|
-
t.integer
|
511
|
-
t.integer
|
488
|
+
t.integer "parent_id"
|
489
|
+
t.integer "child_id"
|
490
|
+
t.integer "manifestation_relationship_type_id"
|
512
491
|
t.datetime "created_at"
|
513
492
|
t.datetime "updated_at"
|
514
|
-
t.integer
|
493
|
+
t.integer "position"
|
494
|
+
t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
495
|
+
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
515
496
|
end
|
516
497
|
|
517
|
-
add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
518
|
-
add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
519
|
-
|
520
498
|
create_table "manifestations", force: :cascade do |t|
|
521
|
-
t.text
|
522
|
-
t.text
|
523
|
-
t.text
|
524
|
-
t.string
|
525
|
-
t.string
|
499
|
+
t.text "original_title", null: false
|
500
|
+
t.text "title_alternative"
|
501
|
+
t.text "title_transcription"
|
502
|
+
t.string "classification_number"
|
503
|
+
t.string "manifestation_identifier"
|
526
504
|
t.datetime "date_of_publication"
|
527
505
|
t.datetime "date_copyrighted"
|
528
506
|
t.datetime "created_at"
|
529
507
|
t.datetime "updated_at"
|
530
508
|
t.datetime "deleted_at"
|
531
|
-
t.string
|
532
|
-
t.integer
|
533
|
-
t.integer
|
534
|
-
t.integer
|
535
|
-
t.integer
|
536
|
-
t.integer
|
537
|
-
t.integer
|
538
|
-
t.integer
|
539
|
-
t.integer
|
540
|
-
t.text
|
541
|
-
t.string
|
542
|
-
t.string
|
543
|
-
t.string
|
544
|
-
t.integer
|
545
|
-
t.text
|
546
|
-
t.boolean
|
547
|
-
t.integer
|
548
|
-
t.integer
|
549
|
-
t.integer
|
550
|
-
t.integer
|
551
|
-
t.boolean
|
552
|
-
t.string
|
553
|
-
t.string
|
554
|
-
t.integer
|
509
|
+
t.string "access_address"
|
510
|
+
t.integer "language_id", default: 1, null: false
|
511
|
+
t.integer "carrier_type_id", default: 1, null: false
|
512
|
+
t.integer "start_page"
|
513
|
+
t.integer "end_page"
|
514
|
+
t.integer "height"
|
515
|
+
t.integer "width"
|
516
|
+
t.integer "depth"
|
517
|
+
t.integer "price"
|
518
|
+
t.text "fulltext"
|
519
|
+
t.string "volume_number_string"
|
520
|
+
t.string "issue_number_string"
|
521
|
+
t.string "serial_number_string"
|
522
|
+
t.integer "edition"
|
523
|
+
t.text "note"
|
524
|
+
t.boolean "repository_content", default: false, null: false
|
525
|
+
t.integer "lock_version", default: 0, null: false
|
526
|
+
t.integer "required_role_id", default: 1, null: false
|
527
|
+
t.integer "required_score", default: 0, null: false
|
528
|
+
t.integer "frequency_id", default: 1, null: false
|
529
|
+
t.boolean "subscription_master", default: false, null: false
|
530
|
+
t.string "attachment_file_name"
|
531
|
+
t.string "attachment_content_type"
|
532
|
+
t.integer "attachment_file_size"
|
555
533
|
t.datetime "attachment_updated_at"
|
556
|
-
t.text
|
557
|
-
t.text
|
558
|
-
t.text
|
534
|
+
t.text "title_alternative_transcription"
|
535
|
+
t.text "description"
|
536
|
+
t.text "abstract"
|
559
537
|
t.datetime "available_at"
|
560
538
|
t.datetime "valid_until"
|
561
539
|
t.datetime "date_submitted"
|
562
540
|
t.datetime "date_accepted"
|
563
541
|
t.datetime "date_captured"
|
564
|
-
t.string
|
565
|
-
t.string
|
566
|
-
t.integer
|
567
|
-
t.integer
|
568
|
-
t.integer
|
569
|
-
t.integer
|
570
|
-
t.integer
|
571
|
-
t.text
|
572
|
-
t.integer
|
573
|
-
t.boolean
|
574
|
-
t.boolean
|
575
|
-
t.text
|
576
|
-
t.text
|
577
|
-
t.text
|
578
|
-
t.text
|
579
|
-
t.text
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
|
542
|
+
t.string "pub_date"
|
543
|
+
t.string "edition_string"
|
544
|
+
t.integer "volume_number"
|
545
|
+
t.integer "issue_number"
|
546
|
+
t.integer "serial_number"
|
547
|
+
t.integer "content_type_id", default: 1
|
548
|
+
t.integer "year_of_publication"
|
549
|
+
t.text "attachment_meta"
|
550
|
+
t.integer "month_of_publication"
|
551
|
+
t.boolean "fulltext_content"
|
552
|
+
t.boolean "serial"
|
553
|
+
t.text "statement_of_responsibility"
|
554
|
+
t.text "publication_place"
|
555
|
+
t.text "extent_of_text"
|
556
|
+
t.text "extent"
|
557
|
+
t.text "dimensions"
|
558
|
+
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
559
|
+
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
560
|
+
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
|
561
|
+
t.index ["updated_at"], name: "index_manifestations_on_updated_at"
|
562
|
+
end
|
586
563
|
|
587
564
|
create_table "medium_of_performances", force: :cascade do |t|
|
588
|
-
t.string
|
589
|
-
t.text
|
590
|
-
t.text
|
591
|
-
t.integer
|
565
|
+
t.string "name", null: false
|
566
|
+
t.text "display_name"
|
567
|
+
t.text "note"
|
568
|
+
t.integer "position"
|
592
569
|
t.datetime "created_at"
|
593
570
|
t.datetime "updated_at"
|
594
571
|
end
|
595
572
|
|
596
573
|
create_table "message_request_transitions", force: :cascade do |t|
|
597
|
-
t.string
|
598
|
-
t.text
|
599
|
-
t.integer
|
600
|
-
t.integer
|
574
|
+
t.string "to_state"
|
575
|
+
t.text "metadata", default: "{}"
|
576
|
+
t.integer "sort_key"
|
577
|
+
t.integer "message_request_id"
|
601
578
|
t.datetime "created_at"
|
602
579
|
t.datetime "updated_at"
|
603
|
-
t.boolean
|
580
|
+
t.boolean "most_recent", null: false
|
581
|
+
t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
582
|
+
t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
583
|
+
t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
604
584
|
end
|
605
585
|
|
606
|
-
add_index "message_request_transitions", ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true
|
607
|
-
add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
608
|
-
add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
609
|
-
|
610
586
|
create_table "message_requests", force: :cascade do |t|
|
611
|
-
t.integer
|
612
|
-
t.integer
|
613
|
-
t.integer
|
587
|
+
t.integer "sender_id"
|
588
|
+
t.integer "receiver_id"
|
589
|
+
t.integer "message_template_id"
|
614
590
|
t.datetime "sent_at"
|
615
591
|
t.datetime "deleted_at"
|
616
|
-
t.text
|
592
|
+
t.text "body"
|
617
593
|
t.datetime "created_at"
|
618
594
|
t.datetime "updated_at"
|
619
595
|
end
|
620
596
|
|
621
597
|
create_table "message_templates", force: :cascade do |t|
|
622
|
-
t.string
|
623
|
-
t.text
|
624
|
-
t.text
|
625
|
-
t.integer
|
626
|
-
t.string
|
598
|
+
t.string "status", null: false
|
599
|
+
t.text "title", null: false
|
600
|
+
t.text "body", null: false
|
601
|
+
t.integer "position"
|
602
|
+
t.string "locale", default: "en"
|
627
603
|
t.datetime "created_at"
|
628
604
|
t.datetime "updated_at"
|
605
|
+
t.index ["status"], name: "index_message_templates_on_status", unique: true
|
629
606
|
end
|
630
607
|
|
631
|
-
add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
|
632
|
-
|
633
608
|
create_table "message_transitions", force: :cascade do |t|
|
634
|
-
t.string
|
635
|
-
t.text
|
636
|
-
t.integer
|
637
|
-
t.integer
|
609
|
+
t.string "to_state"
|
610
|
+
t.text "metadata", default: "{}"
|
611
|
+
t.integer "sort_key"
|
612
|
+
t.integer "message_id"
|
638
613
|
t.datetime "created_at"
|
639
614
|
t.datetime "updated_at"
|
640
|
-
t.boolean
|
615
|
+
t.boolean "most_recent", null: false
|
616
|
+
t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
|
617
|
+
t.index ["message_id"], name: "index_message_transitions_on_message_id"
|
618
|
+
t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
641
619
|
end
|
642
620
|
|
643
|
-
add_index "message_transitions", ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true
|
644
|
-
add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
|
645
|
-
add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
646
|
-
|
647
621
|
create_table "messages", force: :cascade do |t|
|
648
622
|
t.datetime "read_at"
|
649
|
-
t.integer
|
650
|
-
t.integer
|
651
|
-
t.string
|
652
|
-
t.text
|
653
|
-
t.integer
|
654
|
-
t.integer
|
623
|
+
t.integer "sender_id"
|
624
|
+
t.integer "receiver_id"
|
625
|
+
t.string "subject", null: false
|
626
|
+
t.text "body"
|
627
|
+
t.integer "message_request_id"
|
628
|
+
t.integer "parent_id"
|
655
629
|
t.datetime "created_at"
|
656
630
|
t.datetime "updated_at"
|
657
|
-
t.integer
|
658
|
-
t.integer
|
659
|
-
t.integer
|
631
|
+
t.integer "lft"
|
632
|
+
t.integer "rgt"
|
633
|
+
t.integer "depth"
|
634
|
+
t.index ["message_request_id"], name: "index_messages_on_message_request_id"
|
635
|
+
t.index ["parent_id"], name: "index_messages_on_parent_id"
|
636
|
+
t.index ["receiver_id"], name: "index_messages_on_receiver_id"
|
637
|
+
t.index ["sender_id"], name: "index_messages_on_sender_id"
|
660
638
|
end
|
661
639
|
|
662
|
-
add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
|
663
|
-
add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
|
664
|
-
add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
|
665
|
-
add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
|
666
|
-
|
667
640
|
create_table "owns", force: :cascade do |t|
|
668
|
-
t.integer
|
669
|
-
t.integer
|
670
|
-
t.integer
|
641
|
+
t.integer "agent_id", null: false
|
642
|
+
t.integer "item_id", null: false
|
643
|
+
t.integer "position"
|
671
644
|
t.datetime "created_at"
|
672
645
|
t.datetime "updated_at"
|
646
|
+
t.index ["agent_id"], name: "index_owns_on_agent_id"
|
647
|
+
t.index ["item_id"], name: "index_owns_on_item_id"
|
673
648
|
end
|
674
649
|
|
675
|
-
add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
|
676
|
-
add_index "owns", ["item_id"], name: "index_owns_on_item_id"
|
677
|
-
|
678
650
|
create_table "picture_files", force: :cascade do |t|
|
679
|
-
t.integer
|
680
|
-
t.string
|
681
|
-
t.string
|
682
|
-
t.text
|
683
|
-
t.string
|
684
|
-
t.integer
|
651
|
+
t.integer "picture_attachable_id"
|
652
|
+
t.string "picture_attachable_type"
|
653
|
+
t.string "content_type"
|
654
|
+
t.text "title"
|
655
|
+
t.string "thumbnail"
|
656
|
+
t.integer "position"
|
685
657
|
t.datetime "created_at"
|
686
658
|
t.datetime "updated_at"
|
687
|
-
t.string
|
688
|
-
t.string
|
689
|
-
t.integer
|
659
|
+
t.string "picture_file_name"
|
660
|
+
t.string "picture_content_type"
|
661
|
+
t.integer "picture_file_size"
|
690
662
|
t.datetime "picture_updated_at"
|
691
|
-
t.text
|
692
|
-
t.string
|
693
|
-
t.integer
|
694
|
-
t.integer
|
663
|
+
t.text "picture_meta"
|
664
|
+
t.string "picture_fingerprint"
|
665
|
+
t.integer "picture_width"
|
666
|
+
t.integer "picture_height"
|
667
|
+
t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
695
668
|
end
|
696
669
|
|
697
|
-
add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
698
|
-
|
699
670
|
create_table "produce_types", force: :cascade do |t|
|
700
|
-
t.string
|
701
|
-
t.text
|
702
|
-
t.text
|
703
|
-
t.integer
|
671
|
+
t.string "name"
|
672
|
+
t.text "display_name"
|
673
|
+
t.text "note"
|
674
|
+
t.integer "position"
|
704
675
|
t.datetime "created_at"
|
705
676
|
t.datetime "updated_at"
|
706
677
|
end
|
707
678
|
|
708
679
|
create_table "produces", force: :cascade do |t|
|
709
|
-
t.integer
|
710
|
-
t.integer
|
711
|
-
t.integer
|
680
|
+
t.integer "agent_id", null: false
|
681
|
+
t.integer "manifestation_id", null: false
|
682
|
+
t.integer "position"
|
712
683
|
t.datetime "created_at"
|
713
684
|
t.datetime "updated_at"
|
714
|
-
t.integer
|
685
|
+
t.integer "produce_type_id"
|
686
|
+
t.index ["agent_id"], name: "index_produces_on_agent_id"
|
687
|
+
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
715
688
|
end
|
716
689
|
|
717
|
-
add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
|
718
|
-
add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
719
|
-
|
720
690
|
create_table "profiles", force: :cascade do |t|
|
721
|
-
t.integer
|
722
|
-
t.integer
|
723
|
-
t.integer
|
724
|
-
t.string
|
725
|
-
t.string
|
726
|
-
t.text
|
727
|
-
t.text
|
728
|
-
t.text
|
729
|
-
t.integer
|
691
|
+
t.integer "user_id"
|
692
|
+
t.integer "user_group_id"
|
693
|
+
t.integer "library_id"
|
694
|
+
t.string "locale"
|
695
|
+
t.string "user_number"
|
696
|
+
t.text "full_name"
|
697
|
+
t.text "note"
|
698
|
+
t.text "keyword_list"
|
699
|
+
t.integer "required_role_id"
|
730
700
|
t.datetime "created_at"
|
731
701
|
t.datetime "updated_at"
|
732
702
|
t.datetime "expired_at"
|
733
|
-
t.text
|
703
|
+
t.text "full_name_transcription"
|
734
704
|
t.datetime "date_of_birth"
|
705
|
+
t.index ["user_id"], name: "index_profiles_on_user_id"
|
706
|
+
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
735
707
|
end
|
736
708
|
|
737
|
-
add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
|
738
|
-
add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
|
739
|
-
|
740
709
|
create_table "realize_types", force: :cascade do |t|
|
741
|
-
t.string
|
742
|
-
t.text
|
743
|
-
t.text
|
744
|
-
t.integer
|
710
|
+
t.string "name"
|
711
|
+
t.text "display_name"
|
712
|
+
t.text "note"
|
713
|
+
t.integer "position"
|
745
714
|
t.datetime "created_at"
|
746
715
|
t.datetime "updated_at"
|
747
716
|
end
|
748
717
|
|
749
718
|
create_table "realizes", force: :cascade do |t|
|
750
|
-
t.integer
|
751
|
-
t.integer
|
752
|
-
t.integer
|
719
|
+
t.integer "agent_id", null: false
|
720
|
+
t.integer "expression_id", null: false
|
721
|
+
t.integer "position"
|
753
722
|
t.datetime "created_at"
|
754
723
|
t.datetime "updated_at"
|
755
|
-
t.integer
|
724
|
+
t.integer "realize_type_id"
|
725
|
+
t.index ["agent_id"], name: "index_realizes_on_agent_id"
|
726
|
+
t.index ["expression_id"], name: "index_realizes_on_expression_id"
|
756
727
|
end
|
757
728
|
|
758
|
-
add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
|
759
|
-
add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
|
760
|
-
|
761
729
|
create_table "request_status_types", force: :cascade do |t|
|
762
|
-
t.string
|
763
|
-
t.text
|
764
|
-
t.text
|
765
|
-
t.integer
|
730
|
+
t.string "name", null: false
|
731
|
+
t.text "display_name"
|
732
|
+
t.text "note"
|
733
|
+
t.integer "position"
|
766
734
|
t.datetime "created_at"
|
767
735
|
t.datetime "updated_at"
|
768
736
|
end
|
769
737
|
|
770
738
|
create_table "request_types", force: :cascade do |t|
|
771
|
-
t.string
|
772
|
-
t.text
|
773
|
-
t.text
|
774
|
-
t.integer
|
739
|
+
t.string "name", null: false
|
740
|
+
t.text "display_name"
|
741
|
+
t.text "note"
|
742
|
+
t.integer "position"
|
775
743
|
t.datetime "created_at"
|
776
744
|
t.datetime "updated_at"
|
777
745
|
end
|
778
746
|
|
779
747
|
create_table "resource_export_file_transitions", force: :cascade do |t|
|
780
|
-
t.string
|
781
|
-
t.text
|
782
|
-
t.integer
|
783
|
-
t.integer
|
748
|
+
t.string "to_state"
|
749
|
+
t.text "metadata", default: "{}"
|
750
|
+
t.integer "sort_key"
|
751
|
+
t.integer "resource_export_file_id"
|
784
752
|
t.datetime "created_at"
|
785
753
|
t.datetime "updated_at"
|
786
|
-
t.boolean
|
754
|
+
t.boolean "most_recent", null: false
|
755
|
+
t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
756
|
+
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
757
|
+
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
787
758
|
end
|
788
759
|
|
789
|
-
add_index "resource_export_file_transitions", ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true
|
790
|
-
add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
791
|
-
add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
792
|
-
|
793
760
|
create_table "resource_export_files", force: :cascade do |t|
|
794
|
-
t.integer
|
795
|
-
t.string
|
796
|
-
t.string
|
797
|
-
t.integer
|
761
|
+
t.integer "user_id"
|
762
|
+
t.string "resource_export_file_name"
|
763
|
+
t.string "resource_export_content_type"
|
764
|
+
t.integer "resource_export_file_size"
|
798
765
|
t.datetime "resource_export_updated_at"
|
799
766
|
t.datetime "executed_at"
|
800
767
|
t.datetime "created_at"
|
@@ -802,306 +769,289 @@ ActiveRecord::Schema.define(version: 20180107162711) do
|
|
802
769
|
end
|
803
770
|
|
804
771
|
create_table "resource_import_file_transitions", force: :cascade do |t|
|
805
|
-
t.string
|
806
|
-
t.text
|
807
|
-
t.integer
|
808
|
-
t.integer
|
772
|
+
t.string "to_state"
|
773
|
+
t.text "metadata", default: "{}"
|
774
|
+
t.integer "sort_key"
|
775
|
+
t.integer "resource_import_file_id"
|
809
776
|
t.datetime "created_at"
|
810
777
|
t.datetime "updated_at"
|
811
|
-
t.boolean
|
778
|
+
t.boolean "most_recent", null: false
|
779
|
+
t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
780
|
+
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
781
|
+
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
812
782
|
end
|
813
783
|
|
814
|
-
add_index "resource_import_file_transitions", ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true
|
815
|
-
add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
816
|
-
add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
817
|
-
|
818
784
|
create_table "resource_import_files", force: :cascade do |t|
|
819
|
-
t.integer
|
820
|
-
t.string
|
821
|
-
t.integer
|
822
|
-
t.integer
|
823
|
-
t.text
|
785
|
+
t.integer "parent_id"
|
786
|
+
t.string "content_type"
|
787
|
+
t.integer "size"
|
788
|
+
t.integer "user_id"
|
789
|
+
t.text "note"
|
824
790
|
t.datetime "executed_at"
|
825
|
-
t.string
|
826
|
-
t.string
|
827
|
-
t.integer
|
791
|
+
t.string "resource_import_file_name"
|
792
|
+
t.string "resource_import_content_type"
|
793
|
+
t.integer "resource_import_file_size"
|
828
794
|
t.datetime "resource_import_updated_at"
|
829
795
|
t.datetime "created_at"
|
830
796
|
t.datetime "updated_at"
|
831
|
-
t.string
|
832
|
-
t.string
|
833
|
-
t.text
|
834
|
-
t.string
|
835
|
-
t.integer
|
797
|
+
t.string "edit_mode"
|
798
|
+
t.string "resource_import_fingerprint"
|
799
|
+
t.text "error_message"
|
800
|
+
t.string "user_encoding"
|
801
|
+
t.integer "default_shelf_id"
|
802
|
+
t.index ["parent_id"], name: "index_resource_import_files_on_parent_id"
|
803
|
+
t.index ["user_id"], name: "index_resource_import_files_on_user_id"
|
836
804
|
end
|
837
805
|
|
838
|
-
add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
|
839
|
-
add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
|
840
|
-
|
841
806
|
create_table "resource_import_results", force: :cascade do |t|
|
842
|
-
t.integer
|
843
|
-
t.integer
|
844
|
-
t.integer
|
845
|
-
t.text
|
807
|
+
t.integer "resource_import_file_id"
|
808
|
+
t.integer "manifestation_id"
|
809
|
+
t.integer "item_id"
|
810
|
+
t.text "body"
|
846
811
|
t.datetime "created_at"
|
847
812
|
t.datetime "updated_at"
|
848
|
-
t.text
|
813
|
+
t.text "error_message"
|
814
|
+
t.index ["item_id"], name: "index_resource_import_results_on_item_id"
|
815
|
+
t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
816
|
+
t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
|
849
817
|
end
|
850
818
|
|
851
|
-
add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
|
852
|
-
add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
853
|
-
add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
|
854
|
-
|
855
819
|
create_table "roles", force: :cascade do |t|
|
856
|
-
t.string
|
857
|
-
t.string
|
858
|
-
t.text
|
820
|
+
t.string "name", null: false
|
821
|
+
t.string "display_name"
|
822
|
+
t.text "note"
|
859
823
|
t.datetime "created_at"
|
860
824
|
t.datetime "updated_at"
|
861
|
-
t.integer
|
862
|
-
t.integer
|
825
|
+
t.integer "score", default: 0, null: false
|
826
|
+
t.integer "position"
|
863
827
|
end
|
864
828
|
|
865
829
|
create_table "search_engines", force: :cascade do |t|
|
866
|
-
t.string
|
867
|
-
t.text
|
868
|
-
t.string
|
869
|
-
t.text
|
870
|
-
t.text
|
871
|
-
t.text
|
872
|
-
t.text
|
873
|
-
t.text
|
874
|
-
t.integer
|
830
|
+
t.string "name", null: false
|
831
|
+
t.text "display_name"
|
832
|
+
t.string "url", null: false
|
833
|
+
t.text "base_url", null: false
|
834
|
+
t.text "http_method", null: false
|
835
|
+
t.text "query_param", null: false
|
836
|
+
t.text "additional_param"
|
837
|
+
t.text "note"
|
838
|
+
t.integer "position"
|
875
839
|
t.datetime "created_at"
|
876
840
|
t.datetime "updated_at"
|
877
841
|
end
|
878
842
|
|
879
843
|
create_table "series_statement_merge_lists", force: :cascade do |t|
|
880
|
-
t.string
|
844
|
+
t.string "title"
|
881
845
|
t.datetime "created_at"
|
882
846
|
t.datetime "updated_at"
|
883
847
|
end
|
884
848
|
|
885
849
|
create_table "series_statement_merges", force: :cascade do |t|
|
886
|
-
t.integer
|
887
|
-
t.integer
|
850
|
+
t.integer "series_statement_id", null: false
|
851
|
+
t.integer "series_statement_merge_list_id", null: false
|
888
852
|
t.datetime "created_at"
|
889
853
|
t.datetime "updated_at"
|
854
|
+
t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
855
|
+
t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
890
856
|
end
|
891
857
|
|
892
|
-
add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
893
|
-
add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
894
|
-
|
895
858
|
create_table "series_statements", force: :cascade do |t|
|
896
|
-
t.text
|
897
|
-
t.text
|
898
|
-
t.text
|
899
|
-
t.text
|
900
|
-
t.integer
|
901
|
-
t.datetime "created_at"
|
902
|
-
t.datetime "updated_at"
|
903
|
-
t.text
|
904
|
-
t.text
|
905
|
-
t.string
|
906
|
-
t.integer
|
907
|
-
t.text
|
908
|
-
t.text
|
909
|
-
t.text
|
910
|
-
t.text
|
911
|
-
t.text
|
912
|
-
t.boolean
|
913
|
-
t.integer
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
|
859
|
+
t.text "original_title"
|
860
|
+
t.text "numbering"
|
861
|
+
t.text "title_subseries"
|
862
|
+
t.text "numbering_subseries"
|
863
|
+
t.integer "position"
|
864
|
+
t.datetime "created_at"
|
865
|
+
t.datetime "updated_at"
|
866
|
+
t.text "title_transcription"
|
867
|
+
t.text "title_alternative"
|
868
|
+
t.string "series_statement_identifier"
|
869
|
+
t.integer "manifestation_id"
|
870
|
+
t.text "note"
|
871
|
+
t.text "title_subseries_transcription"
|
872
|
+
t.text "creator_string"
|
873
|
+
t.text "volume_number_string"
|
874
|
+
t.text "volume_number_transcription_string"
|
875
|
+
t.boolean "series_master"
|
876
|
+
t.integer "root_manifestation_id"
|
877
|
+
t.index ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
|
878
|
+
t.index ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
|
879
|
+
t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
|
880
|
+
end
|
919
881
|
|
920
882
|
create_table "shelves", force: :cascade do |t|
|
921
|
-
t.string
|
922
|
-
t.text
|
923
|
-
t.text
|
924
|
-
t.integer
|
925
|
-
t.integer
|
926
|
-
t.integer
|
883
|
+
t.string "name", null: false
|
884
|
+
t.text "display_name"
|
885
|
+
t.text "note"
|
886
|
+
t.integer "library_id", null: false
|
887
|
+
t.integer "items_count", default: 0, null: false
|
888
|
+
t.integer "position"
|
927
889
|
t.datetime "created_at"
|
928
890
|
t.datetime "updated_at"
|
929
891
|
t.datetime "deleted_at"
|
930
|
-
t.boolean
|
892
|
+
t.boolean "closed", default: false, null: false
|
893
|
+
t.index ["library_id"], name: "index_shelves_on_library_id"
|
931
894
|
end
|
932
895
|
|
933
|
-
add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
|
934
|
-
|
935
896
|
create_table "subscribes", force: :cascade do |t|
|
936
|
-
t.integer
|
937
|
-
t.integer
|
938
|
-
t.datetime "start_at",
|
939
|
-
t.datetime "end_at",
|
897
|
+
t.integer "subscription_id", null: false
|
898
|
+
t.integer "work_id", null: false
|
899
|
+
t.datetime "start_at", null: false
|
900
|
+
t.datetime "end_at", null: false
|
940
901
|
t.datetime "created_at"
|
941
902
|
t.datetime "updated_at"
|
903
|
+
t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
904
|
+
t.index ["work_id"], name: "index_subscribes_on_work_id"
|
942
905
|
end
|
943
906
|
|
944
|
-
add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
945
|
-
add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
|
946
|
-
|
947
907
|
create_table "subscriptions", force: :cascade do |t|
|
948
|
-
t.text
|
949
|
-
t.text
|
950
|
-
t.integer
|
951
|
-
t.integer
|
908
|
+
t.text "title", null: false
|
909
|
+
t.text "note"
|
910
|
+
t.integer "user_id"
|
911
|
+
t.integer "order_list_id"
|
952
912
|
t.datetime "deleted_at"
|
953
|
-
t.integer
|
913
|
+
t.integer "subscribes_count", default: 0, null: false
|
954
914
|
t.datetime "created_at"
|
955
915
|
t.datetime "updated_at"
|
916
|
+
t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
917
|
+
t.index ["user_id"], name: "index_subscriptions_on_user_id"
|
956
918
|
end
|
957
919
|
|
958
|
-
add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
959
|
-
add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
|
960
|
-
|
961
920
|
create_table "user_export_file_transitions", force: :cascade do |t|
|
962
|
-
t.string
|
963
|
-
t.text
|
964
|
-
t.integer
|
965
|
-
t.integer
|
921
|
+
t.string "to_state"
|
922
|
+
t.text "metadata", default: "{}"
|
923
|
+
t.integer "sort_key"
|
924
|
+
t.integer "user_export_file_id"
|
966
925
|
t.datetime "created_at"
|
967
926
|
t.datetime "updated_at"
|
968
|
-
t.boolean
|
927
|
+
t.boolean "most_recent", null: false
|
928
|
+
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
929
|
+
t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
930
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
931
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
969
932
|
end
|
970
933
|
|
971
|
-
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
|
972
|
-
add_index "user_export_file_transitions", ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true
|
973
|
-
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
974
|
-
add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
975
|
-
|
976
934
|
create_table "user_export_files", force: :cascade do |t|
|
977
|
-
t.integer
|
978
|
-
t.string
|
979
|
-
t.string
|
980
|
-
t.integer
|
935
|
+
t.integer "user_id"
|
936
|
+
t.string "user_export_file_name"
|
937
|
+
t.string "user_export_content_type"
|
938
|
+
t.integer "user_export_file_size"
|
981
939
|
t.datetime "user_export_updated_at"
|
982
940
|
t.datetime "executed_at"
|
983
941
|
t.datetime "created_at"
|
984
942
|
t.datetime "updated_at"
|
943
|
+
t.index ["user_id"], name: "index_user_export_files_on_user_id"
|
985
944
|
end
|
986
945
|
|
987
|
-
add_index "user_export_files", ["user_id"], name: "index_user_export_files_on_user_id"
|
988
|
-
|
989
946
|
create_table "user_groups", force: :cascade do |t|
|
990
|
-
t.string
|
991
|
-
t.text
|
992
|
-
t.text
|
993
|
-
t.integer
|
947
|
+
t.string "name"
|
948
|
+
t.text "display_name"
|
949
|
+
t.text "note"
|
950
|
+
t.integer "position"
|
994
951
|
t.datetime "created_at"
|
995
952
|
t.datetime "updated_at"
|
996
953
|
t.datetime "deleted_at"
|
997
|
-
t.integer
|
954
|
+
t.integer "valid_period_for_new_user", default: 0, null: false
|
998
955
|
t.datetime "expired_at"
|
999
956
|
end
|
1000
957
|
|
1001
958
|
create_table "user_has_roles", force: :cascade do |t|
|
1002
|
-
t.integer
|
1003
|
-
t.integer
|
959
|
+
t.integer "user_id"
|
960
|
+
t.integer "role_id"
|
1004
961
|
t.datetime "created_at"
|
1005
962
|
t.datetime "updated_at"
|
963
|
+
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
964
|
+
t.index ["user_id"], name: "index_user_has_roles_on_user_id"
|
1006
965
|
end
|
1007
966
|
|
1008
|
-
add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
|
1009
|
-
add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
|
1010
|
-
|
1011
967
|
create_table "user_import_file_transitions", force: :cascade do |t|
|
1012
|
-
t.string
|
1013
|
-
t.text
|
1014
|
-
t.integer
|
1015
|
-
t.integer
|
968
|
+
t.string "to_state"
|
969
|
+
t.text "metadata", default: "{}"
|
970
|
+
t.integer "sort_key"
|
971
|
+
t.integer "user_import_file_id"
|
1016
972
|
t.datetime "created_at"
|
1017
973
|
t.datetime "updated_at"
|
1018
|
-
t.boolean
|
974
|
+
t.boolean "most_recent", null: false
|
975
|
+
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
976
|
+
t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
977
|
+
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1019
978
|
end
|
1020
979
|
|
1021
|
-
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
|
1022
|
-
add_index "user_import_file_transitions", ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true
|
1023
|
-
add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1024
|
-
|
1025
980
|
create_table "user_import_files", force: :cascade do |t|
|
1026
|
-
t.integer
|
1027
|
-
t.text
|
981
|
+
t.integer "user_id"
|
982
|
+
t.text "note"
|
1028
983
|
t.datetime "executed_at"
|
1029
|
-
t.string
|
1030
|
-
t.string
|
1031
|
-
t.integer
|
984
|
+
t.string "user_import_file_name"
|
985
|
+
t.string "user_import_content_type"
|
986
|
+
t.integer "user_import_file_size"
|
1032
987
|
t.datetime "user_import_updated_at"
|
1033
|
-
t.string
|
1034
|
-
t.string
|
1035
|
-
t.text
|
988
|
+
t.string "user_import_fingerprint"
|
989
|
+
t.string "edit_mode"
|
990
|
+
t.text "error_message"
|
1036
991
|
t.datetime "created_at"
|
1037
992
|
t.datetime "updated_at"
|
1038
|
-
t.string
|
1039
|
-
t.integer
|
1040
|
-
t.integer
|
993
|
+
t.string "user_encoding"
|
994
|
+
t.integer "default_library_id"
|
995
|
+
t.integer "default_user_group_id"
|
996
|
+
t.index ["user_id"], name: "index_user_import_files_on_user_id"
|
1041
997
|
end
|
1042
998
|
|
1043
|
-
add_index "user_import_files", ["user_id"], name: "index_user_import_files_on_user_id"
|
1044
|
-
|
1045
999
|
create_table "user_import_results", force: :cascade do |t|
|
1046
|
-
t.integer
|
1047
|
-
t.integer
|
1048
|
-
t.text
|
1000
|
+
t.integer "user_import_file_id"
|
1001
|
+
t.integer "user_id"
|
1002
|
+
t.text "body"
|
1049
1003
|
t.datetime "created_at"
|
1050
1004
|
t.datetime "updated_at"
|
1051
|
-
t.text
|
1005
|
+
t.text "error_message"
|
1006
|
+
t.index ["user_id"], name: "index_user_import_results_on_user_id"
|
1007
|
+
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1052
1008
|
end
|
1053
1009
|
|
1054
|
-
add_index "user_import_results", ["user_id"], name: "index_user_import_results_on_user_id"
|
1055
|
-
add_index "user_import_results", ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1056
|
-
|
1057
1010
|
create_table "users", force: :cascade do |t|
|
1058
|
-
t.string
|
1059
|
-
t.string
|
1060
|
-
t.string
|
1011
|
+
t.string "email", default: "", null: false
|
1012
|
+
t.string "encrypted_password", default: "", null: false
|
1013
|
+
t.string "reset_password_token"
|
1061
1014
|
t.datetime "reset_password_sent_at"
|
1062
1015
|
t.datetime "remember_created_at"
|
1063
|
-
t.integer
|
1016
|
+
t.integer "sign_in_count", default: 0
|
1064
1017
|
t.datetime "current_sign_in_at"
|
1065
1018
|
t.datetime "last_sign_in_at"
|
1066
|
-
t.string
|
1067
|
-
t.string
|
1019
|
+
t.string "current_sign_in_ip"
|
1020
|
+
t.string "last_sign_in_ip"
|
1068
1021
|
t.datetime "created_at"
|
1069
1022
|
t.datetime "updated_at"
|
1070
|
-
t.string
|
1023
|
+
t.string "username"
|
1071
1024
|
t.datetime "deleted_at"
|
1072
1025
|
t.datetime "expired_at"
|
1073
|
-
t.integer
|
1074
|
-
t.string
|
1026
|
+
t.integer "failed_attempts", default: 0
|
1027
|
+
t.string "unlock_token"
|
1075
1028
|
t.datetime "locked_at"
|
1076
1029
|
t.datetime "confirmed_at"
|
1030
|
+
t.index ["email"], name: "index_users_on_email"
|
1031
|
+
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1032
|
+
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1033
|
+
t.index ["username"], name: "index_users_on_username", unique: true
|
1077
1034
|
end
|
1078
1035
|
|
1079
|
-
add_index "users", ["email"], name: "index_users_on_email"
|
1080
|
-
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1081
|
-
add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1082
|
-
add_index "users", ["username"], name: "index_users_on_username", unique: true
|
1083
|
-
|
1084
1036
|
create_table "versions", force: :cascade do |t|
|
1085
|
-
t.string
|
1086
|
-
t.integer
|
1087
|
-
t.string
|
1088
|
-
t.string
|
1089
|
-
t.text
|
1037
|
+
t.string "item_type", null: false
|
1038
|
+
t.integer "item_id", null: false
|
1039
|
+
t.string "event", null: false
|
1040
|
+
t.string "whodunnit"
|
1041
|
+
t.text "object"
|
1090
1042
|
t.datetime "created_at"
|
1043
|
+
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
1091
1044
|
end
|
1092
1045
|
|
1093
|
-
add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
1094
|
-
|
1095
1046
|
create_table "withdraws", force: :cascade do |t|
|
1096
|
-
t.integer
|
1097
|
-
t.integer
|
1098
|
-
t.integer
|
1099
|
-
t.datetime "created_at",
|
1100
|
-
t.datetime "updated_at",
|
1047
|
+
t.integer "basket_id"
|
1048
|
+
t.integer "item_id"
|
1049
|
+
t.integer "librarian_id"
|
1050
|
+
t.datetime "created_at", null: false
|
1051
|
+
t.datetime "updated_at", null: false
|
1052
|
+
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
1053
|
+
t.index ["item_id"], name: "index_withdraws_on_item_id"
|
1054
|
+
t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
|
1101
1055
|
end
|
1102
1056
|
|
1103
|
-
add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
|
1104
|
-
add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
|
1105
|
-
add_index "withdraws", ["librarian_id"], name: "index_withdraws_on_librarian_id"
|
1106
|
-
|
1107
1057
|
end
|