enju_circulation 0.4.0.beta.4 → 0.4.0.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/models/carrier_type_has_checkout_type.rb +5 -5
- data/app/models/checked_item.rb +7 -7
- data/app/models/checkin.rb +7 -7
- data/app/models/checkout.rb +10 -10
- data/app/models/checkout_stat_has_manifestation.rb +5 -5
- data/app/models/checkout_stat_has_user.rb +5 -5
- data/app/models/checkout_type.rb +3 -3
- data/app/models/circulation_status.rb +3 -3
- data/app/models/concerns/enju_circulation/enju_item.rb +15 -2
- data/app/models/concerns/enju_circulation/enju_withdraw.rb +7 -1
- data/app/models/demand.rb +4 -4
- data/app/models/item_has_use_restriction.rb +5 -5
- data/app/models/manifestation_checkout_stat.rb +4 -14
- data/app/models/manifestation_checkout_stat_transition.rb +3 -3
- data/app/models/manifestation_reserve_stat.rb +4 -14
- data/app/models/manifestation_reserve_stat_transition.rb +3 -3
- data/app/models/reserve.rb +8 -17
- data/app/models/reserve_stat_has_manifestation.rb +5 -5
- data/app/models/reserve_stat_has_user.rb +5 -5
- data/app/models/reserve_transition.rb +3 -3
- data/app/models/use_restriction.rb +3 -3
- data/app/models/user_checkout_stat.rb +4 -14
- data/app/models/user_checkout_stat_transition.rb +3 -3
- data/app/models/user_group_has_checkout_type.rb +5 -5
- data/app/models/user_reserve_stat.rb +4 -14
- data/app/models/user_reserve_stat_transition.rb +3 -3
- data/app/views/checked_items/edit.html.erb +0 -5
- data/app/views/checkouts/_list.html.erb +7 -0
- data/app/views/user_group_has_checkout_types/index.html.erb +2 -2
- data/config/locales/translation_en.yml +12 -0
- data/config/locales/translation_ja.yml +12 -0
- data/db/migrate/032_create_checkins.rb +1 -1
- data/db/migrate/033_create_checkouts.rb +1 -1
- data/db/migrate/035_create_reserves.rb +2 -7
- data/db/migrate/121_create_checked_items.rb +1 -1
- data/db/migrate/127_create_use_restrictions.rb +1 -1
- data/db/migrate/129_create_item_has_use_restrictions.rb +1 -1
- data/db/migrate/132_create_circulation_statuses.rb +1 -1
- data/db/migrate/20081030023412_create_checkout_types.rb +1 -1
- data/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +1 -1
- data/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +1 -1
- data/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +1 -1
- data/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +1 -1
- data/db/migrate/20081215094302_create_user_checkout_stats.rb +1 -1
- data/db/migrate/20081215094955_create_checkout_stat_has_users.rb +1 -1
- data/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +1 -1
- data/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +1 -1
- data/db/migrate/20081220023628_create_user_reserve_stats.rb +1 -1
- data/db/migrate/20081220034117_create_reserve_stat_has_users.rb +1 -1
- data/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +1 -1
- data/db/migrate/20110301134521_add_expire_date_to_reserve.rb +1 -1
- data/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +1 -1
- data/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +1 -1
- data/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +4 -4
- data/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +1 -1
- data/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +1 -1
- data/db/migrate/20130303124821_add_retained_at_to_reserve.rb +1 -1
- data/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +1 -1
- data/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +1 -1
- data/db/migrate/20130519065638_add_lock_version_to_reserve.rb +1 -1
- data/db/migrate/20130519065837_add_lock_version_to_checkin.rb +1 -1
- data/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
- data/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
- data/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
- data/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
- data/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
- data/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +1 -1
- data/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +1 -1
- data/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +1 -1
- data/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +1 -1
- data/db/migrate/20141020120523_add_library_id_to_checkout.rb +1 -1
- data/db/migrate/20150106001709_create_demands.rb +1 -1
- data/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +1 -1
- data/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +1 -1
- data/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +1 -1
- data/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +1 -1
- data/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +1 -1
- data/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +1 -1
- data/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb +1 -1
- data/db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb +1 -1
- data/db/migrate/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb +1 -1
- data/db/migrate/20180107162029_add_constraints_to_most_recent_for_manifestation_checkout_stat_transitions.rb +1 -1
- data/db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb +1 -1
- data/db/migrate/20190713114724_add_checkout_id_to_checkin.rb +1 -1
- data/lib/enju_circulation/version.rb +1 -1
- data/spec/controllers/items_controller_spec.rb +34 -0
- data/spec/dummy/app/controllers/application_controller.rb +0 -1
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/models/user.rb +0 -1
- data/spec/dummy/config/application.rb +0 -1
- data/spec/dummy/db/migrate/001_create_agents.rb +1 -2
- data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -2
- data/spec/dummy/db/migrate/006_create_items.rb +1 -2
- data/spec/dummy/db/migrate/012_create_owns.rb +1 -3
- data/spec/dummy/db/migrate/015_create_creates.rb +1 -3
- data/spec/dummy/db/migrate/041_create_roles.rb +1 -1
- data/spec/dummy/db/migrate/047_create_produces.rb +1 -3
- data/spec/dummy/db/migrate/059_create_libraries.rb +1 -2
- data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
- data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -2
- data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
- data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
- data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
- data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -2
- data/spec/dummy/db/migrate/125_create_donates.rb +1 -1
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
- data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +1 -3
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -2
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +1 -1
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -1
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
- 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/20090720091106_create_medium_of_performances.rb +1 -1
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -1
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -2
- 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 +1 -1
- 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 +1 -1
- 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 +2 -6
- 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 +2 -6
- 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/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/20160319144230_create_issn_records.rb +11 -0
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
- 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/20170116134107_create_issn_record_and_manifestations.rb +11 -0
- data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
- 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 +1 -1
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20190102034126_create_doi_records.rb +13 -0
- data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +10 -0
- data/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
- data/spec/dummy/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/schema.rb +435 -354
- data/spec/dummy/private/system/carrier_types/attachments/000/000/001/original/book.png +0 -0
- data/spec/dummy/private/system/carrier_types/attachments/000/000/001/thumb/book.png +0 -0
- data/spec/dummy/private/system/resource_export_files/resource_exports/000/000/001/original/data +151 -0
- data/spec/dummy/private/system/resource_export_files/resource_exports/000/000/002/original/data +151 -0
- data/spec/dummy/private/system/resource_export_files/resource_exports/000/000/003/original/data +151 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/001/original/user_import_file_sample.tsv +10 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/002/original/user_delete_file.tsv +4 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/003/original/user_import_file_sample.tsv +10 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/004/original/user_delete_file.tsv +4 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/005/original/user_import_file_sample.tsv +10 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/006/original/user_delete_file.tsv +4 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/007/original/user_import_file_sample.tsv +10 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/008/original/user_delete_file.tsv +4 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/009/original/user_import_file_sample.tsv +10 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/010/original/user_delete_file.tsv +4 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/011/original/user_import_file_sample.tsv +10 -0
- data/spec/dummy/private/system/user_import_files/user_imports/000/000/012/original/user_delete_file.tsv +4 -0
- data/spec/factories/item.rb +3 -3
- data/spec/factories/reserve.rb +5 -1
- data/spec/fixtures/bookstores.yml +99 -0
- data/spec/fixtures/budget_types.yml +30 -0
- data/spec/fixtures/carrier_type_has_checkout_types.yml +5 -5
- data/spec/fixtures/checked_items.yml +7 -7
- data/spec/fixtures/checkins.yml +7 -7
- data/spec/fixtures/checkout_stat_has_manifestations.yml +5 -5
- data/spec/fixtures/checkout_stat_has_users.yml +5 -5
- data/spec/fixtures/checkout_types.yml +3 -3
- data/spec/fixtures/checkouts.yml +10 -10
- data/spec/fixtures/circulation_statuses.yml +3 -3
- data/spec/fixtures/demands.yml +4 -4
- data/spec/fixtures/events.yml +0 -9
- data/spec/fixtures/item_has_use_restrictions.yml +5 -5
- data/spec/fixtures/library_groups.yml +6 -11
- data/spec/fixtures/manifestation_checkout_stats.yml +4 -4
- data/spec/fixtures/manifestation_reserve_stats.yml +4 -4
- data/spec/fixtures/reserve_stat_has_manifestations.yml +5 -5
- data/spec/fixtures/reserve_stat_has_users.yml +5 -5
- data/spec/fixtures/reserve_transitions.yml +3 -3
- data/spec/fixtures/reserves.yml +7 -8
- data/spec/fixtures/use_restrictions.yml +3 -3
- data/spec/fixtures/user_checkout_stats.yml +4 -4
- data/spec/fixtures/user_group_has_checkout_types.yml +5 -5
- data/spec/fixtures/user_reserve_stats.yml +4 -4
- data/spec/models/carrier_type_has_checkout_type_spec.rb +5 -5
- data/spec/models/checked_item_spec.rb +7 -7
- data/spec/models/checkin_spec.rb +7 -7
- data/spec/models/checkout_spec.rb +10 -10
- data/spec/models/checkout_stat_has_manifestation_spec.rb +5 -5
- data/spec/models/checkout_stat_has_user_spec.rb +5 -5
- data/spec/models/checkout_type_spec.rb +3 -3
- data/spec/models/circulation_status_spec.rb +3 -3
- data/spec/models/manifestation_checkout_stat_spec.rb +4 -4
- data/spec/models/manifestation_reserve_stat_spec.rb +4 -4
- data/spec/models/manifestation_spec.rb +2 -2
- data/spec/models/reserve_spec.rb +7 -8
- data/spec/models/reserve_stat_has_manifestation_spec.rb +5 -5
- data/spec/models/reserve_stat_has_user_spec.rb +5 -5
- data/spec/models/user_checkout_stat_spec.rb +4 -4
- data/spec/models/user_group_has_checkout_type_spec.rb +5 -5
- data/spec/models/user_import_file_spec.rb +1 -1
- data/spec/models/user_reserve_stat_spec.rb +4 -4
- data/spec/models/withdraw_spec.rb +6 -4
- data/spec/policies/manifestation_policy_spec.rb +1 -2
- data/spec/rails_helper.rb +1 -4
- data/spec/system/items_spec.rb +21 -0
- metadata +72 -30
- data/spec/dummy/db/test.sqlite3 +0 -0
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,36 +10,37 @@
|
|
10
10
|
#
|
11
11
|
# It's strongly recommended that you check this file into your version control system.
|
12
12
|
|
13
|
-
ActiveRecord::Schema.define(version:
|
13
|
+
ActiveRecord::Schema.define(version: 2019_12_19_122214) do
|
14
14
|
|
15
15
|
# These are extensions that must be enabled in order to support this database
|
16
|
+
enable_extension "pgcrypto"
|
16
17
|
enable_extension "plpgsql"
|
17
18
|
|
18
|
-
create_table "accepts",
|
19
|
-
t.
|
20
|
-
t.
|
21
|
-
t.
|
22
|
-
t.datetime "created_at"
|
23
|
-
t.datetime "updated_at"
|
19
|
+
create_table "accepts", force: :cascade do |t|
|
20
|
+
t.bigint "basket_id"
|
21
|
+
t.bigint "item_id"
|
22
|
+
t.bigint "librarian_id"
|
23
|
+
t.datetime "created_at", null: false
|
24
|
+
t.datetime "updated_at", null: false
|
24
25
|
t.index ["basket_id"], name: "index_accepts_on_basket_id"
|
25
26
|
t.index ["item_id"], name: "index_accepts_on_item_id"
|
26
27
|
t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
|
27
28
|
end
|
28
29
|
|
29
|
-
create_table "agent_import_file_transitions",
|
30
|
+
create_table "agent_import_file_transitions", force: :cascade do |t|
|
30
31
|
t.string "to_state"
|
31
32
|
t.text "metadata", default: "{}"
|
32
33
|
t.integer "sort_key"
|
33
34
|
t.integer "agent_import_file_id"
|
34
|
-
t.datetime "created_at"
|
35
|
-
t.datetime "updated_at"
|
35
|
+
t.datetime "created_at", null: false
|
36
|
+
t.datetime "updated_at", null: false
|
36
37
|
t.boolean "most_recent", null: false
|
37
38
|
t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
38
39
|
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
39
40
|
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
40
41
|
end
|
41
42
|
|
42
|
-
create_table "agent_import_files",
|
43
|
+
create_table "agent_import_files", force: :cascade do |t|
|
43
44
|
t.integer "parent_id"
|
44
45
|
t.string "content_type"
|
45
46
|
t.integer "size"
|
@@ -50,8 +51,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
50
51
|
t.string "agent_import_content_type"
|
51
52
|
t.integer "agent_import_file_size"
|
52
53
|
t.datetime "agent_import_updated_at"
|
53
|
-
t.datetime "created_at"
|
54
|
-
t.datetime "updated_at"
|
54
|
+
t.datetime "created_at", null: false
|
55
|
+
t.datetime "updated_at", null: false
|
55
56
|
t.string "agent_import_fingerprint"
|
56
57
|
t.text "error_message"
|
57
58
|
t.string "edit_mode"
|
@@ -60,61 +61,61 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
60
61
|
t.index ["user_id"], name: "index_agent_import_files_on_user_id"
|
61
62
|
end
|
62
63
|
|
63
|
-
create_table "agent_import_results",
|
64
|
+
create_table "agent_import_results", force: :cascade do |t|
|
64
65
|
t.integer "agent_import_file_id"
|
65
66
|
t.integer "agent_id"
|
66
67
|
t.text "body"
|
67
|
-
t.datetime "created_at"
|
68
|
-
t.datetime "updated_at"
|
68
|
+
t.datetime "created_at", null: false
|
69
|
+
t.datetime "updated_at", null: false
|
69
70
|
end
|
70
71
|
|
71
|
-
create_table "agent_merge_lists",
|
72
|
+
create_table "agent_merge_lists", force: :cascade do |t|
|
72
73
|
t.string "title"
|
73
|
-
t.datetime "created_at"
|
74
|
-
t.datetime "updated_at"
|
74
|
+
t.datetime "created_at", null: false
|
75
|
+
t.datetime "updated_at", null: false
|
75
76
|
end
|
76
77
|
|
77
|
-
create_table "agent_merges",
|
78
|
+
create_table "agent_merges", force: :cascade do |t|
|
78
79
|
t.integer "agent_id", null: false
|
79
80
|
t.integer "agent_merge_list_id", null: false
|
80
|
-
t.datetime "created_at"
|
81
|
-
t.datetime "updated_at"
|
81
|
+
t.datetime "created_at", null: false
|
82
|
+
t.datetime "updated_at", null: false
|
82
83
|
t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
|
83
84
|
t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
84
85
|
end
|
85
86
|
|
86
|
-
create_table "agent_relationship_types",
|
87
|
+
create_table "agent_relationship_types", force: :cascade do |t|
|
87
88
|
t.string "name", null: false
|
88
89
|
t.text "display_name"
|
89
90
|
t.text "note"
|
90
91
|
t.integer "position"
|
91
|
-
t.datetime "created_at"
|
92
|
-
t.datetime "updated_at"
|
92
|
+
t.datetime "created_at", null: false
|
93
|
+
t.datetime "updated_at", null: false
|
93
94
|
t.jsonb "display_name_translations", default: {}, null: false
|
94
95
|
end
|
95
96
|
|
96
|
-
create_table "agent_relationships",
|
97
|
+
create_table "agent_relationships", force: :cascade do |t|
|
97
98
|
t.integer "parent_id"
|
98
99
|
t.integer "child_id"
|
99
100
|
t.integer "agent_relationship_type_id"
|
100
|
-
t.datetime "created_at"
|
101
|
-
t.datetime "updated_at"
|
101
|
+
t.datetime "created_at", null: false
|
102
|
+
t.datetime "updated_at", null: false
|
102
103
|
t.integer "position"
|
103
104
|
t.index ["child_id"], name: "index_agent_relationships_on_child_id"
|
104
105
|
t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
105
106
|
end
|
106
107
|
|
107
|
-
create_table "agent_types",
|
108
|
+
create_table "agent_types", force: :cascade do |t|
|
108
109
|
t.string "name", null: false
|
109
110
|
t.text "display_name"
|
110
111
|
t.text "note"
|
111
112
|
t.integer "position"
|
112
|
-
t.datetime "created_at"
|
113
|
-
t.datetime "updated_at"
|
113
|
+
t.datetime "created_at", null: false
|
114
|
+
t.datetime "updated_at", null: false
|
114
115
|
t.jsonb "display_name_translations", default: {}, null: false
|
115
116
|
end
|
116
117
|
|
117
|
-
create_table "agents",
|
118
|
+
create_table "agents", force: :cascade do |t|
|
118
119
|
t.string "last_name"
|
119
120
|
t.string "middle_name"
|
120
121
|
t.string "first_name"
|
@@ -126,9 +127,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
126
127
|
t.string "full_name"
|
127
128
|
t.text "full_name_transcription"
|
128
129
|
t.text "full_name_alternative"
|
129
|
-
t.datetime "created_at"
|
130
|
-
t.datetime "updated_at"
|
131
|
-
t.datetime "deleted_at"
|
130
|
+
t.datetime "created_at", null: false
|
131
|
+
t.datetime "updated_at", null: false
|
132
132
|
t.string "zip_code_1"
|
133
133
|
t.string "zip_code_2"
|
134
134
|
t.text "address_1"
|
@@ -169,16 +169,16 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
169
169
|
t.index ["required_role_id"], name: "index_agents_on_required_role_id"
|
170
170
|
end
|
171
171
|
|
172
|
-
create_table "baskets",
|
173
|
-
t.
|
172
|
+
create_table "baskets", force: :cascade do |t|
|
173
|
+
t.bigint "user_id"
|
174
174
|
t.text "note"
|
175
175
|
t.integer "lock_version", default: 0, null: false
|
176
|
-
t.datetime "created_at"
|
177
|
-
t.datetime "updated_at"
|
176
|
+
t.datetime "created_at", null: false
|
177
|
+
t.datetime "updated_at", null: false
|
178
178
|
t.index ["user_id"], name: "index_baskets_on_user_id"
|
179
179
|
end
|
180
180
|
|
181
|
-
create_table "bookstores",
|
181
|
+
create_table "bookstores", force: :cascade do |t|
|
182
182
|
t.text "name", null: false
|
183
183
|
t.string "zip_code"
|
184
184
|
t.text "address"
|
@@ -187,39 +187,38 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
187
187
|
t.string "fax_number"
|
188
188
|
t.string "url"
|
189
189
|
t.integer "position"
|
190
|
-
t.datetime "
|
191
|
-
t.datetime "
|
192
|
-
t.datetime "updated_at"
|
190
|
+
t.datetime "created_at", null: false
|
191
|
+
t.datetime "updated_at", null: false
|
193
192
|
end
|
194
193
|
|
195
|
-
create_table "budget_types",
|
194
|
+
create_table "budget_types", force: :cascade do |t|
|
196
195
|
t.string "name"
|
197
196
|
t.text "display_name"
|
198
197
|
t.text "note"
|
199
198
|
t.integer "position"
|
200
|
-
t.datetime "created_at"
|
201
|
-
t.datetime "updated_at"
|
199
|
+
t.datetime "created_at", null: false
|
200
|
+
t.datetime "updated_at", null: false
|
202
201
|
t.jsonb "display_name_translations", default: {}, null: false
|
203
202
|
end
|
204
203
|
|
205
|
-
create_table "carrier_type_has_checkout_types",
|
206
|
-
t.
|
207
|
-
t.
|
204
|
+
create_table "carrier_type_has_checkout_types", force: :cascade do |t|
|
205
|
+
t.bigint "carrier_type_id", null: false
|
206
|
+
t.bigint "checkout_type_id", null: false
|
208
207
|
t.text "note"
|
209
208
|
t.integer "position"
|
210
|
-
t.datetime "created_at"
|
211
|
-
t.datetime "updated_at"
|
209
|
+
t.datetime "created_at", null: false
|
210
|
+
t.datetime "updated_at", null: false
|
212
211
|
t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
|
213
212
|
t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
214
213
|
end
|
215
214
|
|
216
|
-
create_table "carrier_types",
|
215
|
+
create_table "carrier_types", force: :cascade do |t|
|
217
216
|
t.string "name", null: false
|
218
217
|
t.text "display_name"
|
219
218
|
t.text "note"
|
220
219
|
t.integer "position"
|
221
|
-
t.datetime "created_at"
|
222
|
-
t.datetime "updated_at"
|
220
|
+
t.datetime "created_at", null: false
|
221
|
+
t.datetime "updated_at", null: false
|
223
222
|
t.string "attachment_file_name"
|
224
223
|
t.string "attachment_content_type"
|
225
224
|
t.bigint "attachment_file_size"
|
@@ -227,78 +226,78 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
227
226
|
t.jsonb "display_name_translations", default: {}, null: false
|
228
227
|
end
|
229
228
|
|
230
|
-
create_table "checked_items",
|
231
|
-
t.
|
232
|
-
t.
|
233
|
-
t.
|
229
|
+
create_table "checked_items", force: :cascade do |t|
|
230
|
+
t.bigint "item_id", null: false
|
231
|
+
t.bigint "basket_id", null: false
|
232
|
+
t.bigint "librarian_id"
|
234
233
|
t.datetime "due_date", null: false
|
235
|
-
t.datetime "created_at"
|
236
|
-
t.datetime "updated_at"
|
237
|
-
t.
|
234
|
+
t.datetime "created_at", null: false
|
235
|
+
t.datetime "updated_at", null: false
|
236
|
+
t.bigint "user_id"
|
238
237
|
t.index ["basket_id"], name: "index_checked_items_on_basket_id"
|
239
238
|
t.index ["item_id"], name: "index_checked_items_on_item_id"
|
240
239
|
t.index ["librarian_id"], name: "index_checked_items_on_librarian_id"
|
241
240
|
t.index ["user_id"], name: "index_checked_items_on_user_id"
|
242
241
|
end
|
243
242
|
|
244
|
-
create_table "checkins",
|
245
|
-
t.
|
246
|
-
t.
|
247
|
-
t.
|
248
|
-
t.datetime "created_at"
|
249
|
-
t.datetime "updated_at"
|
243
|
+
create_table "checkins", force: :cascade do |t|
|
244
|
+
t.bigint "item_id", null: false
|
245
|
+
t.bigint "librarian_id"
|
246
|
+
t.bigint "basket_id"
|
247
|
+
t.datetime "created_at", null: false
|
248
|
+
t.datetime "updated_at", null: false
|
250
249
|
t.integer "lock_version", default: 0, null: false
|
251
|
-
t.bigint "
|
250
|
+
t.bigint "checkout_id"
|
252
251
|
t.index ["basket_id"], name: "index_checkins_on_basket_id"
|
253
|
-
t.index ["
|
252
|
+
t.index ["checkout_id"], name: "index_checkins_on_checkout_id"
|
254
253
|
t.index ["item_id"], name: "index_checkins_on_item_id"
|
255
254
|
t.index ["librarian_id"], name: "index_checkins_on_librarian_id"
|
256
255
|
end
|
257
256
|
|
258
|
-
create_table "checkout_stat_has_manifestations",
|
259
|
-
t.
|
260
|
-
t.
|
257
|
+
create_table "checkout_stat_has_manifestations", force: :cascade do |t|
|
258
|
+
t.bigint "manifestation_checkout_stat_id", null: false
|
259
|
+
t.bigint "manifestation_id", null: false
|
261
260
|
t.integer "checkouts_count"
|
262
|
-
t.datetime "created_at"
|
263
|
-
t.datetime "updated_at"
|
261
|
+
t.datetime "created_at", null: false
|
262
|
+
t.datetime "updated_at", null: false
|
264
263
|
t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
265
264
|
t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
|
266
265
|
end
|
267
266
|
|
268
|
-
create_table "checkout_stat_has_users",
|
269
|
-
t.
|
270
|
-
t.
|
267
|
+
create_table "checkout_stat_has_users", force: :cascade do |t|
|
268
|
+
t.bigint "user_checkout_stat_id", null: false
|
269
|
+
t.bigint "user_id", null: false
|
271
270
|
t.integer "checkouts_count", default: 0, null: false
|
272
|
-
t.datetime "created_at"
|
273
|
-
t.datetime "updated_at"
|
271
|
+
t.datetime "created_at", null: false
|
272
|
+
t.datetime "updated_at", null: false
|
274
273
|
t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
275
274
|
t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
|
276
275
|
end
|
277
276
|
|
278
|
-
create_table "checkout_types",
|
277
|
+
create_table "checkout_types", force: :cascade do |t|
|
279
278
|
t.string "name", null: false
|
280
279
|
t.text "display_name"
|
281
280
|
t.text "note"
|
282
281
|
t.integer "position"
|
283
|
-
t.datetime "created_at"
|
284
|
-
t.datetime "updated_at"
|
282
|
+
t.datetime "created_at", null: false
|
283
|
+
t.datetime "updated_at", null: false
|
285
284
|
t.jsonb "display_name_translations", default: {}, null: false
|
286
285
|
t.index ["name"], name: "index_checkout_types_on_name"
|
287
286
|
end
|
288
287
|
|
289
|
-
create_table "checkouts",
|
290
|
-
t.
|
291
|
-
t.
|
292
|
-
t.
|
293
|
-
t.
|
294
|
-
t.
|
288
|
+
create_table "checkouts", force: :cascade do |t|
|
289
|
+
t.bigint "user_id"
|
290
|
+
t.bigint "item_id", null: false
|
291
|
+
t.bigint "checkin_id"
|
292
|
+
t.bigint "librarian_id"
|
293
|
+
t.bigint "basket_id"
|
295
294
|
t.datetime "due_date"
|
296
295
|
t.integer "checkout_renewal_count", default: 0, null: false
|
297
296
|
t.integer "lock_version", default: 0, null: false
|
298
|
-
t.datetime "created_at"
|
299
|
-
t.datetime "updated_at"
|
300
|
-
t.
|
301
|
-
t.
|
297
|
+
t.datetime "created_at", null: false
|
298
|
+
t.datetime "updated_at", null: false
|
299
|
+
t.bigint "shelf_id"
|
300
|
+
t.bigint "library_id"
|
302
301
|
t.index ["basket_id"], name: "index_checkouts_on_basket_id"
|
303
302
|
t.index ["checkin_id"], name: "index_checkouts_on_checkin_id"
|
304
303
|
t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
|
@@ -309,37 +308,37 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
309
308
|
t.index ["user_id"], name: "index_checkouts_on_user_id"
|
310
309
|
end
|
311
310
|
|
312
|
-
create_table "circulation_statuses",
|
311
|
+
create_table "circulation_statuses", force: :cascade do |t|
|
313
312
|
t.string "name", null: false
|
314
313
|
t.text "display_name"
|
315
314
|
t.text "note"
|
316
315
|
t.integer "position"
|
317
|
-
t.datetime "created_at"
|
318
|
-
t.datetime "updated_at"
|
316
|
+
t.datetime "created_at", null: false
|
317
|
+
t.datetime "updated_at", null: false
|
319
318
|
t.jsonb "display_name_translations", default: {}, null: false
|
320
319
|
end
|
321
320
|
|
322
|
-
create_table "colors",
|
323
|
-
t.
|
321
|
+
create_table "colors", force: :cascade do |t|
|
322
|
+
t.bigint "library_group_id"
|
324
323
|
t.string "property"
|
325
324
|
t.string "code"
|
326
325
|
t.integer "position"
|
327
|
-
t.datetime "created_at"
|
328
|
-
t.datetime "updated_at"
|
326
|
+
t.datetime "created_at", null: false
|
327
|
+
t.datetime "updated_at", null: false
|
329
328
|
t.index ["library_group_id"], name: "index_colors_on_library_group_id"
|
330
329
|
end
|
331
330
|
|
332
|
-
create_table "content_types",
|
331
|
+
create_table "content_types", force: :cascade do |t|
|
333
332
|
t.string "name", null: false
|
334
333
|
t.text "display_name"
|
335
334
|
t.text "note"
|
336
335
|
t.integer "position"
|
337
|
-
t.datetime "created_at"
|
338
|
-
t.datetime "updated_at"
|
336
|
+
t.datetime "created_at", null: false
|
337
|
+
t.datetime "updated_at", null: false
|
339
338
|
t.jsonb "display_name_translations", default: {}, null: false
|
340
339
|
end
|
341
340
|
|
342
|
-
create_table "countries",
|
341
|
+
create_table "countries", force: :cascade do |t|
|
343
342
|
t.string "name", null: false
|
344
343
|
t.text "display_name"
|
345
344
|
t.string "alpha_2"
|
@@ -353,31 +352,40 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
353
352
|
t.index ["numeric_3"], name: "index_countries_on_numeric_3"
|
354
353
|
end
|
355
354
|
|
356
|
-
create_table "create_types",
|
355
|
+
create_table "create_types", force: :cascade do |t|
|
357
356
|
t.string "name"
|
358
357
|
t.text "display_name"
|
359
358
|
t.text "note"
|
360
359
|
t.integer "position"
|
361
|
-
t.datetime "created_at"
|
362
|
-
t.datetime "updated_at"
|
360
|
+
t.datetime "created_at", null: false
|
361
|
+
t.datetime "updated_at", null: false
|
363
362
|
t.jsonb "display_name_translations", default: {}, null: false
|
364
363
|
end
|
365
364
|
|
366
|
-
create_table "creates",
|
367
|
-
t.
|
368
|
-
t.
|
365
|
+
create_table "creates", force: :cascade do |t|
|
366
|
+
t.bigint "agent_id", null: false
|
367
|
+
t.bigint "work_id", null: false
|
369
368
|
t.integer "position"
|
370
|
-
t.datetime "created_at"
|
371
|
-
t.datetime "updated_at"
|
369
|
+
t.datetime "created_at", null: false
|
370
|
+
t.datetime "updated_at", null: false
|
372
371
|
t.integer "create_type_id"
|
373
372
|
t.index ["agent_id"], name: "index_creates_on_agent_id"
|
374
373
|
t.index ["work_id"], name: "index_creates_on_work_id"
|
375
374
|
end
|
376
375
|
|
377
|
-
create_table "
|
378
|
-
t.integer "
|
379
|
-
t.
|
380
|
-
t.
|
376
|
+
create_table "custom_properties", force: :cascade do |t|
|
377
|
+
t.integer "resource_id", null: false
|
378
|
+
t.string "resource_type", null: false
|
379
|
+
t.text "label", null: false
|
380
|
+
t.text "value"
|
381
|
+
t.datetime "created_at", null: false
|
382
|
+
t.datetime "updated_at", null: false
|
383
|
+
end
|
384
|
+
|
385
|
+
create_table "demands", force: :cascade do |t|
|
386
|
+
t.bigint "user_id"
|
387
|
+
t.bigint "item_id"
|
388
|
+
t.bigint "message_id"
|
381
389
|
t.datetime "created_at", null: false
|
382
390
|
t.datetime "updated_at", null: false
|
383
391
|
t.index ["item_id"], name: "index_demands_on_item_id"
|
@@ -385,11 +393,23 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
385
393
|
t.index ["user_id"], name: "index_demands_on_user_id"
|
386
394
|
end
|
387
395
|
|
388
|
-
create_table "
|
396
|
+
create_table "doi_records", force: :cascade do |t|
|
397
|
+
t.string "body", null: false
|
398
|
+
t.string "display_body", null: false
|
399
|
+
t.string "source"
|
400
|
+
t.jsonb "response", default: {}, null: false
|
401
|
+
t.bigint "manifestation_id", null: false
|
402
|
+
t.datetime "created_at", null: false
|
403
|
+
t.datetime "updated_at", null: false
|
404
|
+
t.index ["body"], name: "index_doi_records_on_body", unique: true
|
405
|
+
t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id"
|
406
|
+
end
|
407
|
+
|
408
|
+
create_table "donates", force: :cascade do |t|
|
389
409
|
t.integer "agent_id", null: false
|
390
410
|
t.integer "item_id", null: false
|
391
|
-
t.datetime "created_at"
|
392
|
-
t.datetime "updated_at"
|
411
|
+
t.datetime "created_at", null: false
|
412
|
+
t.datetime "updated_at", null: false
|
393
413
|
t.index ["agent_id"], name: "index_donates_on_agent_id"
|
394
414
|
t.index ["item_id"], name: "index_donates_on_item_id"
|
395
415
|
end
|
@@ -502,86 +522,123 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
502
522
|
t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
|
503
523
|
end
|
504
524
|
|
505
|
-
create_table "form_of_works",
|
525
|
+
create_table "form_of_works", force: :cascade do |t|
|
506
526
|
t.string "name", null: false
|
507
527
|
t.text "display_name"
|
508
528
|
t.text "note"
|
509
529
|
t.integer "position"
|
510
|
-
t.datetime "created_at"
|
511
|
-
t.datetime "updated_at"
|
530
|
+
t.datetime "created_at", null: false
|
531
|
+
t.datetime "updated_at", null: false
|
512
532
|
t.jsonb "display_name_translations", default: {}, null: false
|
513
533
|
end
|
514
534
|
|
515
|
-
create_table "frequencies",
|
535
|
+
create_table "frequencies", force: :cascade do |t|
|
516
536
|
t.string "name", null: false
|
517
537
|
t.text "display_name"
|
518
538
|
t.text "note"
|
519
539
|
t.integer "position"
|
520
|
-
t.datetime "created_at"
|
521
|
-
t.datetime "updated_at"
|
540
|
+
t.datetime "created_at", null: false
|
541
|
+
t.datetime "updated_at", null: false
|
522
542
|
t.jsonb "display_name_translations", default: {}, null: false
|
523
543
|
end
|
524
544
|
|
525
|
-
create_table "identifier_types",
|
545
|
+
create_table "identifier_types", force: :cascade do |t|
|
526
546
|
t.string "name"
|
527
547
|
t.text "display_name"
|
528
548
|
t.text "note"
|
529
549
|
t.integer "position"
|
530
|
-
t.datetime "created_at"
|
531
|
-
t.datetime "updated_at"
|
550
|
+
t.datetime "created_at", null: false
|
551
|
+
t.datetime "updated_at", null: false
|
532
552
|
end
|
533
553
|
|
534
|
-
create_table "identifiers",
|
554
|
+
create_table "identifiers", force: :cascade do |t|
|
535
555
|
t.string "body", null: false
|
536
556
|
t.integer "identifier_type_id", null: false
|
537
557
|
t.integer "manifestation_id"
|
538
558
|
t.boolean "primary"
|
539
559
|
t.integer "position"
|
540
|
-
t.datetime "created_at"
|
541
|
-
t.datetime "updated_at"
|
560
|
+
t.datetime "created_at", null: false
|
561
|
+
t.datetime "updated_at", null: false
|
542
562
|
t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
543
563
|
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
544
564
|
end
|
545
565
|
|
546
|
-
create_table "import_request_transitions",
|
566
|
+
create_table "import_request_transitions", force: :cascade do |t|
|
547
567
|
t.string "to_state"
|
548
568
|
t.text "metadata", default: "{}"
|
549
569
|
t.integer "sort_key"
|
550
570
|
t.integer "import_request_id"
|
551
|
-
t.datetime "created_at"
|
552
|
-
t.datetime "updated_at"
|
571
|
+
t.datetime "created_at", null: false
|
572
|
+
t.datetime "updated_at", null: false
|
553
573
|
t.boolean "most_recent", null: false
|
554
574
|
t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
555
575
|
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
556
576
|
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
557
577
|
end
|
558
578
|
|
559
|
-
create_table "import_requests",
|
579
|
+
create_table "import_requests", force: :cascade do |t|
|
560
580
|
t.string "isbn"
|
561
581
|
t.integer "manifestation_id"
|
562
582
|
t.integer "user_id"
|
563
|
-
t.datetime "created_at"
|
564
|
-
t.datetime "updated_at"
|
583
|
+
t.datetime "created_at", null: false
|
584
|
+
t.datetime "updated_at", null: false
|
565
585
|
t.index ["isbn"], name: "index_import_requests_on_isbn"
|
566
586
|
t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
567
587
|
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
568
588
|
end
|
569
589
|
|
570
|
-
create_table "
|
571
|
-
t.
|
572
|
-
t.
|
573
|
-
t.
|
574
|
-
t.datetime "
|
590
|
+
create_table "isbn_record_and_manifestations", force: :cascade do |t|
|
591
|
+
t.bigint "isbn_record_id", null: false
|
592
|
+
t.bigint "manifestation_id", null: false
|
593
|
+
t.integer "position"
|
594
|
+
t.datetime "created_at", null: false
|
595
|
+
t.datetime "updated_at", null: false
|
596
|
+
t.index ["isbn_record_id"], name: "index_isbn_record_and_manifestations_on_isbn_record_id"
|
597
|
+
t.index ["manifestation_id"], name: "index_isbn_record_and_manifestations_on_manifestation_id"
|
598
|
+
end
|
599
|
+
|
600
|
+
create_table "isbn_records", force: :cascade do |t|
|
601
|
+
t.string "body", null: false
|
602
|
+
t.string "isbn_type"
|
603
|
+
t.string "source"
|
604
|
+
t.datetime "created_at", null: false
|
605
|
+
t.datetime "updated_at", null: false
|
606
|
+
t.index ["body"], name: "index_isbn_records_on_body", unique: true
|
607
|
+
end
|
608
|
+
|
609
|
+
create_table "issn_record_and_manifestations", force: :cascade do |t|
|
610
|
+
t.bigint "issn_record_id", null: false
|
611
|
+
t.bigint "manifestation_id", null: false
|
612
|
+
t.integer "position"
|
613
|
+
t.datetime "created_at", null: false
|
614
|
+
t.datetime "updated_at", null: false
|
615
|
+
t.index ["issn_record_id"], name: "index_issn_record_and_manifestations_on_issn_record_id"
|
616
|
+
t.index ["manifestation_id"], name: "index_issn_record_and_manifestations_on_manifestation_id"
|
617
|
+
end
|
618
|
+
|
619
|
+
create_table "issn_records", force: :cascade do |t|
|
620
|
+
t.string "body", null: false
|
621
|
+
t.string "issn_type"
|
622
|
+
t.string "source"
|
623
|
+
t.datetime "created_at", null: false
|
624
|
+
t.datetime "updated_at", null: false
|
625
|
+
t.index ["body"], name: "index_issn_records_on_body", unique: true
|
626
|
+
end
|
627
|
+
|
628
|
+
create_table "item_has_use_restrictions", force: :cascade do |t|
|
629
|
+
t.bigint "item_id", null: false
|
630
|
+
t.bigint "use_restriction_id", null: false
|
631
|
+
t.datetime "created_at", null: false
|
632
|
+
t.datetime "updated_at", null: false
|
575
633
|
t.index ["item_id"], name: "index_item_has_use_restrictions_on_item_id"
|
576
634
|
t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
|
577
635
|
end
|
578
636
|
|
579
|
-
create_table "items",
|
637
|
+
create_table "items", force: :cascade do |t|
|
580
638
|
t.string "call_number"
|
581
639
|
t.string "item_identifier"
|
582
|
-
t.datetime "created_at"
|
583
|
-
t.datetime "updated_at"
|
584
|
-
t.datetime "deleted_at"
|
640
|
+
t.datetime "created_at", null: false
|
641
|
+
t.datetime "updated_at", null: false
|
585
642
|
t.integer "shelf_id", default: 1, null: false
|
586
643
|
t.boolean "include_supplements", default: false, null: false
|
587
644
|
t.text "note"
|
@@ -610,7 +667,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
610
667
|
t.index ["shelf_id"], name: "index_items_on_shelf_id"
|
611
668
|
end
|
612
669
|
|
613
|
-
create_table "languages",
|
670
|
+
create_table "languages", force: :cascade do |t|
|
614
671
|
t.string "name", null: false
|
615
672
|
t.string "native_name"
|
616
673
|
t.text "display_name"
|
@@ -626,7 +683,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
626
683
|
t.index ["name"], name: "index_languages_on_name", unique: true
|
627
684
|
end
|
628
685
|
|
629
|
-
create_table "libraries",
|
686
|
+
create_table "libraries", force: :cascade do |t|
|
630
687
|
t.string "name", null: false
|
631
688
|
t.text "display_name"
|
632
689
|
t.string "short_display_name", null: false
|
@@ -640,23 +697,23 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
640
697
|
t.text "note"
|
641
698
|
t.integer "call_number_rows", default: 1, null: false
|
642
699
|
t.string "call_number_delimiter", default: "|", null: false
|
643
|
-
t.
|
700
|
+
t.bigint "library_group_id", null: false
|
644
701
|
t.integer "users_count", default: 0, null: false
|
645
702
|
t.integer "position"
|
646
|
-
t.
|
647
|
-
t.datetime "created_at"
|
648
|
-
t.datetime "updated_at"
|
649
|
-
t.datetime "deleted_at"
|
703
|
+
t.bigint "country_id"
|
704
|
+
t.datetime "created_at", null: false
|
705
|
+
t.datetime "updated_at", null: false
|
650
706
|
t.text "opening_hour"
|
651
707
|
t.string "isil"
|
652
708
|
t.float "latitude"
|
653
709
|
t.float "longitude"
|
654
710
|
t.jsonb "display_name_translations", default: {}, null: false
|
711
|
+
t.index ["country_id"], name: "index_libraries_on_country_id"
|
655
712
|
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
656
713
|
t.index ["name"], name: "index_libraries_on_name"
|
657
714
|
end
|
658
715
|
|
659
|
-
create_table "library_groups",
|
716
|
+
create_table "library_groups", force: :cascade do |t|
|
660
717
|
t.string "name", null: false
|
661
718
|
t.text "display_name"
|
662
719
|
t.string "short_name", null: false
|
@@ -665,8 +722,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
665
722
|
t.text "note"
|
666
723
|
t.integer "country_id"
|
667
724
|
t.integer "position"
|
668
|
-
t.datetime "created_at"
|
669
|
-
t.datetime "updated_at"
|
725
|
+
t.datetime "created_at", null: false
|
726
|
+
t.datetime "updated_at", null: false
|
670
727
|
t.text "admin_networks"
|
671
728
|
t.string "url", default: "http://localhost:3000/"
|
672
729
|
t.text "settings"
|
@@ -676,7 +733,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
676
733
|
t.boolean "family_name_first", default: true
|
677
734
|
t.string "screenshot_generator"
|
678
735
|
t.integer "pub_year_facet_range_interval", default: 10
|
679
|
-
t.
|
736
|
+
t.bigint "user_id"
|
680
737
|
t.boolean "csv_charset_conversion", default: false, null: false
|
681
738
|
t.string "header_logo_file_name"
|
682
739
|
t.string "header_logo_content_type"
|
@@ -686,92 +743,94 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
686
743
|
t.jsonb "display_name_translations", default: {}, null: false
|
687
744
|
t.jsonb "login_banner_translations", default: {}, null: false
|
688
745
|
t.jsonb "footer_banner_translations", default: {}, null: false
|
746
|
+
t.string "email"
|
747
|
+
t.index ["email"], name: "index_library_groups_on_email"
|
689
748
|
t.index ["short_name"], name: "index_library_groups_on_short_name"
|
690
749
|
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
691
750
|
end
|
692
751
|
|
693
|
-
create_table "licenses",
|
752
|
+
create_table "licenses", force: :cascade do |t|
|
694
753
|
t.string "name", null: false
|
695
754
|
t.string "display_name"
|
696
755
|
t.text "note"
|
697
756
|
t.integer "position"
|
698
|
-
t.datetime "created_at"
|
699
|
-
t.datetime "updated_at"
|
757
|
+
t.datetime "created_at", null: false
|
758
|
+
t.datetime "updated_at", null: false
|
700
759
|
t.jsonb "display_name_translations", default: {}, null: false
|
701
760
|
end
|
702
761
|
|
703
|
-
create_table "manifestation_checkout_stat_transitions",
|
762
|
+
create_table "manifestation_checkout_stat_transitions", force: :cascade do |t|
|
704
763
|
t.string "to_state"
|
705
764
|
t.text "metadata", default: "{}"
|
706
765
|
t.integer "sort_key"
|
707
766
|
t.integer "manifestation_checkout_stat_id"
|
708
|
-
t.datetime "created_at"
|
709
|
-
t.datetime "updated_at"
|
767
|
+
t.datetime "created_at", null: false
|
768
|
+
t.datetime "updated_at", null: false
|
710
769
|
t.boolean "most_recent", null: false
|
711
770
|
t.index ["manifestation_checkout_stat_id", "most_recent"], name: "index_manifestation_checkout_stat_transitions_parent_most_rece", unique: true, where: "most_recent"
|
712
771
|
t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
713
772
|
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
714
773
|
end
|
715
774
|
|
716
|
-
create_table "manifestation_checkout_stats",
|
775
|
+
create_table "manifestation_checkout_stats", force: :cascade do |t|
|
717
776
|
t.datetime "start_date"
|
718
777
|
t.datetime "end_date"
|
719
778
|
t.text "note"
|
720
|
-
t.datetime "created_at"
|
721
|
-
t.datetime "updated_at"
|
779
|
+
t.datetime "created_at", null: false
|
780
|
+
t.datetime "updated_at", null: false
|
722
781
|
t.datetime "started_at"
|
723
782
|
t.datetime "completed_at"
|
724
|
-
t.
|
783
|
+
t.bigint "user_id"
|
725
784
|
t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
|
726
785
|
end
|
727
786
|
|
728
|
-
create_table "manifestation_relationship_types",
|
787
|
+
create_table "manifestation_relationship_types", force: :cascade do |t|
|
729
788
|
t.string "name", null: false
|
730
789
|
t.text "display_name"
|
731
790
|
t.text "note"
|
732
791
|
t.integer "position"
|
733
|
-
t.datetime "created_at"
|
734
|
-
t.datetime "updated_at"
|
792
|
+
t.datetime "created_at", null: false
|
793
|
+
t.datetime "updated_at", null: false
|
735
794
|
t.jsonb "display_name_translations", default: {}, null: false
|
736
795
|
end
|
737
796
|
|
738
|
-
create_table "manifestation_relationships",
|
797
|
+
create_table "manifestation_relationships", force: :cascade do |t|
|
739
798
|
t.integer "parent_id"
|
740
799
|
t.integer "child_id"
|
741
800
|
t.integer "manifestation_relationship_type_id"
|
742
|
-
t.datetime "created_at"
|
743
|
-
t.datetime "updated_at"
|
801
|
+
t.datetime "created_at", null: false
|
802
|
+
t.datetime "updated_at", null: false
|
744
803
|
t.integer "position"
|
745
804
|
t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
746
805
|
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
747
806
|
end
|
748
807
|
|
749
|
-
create_table "manifestation_reserve_stat_transitions",
|
808
|
+
create_table "manifestation_reserve_stat_transitions", force: :cascade do |t|
|
750
809
|
t.string "to_state"
|
751
810
|
t.text "metadata", default: "{}"
|
752
811
|
t.integer "sort_key"
|
753
812
|
t.integer "manifestation_reserve_stat_id"
|
754
|
-
t.datetime "created_at"
|
755
|
-
t.datetime "updated_at"
|
813
|
+
t.datetime "created_at", null: false
|
814
|
+
t.datetime "updated_at", null: false
|
756
815
|
t.boolean "most_recent", null: false
|
757
816
|
t.index ["manifestation_reserve_stat_id", "most_recent"], name: "index_manifestation_reserve_stat_transitions_parent_most_recen", unique: true, where: "most_recent"
|
758
817
|
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
759
818
|
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
760
819
|
end
|
761
820
|
|
762
|
-
create_table "manifestation_reserve_stats",
|
821
|
+
create_table "manifestation_reserve_stats", force: :cascade do |t|
|
763
822
|
t.datetime "start_date"
|
764
823
|
t.datetime "end_date"
|
765
824
|
t.text "note"
|
766
|
-
t.datetime "created_at"
|
767
|
-
t.datetime "updated_at"
|
825
|
+
t.datetime "created_at", null: false
|
826
|
+
t.datetime "updated_at", null: false
|
768
827
|
t.datetime "started_at"
|
769
828
|
t.datetime "completed_at"
|
770
|
-
t.
|
829
|
+
t.bigint "user_id"
|
771
830
|
t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
|
772
831
|
end
|
773
832
|
|
774
|
-
create_table "manifestations",
|
833
|
+
create_table "manifestations", force: :cascade do |t|
|
775
834
|
t.text "original_title", null: false
|
776
835
|
t.text "title_alternative"
|
777
836
|
t.text "title_transcription"
|
@@ -779,9 +838,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
779
838
|
t.string "manifestation_identifier"
|
780
839
|
t.datetime "date_of_publication"
|
781
840
|
t.datetime "date_copyrighted"
|
782
|
-
t.datetime "created_at"
|
783
|
-
t.datetime "updated_at"
|
784
|
-
t.datetime "deleted_at"
|
841
|
+
t.datetime "created_at", null: false
|
842
|
+
t.datetime "updated_at", null: false
|
785
843
|
t.string "access_address"
|
786
844
|
t.integer "language_id", default: 1, null: false
|
787
845
|
t.integer "carrier_type_id", default: 1, null: false
|
@@ -837,13 +895,13 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
837
895
|
t.index ["updated_at"], name: "index_manifestations_on_updated_at"
|
838
896
|
end
|
839
897
|
|
840
|
-
create_table "medium_of_performances",
|
898
|
+
create_table "medium_of_performances", force: :cascade do |t|
|
841
899
|
t.string "name", null: false
|
842
900
|
t.text "display_name"
|
843
901
|
t.text "note"
|
844
902
|
t.integer "position"
|
845
|
-
t.datetime "created_at"
|
846
|
-
t.datetime "updated_at"
|
903
|
+
t.datetime "created_at", null: false
|
904
|
+
t.datetime "updated_at", null: false
|
847
905
|
t.jsonb "display_name_translations", default: {}, null: false
|
848
906
|
end
|
849
907
|
|
@@ -854,8 +912,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
854
912
|
t.integer "message_request_id"
|
855
913
|
t.datetime "created_at"
|
856
914
|
t.datetime "updated_at"
|
857
|
-
t.boolean "most_recent"
|
858
|
-
t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
915
|
+
t.boolean "most_recent"
|
859
916
|
t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
860
917
|
t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
861
918
|
end
|
@@ -889,8 +946,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
889
946
|
t.integer "message_id"
|
890
947
|
t.datetime "created_at"
|
891
948
|
t.datetime "updated_at"
|
892
|
-
t.boolean "most_recent"
|
893
|
-
t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
|
949
|
+
t.boolean "most_recent"
|
894
950
|
t.index ["message_id"], name: "index_message_transitions_on_message_id"
|
895
951
|
t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
896
952
|
end
|
@@ -914,12 +970,12 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
914
970
|
t.index ["sender_id"], name: "index_messages_on_sender_id"
|
915
971
|
end
|
916
972
|
|
917
|
-
create_table "owns",
|
918
|
-
t.
|
919
|
-
t.
|
973
|
+
create_table "owns", force: :cascade do |t|
|
974
|
+
t.bigint "agent_id", null: false
|
975
|
+
t.bigint "item_id", null: false
|
920
976
|
t.integer "position"
|
921
|
-
t.datetime "created_at"
|
922
|
-
t.datetime "updated_at"
|
977
|
+
t.datetime "created_at", null: false
|
978
|
+
t.datetime "updated_at", null: false
|
923
979
|
t.index ["agent_id"], name: "index_owns_on_agent_id"
|
924
980
|
t.index ["item_id"], name: "index_owns_on_item_id"
|
925
981
|
end
|
@@ -934,15 +990,34 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
934
990
|
t.index ["event_id"], name: "index_participates_on_event_id"
|
935
991
|
end
|
936
992
|
|
937
|
-
create_table "
|
993
|
+
create_table "periodical_and_manifestations", force: :cascade do |t|
|
994
|
+
t.bigint "periodical_id", null: false
|
995
|
+
t.bigint "manifestation_id", null: false
|
996
|
+
t.boolean "periodical_master", default: false, null: false
|
997
|
+
t.datetime "created_at", null: false
|
998
|
+
t.datetime "updated_at", null: false
|
999
|
+
t.index ["manifestation_id"], name: "index_periodical_and_manifestations_on_manifestation_id"
|
1000
|
+
t.index ["periodical_id"], name: "index_periodical_and_manifestations_on_periodical_id"
|
1001
|
+
t.index ["periodical_master"], name: "index_periodical_and_manifestations_on_periodical_master", unique: true, where: "(periodical_master IS TRUE)"
|
1002
|
+
end
|
1003
|
+
|
1004
|
+
create_table "periodicals", force: :cascade do |t|
|
1005
|
+
t.text "original_title", null: false
|
1006
|
+
t.bigint "frequency_id", null: false
|
1007
|
+
t.datetime "created_at", null: false
|
1008
|
+
t.datetime "updated_at", null: false
|
1009
|
+
t.index ["frequency_id"], name: "index_periodicals_on_frequency_id"
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
create_table "picture_files", force: :cascade do |t|
|
938
1013
|
t.integer "picture_attachable_id"
|
939
1014
|
t.string "picture_attachable_type"
|
940
1015
|
t.string "content_type"
|
941
1016
|
t.text "title"
|
942
1017
|
t.string "thumbnail"
|
943
1018
|
t.integer "position"
|
944
|
-
t.datetime "created_at"
|
945
|
-
t.datetime "updated_at"
|
1019
|
+
t.datetime "created_at", null: false
|
1020
|
+
t.datetime "updated_at", null: false
|
946
1021
|
t.string "picture_file_name"
|
947
1022
|
t.string "picture_content_type"
|
948
1023
|
t.integer "picture_file_size"
|
@@ -966,39 +1041,39 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
966
1041
|
t.index ["term"], name: "index_places_on_term"
|
967
1042
|
end
|
968
1043
|
|
969
|
-
create_table "produce_types",
|
1044
|
+
create_table "produce_types", force: :cascade do |t|
|
970
1045
|
t.string "name"
|
971
1046
|
t.text "display_name"
|
972
1047
|
t.text "note"
|
973
1048
|
t.integer "position"
|
974
|
-
t.datetime "created_at"
|
975
|
-
t.datetime "updated_at"
|
1049
|
+
t.datetime "created_at", null: false
|
1050
|
+
t.datetime "updated_at", null: false
|
976
1051
|
t.jsonb "display_name_translations", default: {}, null: false
|
977
1052
|
end
|
978
1053
|
|
979
|
-
create_table "produces",
|
980
|
-
t.
|
981
|
-
t.
|
1054
|
+
create_table "produces", force: :cascade do |t|
|
1055
|
+
t.bigint "agent_id", null: false
|
1056
|
+
t.bigint "manifestation_id", null: false
|
982
1057
|
t.integer "position"
|
983
|
-
t.datetime "created_at"
|
984
|
-
t.datetime "updated_at"
|
1058
|
+
t.datetime "created_at", null: false
|
1059
|
+
t.datetime "updated_at", null: false
|
985
1060
|
t.integer "produce_type_id"
|
986
1061
|
t.index ["agent_id"], name: "index_produces_on_agent_id"
|
987
1062
|
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
988
1063
|
end
|
989
1064
|
|
990
|
-
create_table "profiles",
|
991
|
-
t.
|
992
|
-
t.
|
993
|
-
t.
|
1065
|
+
create_table "profiles", force: :cascade do |t|
|
1066
|
+
t.bigint "user_id"
|
1067
|
+
t.bigint "user_group_id"
|
1068
|
+
t.bigint "library_id"
|
994
1069
|
t.string "locale"
|
995
1070
|
t.string "user_number"
|
996
1071
|
t.text "full_name"
|
997
1072
|
t.text "note"
|
998
1073
|
t.text "keyword_list"
|
999
|
-
t.
|
1000
|
-
t.datetime "created_at"
|
1001
|
-
t.datetime "updated_at"
|
1074
|
+
t.bigint "required_role_id"
|
1075
|
+
t.datetime "created_at", null: false
|
1076
|
+
t.datetime "updated_at", null: false
|
1002
1077
|
t.string "checkout_icalendar_token"
|
1003
1078
|
t.boolean "save_checkout_history", default: false, null: false
|
1004
1079
|
t.datetime "expired_at"
|
@@ -1012,91 +1087,90 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1012
1087
|
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
1013
1088
|
end
|
1014
1089
|
|
1015
|
-
create_table "realize_types",
|
1090
|
+
create_table "realize_types", force: :cascade do |t|
|
1016
1091
|
t.string "name"
|
1017
1092
|
t.text "display_name"
|
1018
1093
|
t.text "note"
|
1019
1094
|
t.integer "position"
|
1020
|
-
t.datetime "created_at"
|
1021
|
-
t.datetime "updated_at"
|
1095
|
+
t.datetime "created_at", null: false
|
1096
|
+
t.datetime "updated_at", null: false
|
1022
1097
|
t.jsonb "display_name_translations", default: {}, null: false
|
1023
1098
|
end
|
1024
1099
|
|
1025
|
-
create_table "realizes",
|
1026
|
-
t.
|
1027
|
-
t.
|
1100
|
+
create_table "realizes", force: :cascade do |t|
|
1101
|
+
t.bigint "agent_id", null: false
|
1102
|
+
t.bigint "expression_id", null: false
|
1028
1103
|
t.integer "position"
|
1029
|
-
t.datetime "created_at"
|
1030
|
-
t.datetime "updated_at"
|
1104
|
+
t.datetime "created_at", null: false
|
1105
|
+
t.datetime "updated_at", null: false
|
1031
1106
|
t.integer "realize_type_id"
|
1032
1107
|
t.index ["agent_id"], name: "index_realizes_on_agent_id"
|
1033
1108
|
t.index ["expression_id"], name: "index_realizes_on_expression_id"
|
1034
1109
|
end
|
1035
1110
|
|
1036
|
-
create_table "request_status_types",
|
1111
|
+
create_table "request_status_types", force: :cascade do |t|
|
1037
1112
|
t.string "name", null: false
|
1038
1113
|
t.text "display_name"
|
1039
1114
|
t.text "note"
|
1040
1115
|
t.integer "position"
|
1041
|
-
t.datetime "created_at"
|
1042
|
-
t.datetime "updated_at"
|
1116
|
+
t.datetime "created_at", null: false
|
1117
|
+
t.datetime "updated_at", null: false
|
1043
1118
|
t.jsonb "display_name_translations", default: {}, null: false
|
1044
1119
|
end
|
1045
1120
|
|
1046
|
-
create_table "request_types",
|
1121
|
+
create_table "request_types", force: :cascade do |t|
|
1047
1122
|
t.string "name", null: false
|
1048
1123
|
t.text "display_name"
|
1049
1124
|
t.text "note"
|
1050
1125
|
t.integer "position"
|
1051
|
-
t.datetime "created_at"
|
1052
|
-
t.datetime "updated_at"
|
1126
|
+
t.datetime "created_at", null: false
|
1127
|
+
t.datetime "updated_at", null: false
|
1053
1128
|
t.jsonb "display_name_translations", default: {}, null: false
|
1054
1129
|
end
|
1055
1130
|
|
1056
|
-
create_table "reserve_stat_has_manifestations",
|
1057
|
-
t.
|
1058
|
-
t.
|
1131
|
+
create_table "reserve_stat_has_manifestations", force: :cascade do |t|
|
1132
|
+
t.bigint "manifestation_reserve_stat_id", null: false
|
1133
|
+
t.bigint "manifestation_id", null: false
|
1059
1134
|
t.integer "reserves_count"
|
1060
|
-
t.datetime "created_at"
|
1061
|
-
t.datetime "updated_at"
|
1135
|
+
t.datetime "created_at", null: false
|
1136
|
+
t.datetime "updated_at", null: false
|
1062
1137
|
t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
|
1063
1138
|
t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
1064
1139
|
end
|
1065
1140
|
|
1066
|
-
create_table "reserve_stat_has_users",
|
1067
|
-
t.
|
1068
|
-
t.
|
1141
|
+
create_table "reserve_stat_has_users", force: :cascade do |t|
|
1142
|
+
t.bigint "user_reserve_stat_id", null: false
|
1143
|
+
t.bigint "user_id", null: false
|
1069
1144
|
t.integer "reserves_count"
|
1070
|
-
t.datetime "created_at"
|
1071
|
-
t.datetime "updated_at"
|
1145
|
+
t.datetime "created_at", null: false
|
1146
|
+
t.datetime "updated_at", null: false
|
1072
1147
|
t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
|
1073
1148
|
t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
1074
1149
|
end
|
1075
1150
|
|
1076
|
-
create_table "reserve_transitions",
|
1151
|
+
create_table "reserve_transitions", force: :cascade do |t|
|
1077
1152
|
t.string "to_state"
|
1078
1153
|
t.text "metadata", default: "{}"
|
1079
1154
|
t.integer "sort_key"
|
1080
1155
|
t.integer "reserve_id"
|
1081
|
-
t.datetime "created_at"
|
1082
|
-
t.datetime "updated_at"
|
1156
|
+
t.datetime "created_at", null: false
|
1157
|
+
t.datetime "updated_at", null: false
|
1083
1158
|
t.boolean "most_recent", null: false
|
1084
1159
|
t.index ["reserve_id", "most_recent"], name: "index_reserve_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1085
1160
|
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
1086
1161
|
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
1087
1162
|
end
|
1088
1163
|
|
1089
|
-
create_table "reserves",
|
1090
|
-
t.
|
1091
|
-
t.
|
1092
|
-
t.
|
1093
|
-
t.
|
1164
|
+
create_table "reserves", force: :cascade do |t|
|
1165
|
+
t.bigint "user_id", null: false
|
1166
|
+
t.bigint "manifestation_id", null: false
|
1167
|
+
t.bigint "item_id"
|
1168
|
+
t.bigint "request_status_type_id", null: false
|
1094
1169
|
t.datetime "checked_out_at"
|
1095
|
-
t.datetime "created_at"
|
1096
|
-
t.datetime "updated_at"
|
1170
|
+
t.datetime "created_at", null: false
|
1171
|
+
t.datetime "updated_at", null: false
|
1097
1172
|
t.datetime "canceled_at"
|
1098
1173
|
t.datetime "expired_at"
|
1099
|
-
t.datetime "deleted_at"
|
1100
1174
|
t.boolean "expiration_notice_to_patron", default: false
|
1101
1175
|
t.boolean "expiration_notice_to_library", default: false
|
1102
1176
|
t.integer "pickup_location_id"
|
@@ -1106,47 +1180,48 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1106
1180
|
t.index ["item_id"], name: "index_reserves_on_item_id"
|
1107
1181
|
t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id"
|
1108
1182
|
t.index ["pickup_location_id"], name: "index_reserves_on_pickup_location_id"
|
1183
|
+
t.index ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
|
1109
1184
|
t.index ["user_id"], name: "index_reserves_on_user_id"
|
1110
1185
|
end
|
1111
1186
|
|
1112
|
-
create_table "resource_export_file_transitions",
|
1187
|
+
create_table "resource_export_file_transitions", force: :cascade do |t|
|
1113
1188
|
t.string "to_state"
|
1114
1189
|
t.text "metadata", default: "{}"
|
1115
1190
|
t.integer "sort_key"
|
1116
1191
|
t.integer "resource_export_file_id"
|
1117
|
-
t.datetime "created_at"
|
1118
|
-
t.datetime "updated_at"
|
1192
|
+
t.datetime "created_at", null: false
|
1193
|
+
t.datetime "updated_at", null: false
|
1119
1194
|
t.boolean "most_recent", null: false
|
1120
1195
|
t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1121
1196
|
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1122
1197
|
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1123
1198
|
end
|
1124
1199
|
|
1125
|
-
create_table "resource_export_files",
|
1200
|
+
create_table "resource_export_files", force: :cascade do |t|
|
1126
1201
|
t.integer "user_id"
|
1127
1202
|
t.string "resource_export_file_name"
|
1128
1203
|
t.string "resource_export_content_type"
|
1129
1204
|
t.bigint "resource_export_file_size"
|
1130
1205
|
t.datetime "resource_export_updated_at"
|
1131
1206
|
t.datetime "executed_at"
|
1132
|
-
t.datetime "created_at"
|
1133
|
-
t.datetime "updated_at"
|
1207
|
+
t.datetime "created_at", null: false
|
1208
|
+
t.datetime "updated_at", null: false
|
1134
1209
|
end
|
1135
1210
|
|
1136
|
-
create_table "resource_import_file_transitions",
|
1211
|
+
create_table "resource_import_file_transitions", force: :cascade do |t|
|
1137
1212
|
t.string "to_state"
|
1138
1213
|
t.text "metadata", default: "{}"
|
1139
1214
|
t.integer "sort_key"
|
1140
1215
|
t.integer "resource_import_file_id"
|
1141
|
-
t.datetime "created_at"
|
1142
|
-
t.datetime "updated_at"
|
1216
|
+
t.datetime "created_at", null: false
|
1217
|
+
t.datetime "updated_at", null: false
|
1143
1218
|
t.boolean "most_recent", null: false
|
1144
1219
|
t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1145
1220
|
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1146
1221
|
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1147
1222
|
end
|
1148
1223
|
|
1149
|
-
create_table "resource_import_files",
|
1224
|
+
create_table "resource_import_files", force: :cascade do |t|
|
1150
1225
|
t.integer "parent_id"
|
1151
1226
|
t.string "content_type"
|
1152
1227
|
t.integer "size"
|
@@ -1157,8 +1232,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1157
1232
|
t.string "resource_import_content_type"
|
1158
1233
|
t.integer "resource_import_file_size"
|
1159
1234
|
t.datetime "resource_import_updated_at"
|
1160
|
-
t.datetime "created_at"
|
1161
|
-
t.datetime "updated_at"
|
1235
|
+
t.datetime "created_at", null: false
|
1236
|
+
t.datetime "updated_at", null: false
|
1162
1237
|
t.string "edit_mode"
|
1163
1238
|
t.string "resource_import_fingerprint"
|
1164
1239
|
t.text "error_message"
|
@@ -1168,13 +1243,13 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1168
1243
|
t.index ["user_id"], name: "index_resource_import_files_on_user_id"
|
1169
1244
|
end
|
1170
1245
|
|
1171
|
-
create_table "resource_import_results",
|
1246
|
+
create_table "resource_import_results", force: :cascade do |t|
|
1172
1247
|
t.integer "resource_import_file_id"
|
1173
1248
|
t.integer "manifestation_id"
|
1174
1249
|
t.integer "item_id"
|
1175
1250
|
t.text "body"
|
1176
|
-
t.datetime "created_at"
|
1177
|
-
t.datetime "updated_at"
|
1251
|
+
t.datetime "created_at", null: false
|
1252
|
+
t.datetime "updated_at", null: false
|
1178
1253
|
t.text "error_message"
|
1179
1254
|
t.index ["item_id"], name: "index_resource_import_results_on_item_id"
|
1180
1255
|
t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
@@ -1190,7 +1265,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1190
1265
|
t.index ["reserve_id"], name: "index_retains_on_reserve_id"
|
1191
1266
|
end
|
1192
1267
|
|
1193
|
-
create_table "roles",
|
1268
|
+
create_table "roles", force: :cascade do |t|
|
1194
1269
|
t.string "name", null: false
|
1195
1270
|
t.string "display_name"
|
1196
1271
|
t.text "note"
|
@@ -1201,7 +1276,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1201
1276
|
t.jsonb "display_name_translations", default: {}, null: false
|
1202
1277
|
end
|
1203
1278
|
|
1204
|
-
create_table "search_engines",
|
1279
|
+
create_table "search_engines", force: :cascade do |t|
|
1205
1280
|
t.string "name", null: false
|
1206
1281
|
t.text "display_name"
|
1207
1282
|
t.string "url", null: false
|
@@ -1211,34 +1286,34 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1211
1286
|
t.text "additional_param"
|
1212
1287
|
t.text "note"
|
1213
1288
|
t.integer "position"
|
1214
|
-
t.datetime "created_at"
|
1215
|
-
t.datetime "updated_at"
|
1289
|
+
t.datetime "created_at", null: false
|
1290
|
+
t.datetime "updated_at", null: false
|
1216
1291
|
t.jsonb "display_name_translations", default: {}, null: false
|
1217
1292
|
end
|
1218
1293
|
|
1219
|
-
create_table "series_statement_merge_lists",
|
1294
|
+
create_table "series_statement_merge_lists", force: :cascade do |t|
|
1220
1295
|
t.string "title"
|
1221
|
-
t.datetime "created_at"
|
1222
|
-
t.datetime "updated_at"
|
1296
|
+
t.datetime "created_at", null: false
|
1297
|
+
t.datetime "updated_at", null: false
|
1223
1298
|
end
|
1224
1299
|
|
1225
|
-
create_table "series_statement_merges",
|
1300
|
+
create_table "series_statement_merges", force: :cascade do |t|
|
1226
1301
|
t.integer "series_statement_id", null: false
|
1227
1302
|
t.integer "series_statement_merge_list_id", null: false
|
1228
|
-
t.datetime "created_at"
|
1229
|
-
t.datetime "updated_at"
|
1303
|
+
t.datetime "created_at", null: false
|
1304
|
+
t.datetime "updated_at", null: false
|
1230
1305
|
t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
1231
1306
|
t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
1232
1307
|
end
|
1233
1308
|
|
1234
|
-
create_table "series_statements",
|
1309
|
+
create_table "series_statements", force: :cascade do |t|
|
1235
1310
|
t.text "original_title"
|
1236
1311
|
t.text "numbering"
|
1237
1312
|
t.text "title_subseries"
|
1238
1313
|
t.text "numbering_subseries"
|
1239
1314
|
t.integer "position"
|
1240
|
-
t.datetime "created_at"
|
1241
|
-
t.datetime "updated_at"
|
1315
|
+
t.datetime "created_at", null: false
|
1316
|
+
t.datetime "updated_at", null: false
|
1242
1317
|
t.text "title_transcription"
|
1243
1318
|
t.text "title_alternative"
|
1244
1319
|
t.string "series_statement_identifier"
|
@@ -1255,87 +1330,85 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1255
1330
|
t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
|
1256
1331
|
end
|
1257
1332
|
|
1258
|
-
create_table "shelves",
|
1333
|
+
create_table "shelves", force: :cascade do |t|
|
1259
1334
|
t.string "name", null: false
|
1260
1335
|
t.text "display_name"
|
1261
1336
|
t.text "note"
|
1262
|
-
t.
|
1337
|
+
t.bigint "library_id", null: false
|
1263
1338
|
t.integer "items_count", default: 0, null: false
|
1264
1339
|
t.integer "position"
|
1265
|
-
t.datetime "created_at"
|
1266
|
-
t.datetime "updated_at"
|
1267
|
-
t.datetime "deleted_at"
|
1340
|
+
t.datetime "created_at", null: false
|
1341
|
+
t.datetime "updated_at", null: false
|
1268
1342
|
t.boolean "closed", default: false, null: false
|
1269
1343
|
t.jsonb "display_name_translations", default: {}, null: false
|
1270
1344
|
t.index ["library_id"], name: "index_shelves_on_library_id"
|
1271
1345
|
end
|
1272
1346
|
|
1273
|
-
create_table "subscribes",
|
1274
|
-
t.
|
1347
|
+
create_table "subscribes", force: :cascade do |t|
|
1348
|
+
t.bigint "subscription_id", null: false
|
1275
1349
|
t.integer "work_id", null: false
|
1276
1350
|
t.datetime "start_at", null: false
|
1277
1351
|
t.datetime "end_at", null: false
|
1278
|
-
t.datetime "created_at"
|
1279
|
-
t.datetime "updated_at"
|
1352
|
+
t.datetime "created_at", null: false
|
1353
|
+
t.datetime "updated_at", null: false
|
1280
1354
|
t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
1281
1355
|
t.index ["work_id"], name: "index_subscribes_on_work_id"
|
1282
1356
|
end
|
1283
1357
|
|
1284
|
-
create_table "subscriptions",
|
1358
|
+
create_table "subscriptions", force: :cascade do |t|
|
1285
1359
|
t.text "title", null: false
|
1286
1360
|
t.text "note"
|
1287
|
-
t.
|
1288
|
-
t.
|
1289
|
-
t.datetime "deleted_at"
|
1361
|
+
t.bigint "user_id"
|
1362
|
+
t.bigint "order_list_id"
|
1290
1363
|
t.integer "subscribes_count", default: 0, null: false
|
1291
|
-
t.datetime "created_at"
|
1292
|
-
t.datetime "updated_at"
|
1364
|
+
t.datetime "created_at", null: false
|
1365
|
+
t.datetime "updated_at", null: false
|
1293
1366
|
t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
1294
1367
|
t.index ["user_id"], name: "index_subscriptions_on_user_id"
|
1295
1368
|
end
|
1296
1369
|
|
1297
|
-
create_table "use_restrictions",
|
1370
|
+
create_table "use_restrictions", force: :cascade do |t|
|
1298
1371
|
t.string "name", null: false
|
1299
1372
|
t.text "display_name"
|
1300
1373
|
t.text "note"
|
1301
1374
|
t.integer "position"
|
1302
|
-
t.datetime "created_at"
|
1303
|
-
t.datetime "updated_at"
|
1375
|
+
t.datetime "created_at", null: false
|
1376
|
+
t.datetime "updated_at", null: false
|
1304
1377
|
t.jsonb "display_name_translations", default: {}, null: false
|
1305
1378
|
end
|
1306
1379
|
|
1307
|
-
create_table "user_checkout_stat_transitions",
|
1380
|
+
create_table "user_checkout_stat_transitions", force: :cascade do |t|
|
1308
1381
|
t.string "to_state"
|
1309
1382
|
t.text "metadata", default: "{}"
|
1310
1383
|
t.integer "sort_key"
|
1311
1384
|
t.integer "user_checkout_stat_id"
|
1312
|
-
t.datetime "created_at"
|
1313
|
-
t.datetime "updated_at"
|
1385
|
+
t.datetime "created_at", null: false
|
1386
|
+
t.datetime "updated_at", null: false
|
1314
1387
|
t.boolean "most_recent", null: false
|
1315
1388
|
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1316
1389
|
t.index ["user_checkout_stat_id", "most_recent"], name: "index_user_checkout_stat_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1317
1390
|
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1318
1391
|
end
|
1319
1392
|
|
1320
|
-
create_table "user_checkout_stats",
|
1393
|
+
create_table "user_checkout_stats", force: :cascade do |t|
|
1321
1394
|
t.datetime "start_date"
|
1322
1395
|
t.datetime "end_date"
|
1323
1396
|
t.text "note"
|
1324
|
-
t.datetime "created_at"
|
1325
|
-
t.datetime "updated_at"
|
1397
|
+
t.datetime "created_at", null: false
|
1398
|
+
t.datetime "updated_at", null: false
|
1326
1399
|
t.datetime "started_at"
|
1327
1400
|
t.datetime "completed_at"
|
1328
|
-
t.
|
1401
|
+
t.bigint "user_id"
|
1329
1402
|
t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
|
1330
1403
|
end
|
1331
1404
|
|
1332
|
-
create_table "user_export_file_transitions",
|
1405
|
+
create_table "user_export_file_transitions", force: :cascade do |t|
|
1333
1406
|
t.string "to_state"
|
1334
1407
|
t.text "metadata", default: "{}"
|
1335
1408
|
t.integer "sort_key"
|
1336
|
-
t.
|
1337
|
-
t.datetime "created_at"
|
1338
|
-
t.datetime "updated_at"
|
1409
|
+
t.bigint "user_export_file_id"
|
1410
|
+
t.datetime "created_at", null: false
|
1411
|
+
t.datetime "updated_at", null: false
|
1339
1412
|
t.boolean "most_recent", null: false
|
1340
1413
|
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1341
1414
|
t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
@@ -1343,21 +1416,21 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1343
1416
|
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
1344
1417
|
end
|
1345
1418
|
|
1346
|
-
create_table "user_export_files",
|
1347
|
-
t.
|
1419
|
+
create_table "user_export_files", force: :cascade do |t|
|
1420
|
+
t.bigint "user_id"
|
1348
1421
|
t.string "user_export_file_name"
|
1349
1422
|
t.string "user_export_content_type"
|
1350
1423
|
t.bigint "user_export_file_size"
|
1351
1424
|
t.datetime "user_export_updated_at"
|
1352
1425
|
t.datetime "executed_at"
|
1353
|
-
t.datetime "created_at"
|
1354
|
-
t.datetime "updated_at"
|
1426
|
+
t.datetime "created_at", null: false
|
1427
|
+
t.datetime "updated_at", null: false
|
1355
1428
|
t.index ["user_id"], name: "index_user_export_files_on_user_id"
|
1356
1429
|
end
|
1357
1430
|
|
1358
|
-
create_table "user_group_has_checkout_types",
|
1359
|
-
t.
|
1360
|
-
t.
|
1431
|
+
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
1432
|
+
t.bigint "user_group_id", null: false
|
1433
|
+
t.bigint "checkout_type_id", null: false
|
1361
1434
|
t.integer "checkout_limit", default: 0, null: false
|
1362
1435
|
t.integer "checkout_period", default: 0, null: false
|
1363
1436
|
t.integer "checkout_renewal_limit", default: 0, null: false
|
@@ -1367,53 +1440,52 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1367
1440
|
t.datetime "fixed_due_date"
|
1368
1441
|
t.text "note"
|
1369
1442
|
t.integer "position"
|
1370
|
-
t.datetime "created_at"
|
1371
|
-
t.datetime "updated_at"
|
1443
|
+
t.datetime "created_at", null: false
|
1444
|
+
t.datetime "updated_at", null: false
|
1372
1445
|
t.integer "current_checkout_count"
|
1373
1446
|
t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
|
1374
1447
|
t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
|
1375
1448
|
end
|
1376
1449
|
|
1377
|
-
create_table "user_groups",
|
1450
|
+
create_table "user_groups", force: :cascade do |t|
|
1378
1451
|
t.string "name"
|
1379
1452
|
t.text "display_name"
|
1380
1453
|
t.text "note"
|
1381
1454
|
t.integer "position"
|
1382
|
-
t.datetime "created_at"
|
1383
|
-
t.datetime "updated_at"
|
1384
|
-
t.datetime "deleted_at"
|
1455
|
+
t.datetime "created_at", null: false
|
1456
|
+
t.datetime "updated_at", null: false
|
1385
1457
|
t.integer "valid_period_for_new_user", default: 0, null: false
|
1386
1458
|
t.datetime "expired_at"
|
1387
|
-
t.integer "number_of_day_to_notify_overdue", default:
|
1388
|
-
t.integer "number_of_day_to_notify_due_date", default:
|
1389
|
-
t.integer "number_of_time_to_notify_overdue", default:
|
1459
|
+
t.integer "number_of_day_to_notify_overdue", default: 0, null: false
|
1460
|
+
t.integer "number_of_day_to_notify_due_date", default: 0, null: false
|
1461
|
+
t.integer "number_of_time_to_notify_overdue", default: 0, null: false
|
1390
1462
|
t.jsonb "display_name_translations", default: {}, null: false
|
1391
1463
|
end
|
1392
1464
|
|
1393
|
-
create_table "user_has_roles",
|
1394
|
-
t.
|
1395
|
-
t.
|
1396
|
-
t.datetime "created_at"
|
1397
|
-
t.datetime "updated_at"
|
1465
|
+
create_table "user_has_roles", force: :cascade do |t|
|
1466
|
+
t.bigint "user_id", null: false
|
1467
|
+
t.bigint "role_id", null: false
|
1468
|
+
t.datetime "created_at", null: false
|
1469
|
+
t.datetime "updated_at", null: false
|
1398
1470
|
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
1399
1471
|
t.index ["user_id"], name: "index_user_has_roles_on_user_id"
|
1400
1472
|
end
|
1401
1473
|
|
1402
|
-
create_table "user_import_file_transitions",
|
1474
|
+
create_table "user_import_file_transitions", force: :cascade do |t|
|
1403
1475
|
t.string "to_state"
|
1404
1476
|
t.text "metadata", default: "{}"
|
1405
1477
|
t.integer "sort_key"
|
1406
|
-
t.
|
1407
|
-
t.datetime "created_at"
|
1408
|
-
t.datetime "updated_at"
|
1478
|
+
t.bigint "user_import_file_id"
|
1479
|
+
t.datetime "created_at", null: false
|
1480
|
+
t.datetime "updated_at", null: false
|
1409
1481
|
t.boolean "most_recent", null: false
|
1410
1482
|
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1411
1483
|
t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1412
1484
|
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1413
1485
|
end
|
1414
1486
|
|
1415
|
-
create_table "user_import_files",
|
1416
|
-
t.
|
1487
|
+
create_table "user_import_files", force: :cascade do |t|
|
1488
|
+
t.bigint "user_id"
|
1417
1489
|
t.text "note"
|
1418
1490
|
t.datetime "executed_at"
|
1419
1491
|
t.string "user_import_file_name"
|
@@ -1423,47 +1495,49 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1423
1495
|
t.string "user_import_fingerprint"
|
1424
1496
|
t.string "edit_mode"
|
1425
1497
|
t.text "error_message"
|
1426
|
-
t.datetime "created_at"
|
1427
|
-
t.datetime "updated_at"
|
1498
|
+
t.datetime "created_at", null: false
|
1499
|
+
t.datetime "updated_at", null: false
|
1428
1500
|
t.string "user_encoding"
|
1429
|
-
t.
|
1430
|
-
t.
|
1501
|
+
t.bigint "default_library_id"
|
1502
|
+
t.bigint "default_user_group_id"
|
1503
|
+
t.index ["default_library_id"], name: "index_user_import_files_on_default_library_id"
|
1504
|
+
t.index ["default_user_group_id"], name: "index_user_import_files_on_default_user_group_id"
|
1431
1505
|
t.index ["user_id"], name: "index_user_import_files_on_user_id"
|
1432
1506
|
end
|
1433
1507
|
|
1434
|
-
create_table "user_import_results",
|
1435
|
-
t.
|
1436
|
-
t.
|
1508
|
+
create_table "user_import_results", force: :cascade do |t|
|
1509
|
+
t.bigint "user_import_file_id"
|
1510
|
+
t.bigint "user_id"
|
1437
1511
|
t.text "body"
|
1438
|
-
t.datetime "created_at"
|
1439
|
-
t.datetime "updated_at"
|
1512
|
+
t.datetime "created_at", null: false
|
1513
|
+
t.datetime "updated_at", null: false
|
1440
1514
|
t.text "error_message"
|
1441
1515
|
t.index ["user_id"], name: "index_user_import_results_on_user_id"
|
1442
1516
|
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1443
1517
|
end
|
1444
1518
|
|
1445
|
-
create_table "user_reserve_stat_transitions",
|
1519
|
+
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
1446
1520
|
t.string "to_state"
|
1447
1521
|
t.text "metadata", default: "{}"
|
1448
1522
|
t.integer "sort_key"
|
1449
1523
|
t.integer "user_reserve_stat_id"
|
1450
|
-
t.datetime "created_at"
|
1451
|
-
t.datetime "updated_at"
|
1524
|
+
t.datetime "created_at", null: false
|
1525
|
+
t.datetime "updated_at", null: false
|
1452
1526
|
t.boolean "most_recent", null: false
|
1453
1527
|
t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1454
1528
|
t.index ["user_reserve_stat_id", "most_recent"], name: "index_user_reserve_stat_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1455
1529
|
t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1456
1530
|
end
|
1457
1531
|
|
1458
|
-
create_table "user_reserve_stats",
|
1532
|
+
create_table "user_reserve_stats", force: :cascade do |t|
|
1459
1533
|
t.datetime "start_date"
|
1460
1534
|
t.datetime "end_date"
|
1461
1535
|
t.text "note"
|
1462
|
-
t.datetime "created_at"
|
1463
|
-
t.datetime "updated_at"
|
1536
|
+
t.datetime "created_at", null: false
|
1537
|
+
t.datetime "updated_at", null: false
|
1464
1538
|
t.datetime "started_at"
|
1465
1539
|
t.datetime "completed_at"
|
1466
|
-
t.
|
1540
|
+
t.bigint "user_id"
|
1467
1541
|
t.index ["user_id"], name: "index_user_reserve_stats_on_user_id"
|
1468
1542
|
end
|
1469
1543
|
|
@@ -1481,7 +1555,6 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1481
1555
|
t.datetime "created_at"
|
1482
1556
|
t.datetime "updated_at"
|
1483
1557
|
t.string "username"
|
1484
|
-
t.datetime "deleted_at"
|
1485
1558
|
t.datetime "expired_at"
|
1486
1559
|
t.integer "failed_attempts", default: 0
|
1487
1560
|
t.string "unlock_token"
|
@@ -1505,10 +1578,10 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1505
1578
|
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
|
1506
1579
|
end
|
1507
1580
|
|
1508
|
-
create_table "withdraws",
|
1509
|
-
t.
|
1510
|
-
t.
|
1511
|
-
t.
|
1581
|
+
create_table "withdraws", force: :cascade do |t|
|
1582
|
+
t.bigint "basket_id"
|
1583
|
+
t.bigint "item_id"
|
1584
|
+
t.bigint "librarian_id"
|
1512
1585
|
t.datetime "created_at", null: false
|
1513
1586
|
t.datetime "updated_at", null: false
|
1514
1587
|
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
@@ -1521,7 +1594,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1521
1594
|
add_foreign_key "checked_items", "baskets"
|
1522
1595
|
add_foreign_key "checked_items", "items"
|
1523
1596
|
add_foreign_key "checked_items", "users"
|
1524
|
-
add_foreign_key "checkins", "
|
1597
|
+
add_foreign_key "checkins", "checkouts"
|
1525
1598
|
add_foreign_key "checkins", "items"
|
1526
1599
|
add_foreign_key "checkout_stat_has_manifestations", "manifestations"
|
1527
1600
|
add_foreign_key "checkout_stat_has_users", "user_checkout_stats"
|
@@ -1534,7 +1607,12 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1534
1607
|
add_foreign_key "demands", "items"
|
1535
1608
|
add_foreign_key "demands", "messages"
|
1536
1609
|
add_foreign_key "demands", "users"
|
1610
|
+
add_foreign_key "doi_records", "manifestations"
|
1537
1611
|
add_foreign_key "events", "event_categories"
|
1612
|
+
add_foreign_key "isbn_record_and_manifestations", "isbn_records"
|
1613
|
+
add_foreign_key "isbn_record_and_manifestations", "manifestations"
|
1614
|
+
add_foreign_key "issn_record_and_manifestations", "issn_records"
|
1615
|
+
add_foreign_key "issn_record_and_manifestations", "manifestations"
|
1538
1616
|
add_foreign_key "item_has_use_restrictions", "items"
|
1539
1617
|
add_foreign_key "item_has_use_restrictions", "use_restrictions"
|
1540
1618
|
add_foreign_key "items", "manifestations"
|
@@ -1542,6 +1620,9 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
|
|
1542
1620
|
add_foreign_key "library_groups", "users"
|
1543
1621
|
add_foreign_key "manifestation_checkout_stats", "users"
|
1544
1622
|
add_foreign_key "manifestation_reserve_stats", "users"
|
1623
|
+
add_foreign_key "periodical_and_manifestations", "manifestations"
|
1624
|
+
add_foreign_key "periodical_and_manifestations", "periodicals"
|
1625
|
+
add_foreign_key "periodicals", "frequencies"
|
1545
1626
|
add_foreign_key "profiles", "users"
|
1546
1627
|
add_foreign_key "reserve_stat_has_manifestations", "manifestations"
|
1547
1628
|
add_foreign_key "reserve_stat_has_users", "user_reserve_stats"
|