enju_seed 0.3.5 → 0.4.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +9 -7
- data/Rakefile +16 -7
- data/app/controllers/profiles_controller.rb +33 -33
- data/app/controllers/roles_controller.rb +3 -2
- data/app/models/concerns/enju_seed/enju_user.rb +26 -30
- data/app/models/concerns/master_model.rb +2 -13
- data/app/models/identity.rb +3 -3
- data/app/models/profile.rb +14 -14
- data/app/models/role.rb +11 -27
- data/app/models/user_has_role.rb +6 -3
- data/app/policies/user_export_file_policy.rb +21 -0
- data/app/policies/user_import_file_policy.rb +21 -0
- data/app/policies/user_import_result_policy.rb +21 -0
- data/app/views/profiles/show.html.erb +1 -1
- data/app/views/roles/_form.html.erb +1 -1
- data/app/views/roles/show.html.erb +6 -1
- data/db/migrate/041_create_roles.rb +6 -7
- data/db/migrate/20100606065209_create_user_has_roles.rb +3 -3
- data/db/migrate/20130221154434_add_additional_attributes_to_user.rb +2 -2
- data/db/migrate/20140122054321_create_profiles.rb +5 -8
- data/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
- data/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
- data/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
- data/db/migrate/20150421023923_create_identities.rb +4 -6
- data/db/migrate/20151126005552_add_provider_to_identity.rb +2 -2
- data/db/migrate/20170114174536_add_profile_id_to_user.rb +5 -0
- data/lib/enju_seed.rb +2 -3
- data/lib/enju_seed/engine.rb +2 -3
- data/lib/enju_seed/localized_name.rb +1 -3
- data/lib/enju_seed/version.rb +1 -1
- data/lib/tasks/enju_seed_tasks.rake +4 -8
- data/spec/controllers/my_accounts_controller_spec.rb +45 -56
- data/spec/controllers/profiles_controller_spec.rb +147 -152
- data/spec/controllers/roles_controller_spec.rb +35 -35
- data/spec/dummy/Rakefile +1 -1
- data/spec/dummy/app/models/user.rb +3 -3
- data/spec/dummy/bin/rails +1 -1
- data/spec/dummy/bin/setup +10 -19
- data/spec/dummy/config.ru +1 -2
- data/spec/dummy/config/application.rb +1 -6
- data/spec/dummy/config/database.yml +70 -10
- data/spec/dummy/config/environments/development.rb +1 -1
- data/spec/dummy/config/environments/production.rb +3 -8
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/config/initializers/assets.rb +4 -7
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -2
- data/spec/dummy/config/initializers/friendly_id.rb +75 -75
- data/spec/dummy/config/initializers/wrap_parameters.rb +2 -2
- data/spec/dummy/config/routes.rb +0 -4
- data/spec/dummy/config/secrets.yml +5 -15
- data/spec/dummy/db/migrate/001_create_agents.rb +7 -7
- data/spec/dummy/db/migrate/002_devise_create_users.rb +3 -4
- data/spec/dummy/db/migrate/005_create_manifestations.rb +4 -5
- data/spec/dummy/db/migrate/006_create_items.rb +3 -4
- data/spec/dummy/db/migrate/012_create_owns.rb +3 -5
- data/spec/dummy/db/migrate/015_create_creates.rb +3 -5
- data/spec/dummy/db/migrate/032_create_checkins.rb +1 -1
- data/spec/dummy/db/migrate/033_create_checkouts.rb +1 -1
- data/spec/dummy/db/migrate/035_create_reserves.rb +1 -1
- data/spec/dummy/db/migrate/047_create_produces.rb +3 -5
- data/spec/dummy/db/migrate/059_create_libraries.rb +8 -7
- data/spec/dummy/db/migrate/069_create_shelves.rb +3 -3
- data/spec/dummy/db/migrate/073_create_carrier_types.rb +2 -2
- data/spec/dummy/db/migrate/077_create_user_groups.rb +4 -4
- data/spec/dummy/db/migrate/080_create_library_groups.rb +6 -6
- data/spec/dummy/db/migrate/112_create_frequencies.rb +2 -2
- data/spec/dummy/db/migrate/117_create_form_of_works.rb +2 -2
- data/spec/dummy/db/migrate/120_create_baskets.rb +2 -2
- data/spec/dummy/db/migrate/121_create_checked_items.rb +1 -1
- data/spec/dummy/db/migrate/124_create_bookstores.rb +3 -3
- data/spec/dummy/db/migrate/125_create_donates.rb +3 -3
- data/spec/dummy/db/migrate/127_create_use_restrictions.rb +1 -1
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +1 -1
- data/spec/dummy/db/migrate/130_create_request_status_types.rb +3 -3
- data/spec/dummy/db/migrate/131_create_request_types.rb +3 -3
- data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +1 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +2 -2
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
- data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +3 -5
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +11 -0
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +2 -2
- data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +5 -3
- data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +3 -4
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +6 -6
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +5 -5
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +6 -6
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -2
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +1 -1
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +1 -1
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +1 -1
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +1 -1
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +1 -1
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +1 -1
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +1 -1
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +1 -1
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +1 -1
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +1 -1
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +1 -1
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.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 +2 -2
- data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +2 -2
- data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +2 -2
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +2 -2
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
- data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +4 -7
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +2 -2
- 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 +4 -6
- data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +2 -2
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +2 -2
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +2 -2
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.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/20110621093332_remove_expire_date_from_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +1 -1
- data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +3 -3
- data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.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/20111129044509_add_pickup_location_to_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
- data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
- data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +2 -2
- data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +4 -4
- 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/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/20120424103932_add_librarian_id_to_checked_item.rb +1 -1
- data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +2 -2
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
- data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.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 +2 -3
- data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +1 -1
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +1 -1
- data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +3 -3
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +3 -3
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +3 -3
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +3 -3
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +3 -3
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +3 -3
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +3 -2
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +4 -4
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +4 -4
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -5
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +15 -0
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -2
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +3 -3
- 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 +2 -3
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -2
- 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 +2 -2
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +2 -2
- 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 +2 -3
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +1 -1
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +1 -1
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_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 +4 -2
- 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/20141014065831_add_shelf_id_to_checkout.rb +1 -1
- data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +1 -1
- data/spec/dummy/db/migrate/20141029131633_create_periodicals.rb +11 -0
- data/spec/dummy/db/migrate/20150106001709_create_demands.rb +1 -1
- data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +2 -2
- data/spec/dummy/db/migrate/20150302110310_add_attachment_id_to_manifestation.rb +7 -0
- data/spec/dummy/db/migrate/20150304183215_add_picture_id_to_picture_file.rb +7 -0
- data/spec/dummy/db/migrate/20150305025906_add_resource_import_id_to_resource_import_file.rb +7 -0
- data/spec/dummy/db/migrate/20150305030046_add_resource_export_id_to_resource_export_file.rb +8 -0
- data/spec/dummy/db/migrate/20150305031709_add_agent_import_id_to_agent_import_file.rb +7 -0
- data/spec/dummy/db/migrate/20150305105231_add_attachment_fingerprint_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20150420145354_add_attachment_to_carrier_type.rb +8 -0
- data/spec/dummy/db/migrate/20150420145420_add_attachment_to_content_type.rb +8 -0
- data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +4 -4
- data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +11 -5
- data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +3 -20
- data/spec/dummy/db/migrate/20151216123621_create_doi_records.rb +12 -0
- data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +2 -1
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +2 -1
- data/spec/dummy/db/migrate/20160513000929_create_agent_names.rb +18 -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/20160703184619_add_most_recent_to_reserve_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_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/20160813191533_add_book_jacket_source_to_library_group.rb +5 -0
- 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/20160813191820_add_screenshot_generator_to_library_group.rb +5 -0
- 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/20161111175127_add_attachment_data_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20161111193255_add_attachment_data_to_carrier_type.rb +5 -0
- data/spec/dummy/db/migrate/20161111193346_add_attachment_data_to_content_type.rb +5 -0
- data/spec/dummy/db/migrate/20161112122706_add_attachment_data_to_resource_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20161112122750_add_attachment_data_to_resource_export_file.rb +5 -0
- data/spec/dummy/db/migrate/20161112122814_add_attachment_data_to_agent_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20161114083857_add_image_data_to_picture_file.rb +5 -0
- data/spec/dummy/db/migrate/20161115184747_add_attachment_data_to_user_import_file.rb +5 -0
- data/spec/dummy/db/migrate/20161115184756_add_attachment_data_to_user_export_file.rb +5 -0
- data/spec/dummy/db/schema.rb +401 -450
- data/spec/factories/profile.rb +8 -8
- data/spec/factories/user.rb +25 -22
- data/spec/factories/user_group.rb +1 -1
- data/spec/fixtures/libraries.yml +37 -37
- data/spec/fixtures/library_groups.yml +27 -19
- data/spec/fixtures/profiles.yml +27 -35
- data/spec/fixtures/roles.yml +12 -12
- data/spec/fixtures/user_groups.yml +20 -10
- data/spec/fixtures/user_has_roles.yml +2 -2
- data/spec/fixtures/users.yml +7 -0
- data/spec/models/profile_spec.rb +17 -18
- data/spec/models/role_spec.rb +17 -18
- data/spec/models/user_has_role_spec.rb +4 -5
- data/spec/models/user_spec.rb +14 -16
- data/spec/rails_helper.rb +4 -9
- data/spec/requests/profiles_spec.rb +3 -3
- data/spec/routing/profiles_routing_spec.rb +16 -18
- data/spec/routing/roles_routing_spec.rb +16 -18
- data/spec/routing/users_spec.rb +6 -7
- data/spec/spec_helper.rb +47 -49
- data/spec/support/controller_macros.rb +6 -6
- data/spec/views/my_accounts/show.html.erb_spec.rb +6 -6
- data/spec/views/profiles/edit.html.erb_spec.rb +7 -7
- data/spec/views/profiles/index.html.erb_spec.rb +3 -3
- data/spec/views/profiles/new.html.erb_spec.rb +5 -6
- data/spec/views/profiles/show.html.erb_spec.rb +4 -4
- metadata +309 -456
- data/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +0 -11
- data/lib/generators/enju_seed/setup/setup_generator.rb +0 -9
- data/lib/generators/enju_seed/setup/templates/db/fixtures/roles.yml +0 -38
- data/lib/generators/enju_seed/update/update_generator.rb +0 -9
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/bin/update +0 -29
- data/spec/dummy/bin/yarn +0 -11
- data/spec/dummy/config/cable.yml +0 -10
- data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/spec/dummy/config/puma.rb +0 -56
- data/spec/dummy/config/spring.rb +0 -6
- data/spec/dummy/db/migrate/149_create_message_templates.rb +0 -18
- data/spec/dummy/db/migrate/154_create_messages.rb +0 -23
- data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +0 -18
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +0 -21
- data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +0 -11
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -6
- data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +0 -5
- data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +0 -5
- data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +0 -5
- data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +0 -5
- data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +0 -6
- data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +0 -9
- data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +0 -11
- data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +0 -11
- data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +0 -11
- data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +0 -5
- data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +0 -5
- data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +0 -5
- data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +0 -5
- data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +0 -5
- data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +0 -5
- data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +0 -13
- data/spec/dummy/db/migrate/20181026064038_add_login_banner_to_library_group.rb +0 -6
- data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +0 -14
- data/spec/dummy/db/migrate/20181030074920_add_not_null_to_position_on_library.rb +0 -14
- data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +0 -27
- data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +0 -10
- data/spec/dummy/db/migrate/20190314151124_add_full_name_translations_to_create.rb +0 -7
- data/spec/dummy/package.json +0 -5
- data/spec/fixtures/message_requests.yml +0 -26
- data/spec/fixtures/message_templates.yml +0 -98
- data/spec/fixtures/messages.yml +0 -56
- data/spec/system/profiles_spec.rb +0 -39
- data/spec/views/roles/edit.html.erb_spec.rb +0 -18
- data/spec/views/roles/index.html.erb_spec.rb +0 -14
- data/spec/views/roles/new.html.erb_spec.rb +0 -18
- data/spec/views/roles/show.html.erb_spec.rb +0 -14
@@ -0,0 +1,8 @@
|
|
1
|
+
class AddAttachmentToContentType < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :content_types, :attachment_id, :string
|
4
|
+
add_column :content_types, :attachment_filename, :string
|
5
|
+
add_column :content_types, :attachment_size, :integer
|
6
|
+
add_column :content_types, :attachment_content_type, :string
|
7
|
+
end
|
8
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
class CreateWithdraws < ActiveRecord::Migration[
|
1
|
+
class CreateWithdraws < ActiveRecord::Migration[5.1]
|
2
2
|
def change
|
3
3
|
create_table :withdraws do |t|
|
4
|
-
t.references :basket,
|
5
|
-
t.references :item,
|
6
|
-
t.
|
4
|
+
t.references :basket, foreign_key: {on_delete: :nullify}
|
5
|
+
t.references :item, foreign_key: true, type: :uuid
|
6
|
+
t.integer :librarian_id
|
7
7
|
|
8
8
|
t.timestamps null: false
|
9
9
|
end
|
@@ -1,12 +1,14 @@
|
|
1
1
|
# This migration comes from enju_library_engine (originally 20151213070943)
|
2
|
-
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[
|
2
|
+
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[5.1]
|
3
3
|
def up
|
4
4
|
if defined?(Globalize)
|
5
5
|
LibraryGroup.create_translation_table!({
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
login_banner: :text
|
7
|
+
}, migrate_data: true)
|
8
|
+
end
|
9
|
+
|
10
|
+
if defined?(AwesomeHstoreTranslate)
|
11
|
+
add_column :library_groups, :login_banner, :hstore
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
@@ -14,5 +16,9 @@ class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
|
|
14
16
|
if defined?(Globalize)
|
15
17
|
LibraryGroup.drop_translation_table! migrate_data: true
|
16
18
|
end
|
19
|
+
|
20
|
+
if defined?(AwesomeHstoreTranslate)
|
21
|
+
remove_column :library_groups, :login_banner
|
22
|
+
end
|
17
23
|
end
|
18
24
|
end
|
@@ -1,22 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
if defined?(Globalize)
|
5
|
-
LibraryGroup.add_translation_fields! footer_banner: :text
|
6
|
-
end
|
7
|
-
|
8
|
-
if defined?(AwesomeHstoreTranslate)
|
9
|
-
add_column :library_groups, :footer_banner, :hstore
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def down
|
14
|
-
if defined?(Globalize)
|
15
|
-
remove_column :library_group_translations, :footer_banner
|
16
|
-
end
|
17
|
-
|
18
|
-
if defined?(AwesomeHstoreTranslate)
|
19
|
-
remove_column :library_groups, :footer_banner
|
20
|
-
end
|
1
|
+
class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :library_groups, :footer_banner_translations, :jsonb
|
21
4
|
end
|
22
5
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreateDoiRecords < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :doi_records do |t|
|
4
|
+
t.string :body, index: {unique: true}, null: false
|
5
|
+
t.string :registration_agency
|
6
|
+
t.references :manifestation, foreign_key: true, type: :uuid
|
7
|
+
t.string :source
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -1,9 +1,10 @@
|
|
1
|
-
class CreateIssnRecords < ActiveRecord::Migration[5.
|
1
|
+
class CreateIssnRecords < ActiveRecord::Migration[5.1]
|
2
2
|
def change
|
3
3
|
create_table :issn_records do |t|
|
4
4
|
t.string :body, index: {unique: true}, null: false
|
5
5
|
t.string :issn_type
|
6
6
|
t.string :source
|
7
|
+
t.references :manifestation, foreign_key: true, type: :uuid
|
7
8
|
|
8
9
|
t.timestamps
|
9
10
|
end
|
@@ -1,9 +1,10 @@
|
|
1
|
-
class CreateIsbnRecords < ActiveRecord::Migration[5.
|
1
|
+
class CreateIsbnRecords < ActiveRecord::Migration[5.1]
|
2
2
|
def change
|
3
3
|
create_table :isbn_records do |t|
|
4
4
|
t.string :body, index: {unique: true}, null: false
|
5
5
|
t.string :isbn_type
|
6
6
|
t.string :source
|
7
|
+
t.references :manifestation, foreign_key: true, type: :uuid
|
7
8
|
|
8
9
|
t.timestamps
|
9
10
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateAgentNames < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :agent_names do |t|
|
4
|
+
t.string :first_name
|
5
|
+
t.string :middle_name
|
6
|
+
t.string :last_name
|
7
|
+
t.string :full_name, index: true
|
8
|
+
t.references :language, index: true
|
9
|
+
t.references :agent, index: true
|
10
|
+
t.references :profile, index: true
|
11
|
+
t.integer :position
|
12
|
+
t.string :source
|
13
|
+
t.string :name_type
|
14
|
+
|
15
|
+
t.timestamps null: false
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddMostRecentToManifestationCheckoutStatTransitions < ActiveRecord::Migration[
|
1
|
+
class AddMostRecentToManifestationCheckoutStatTransitions < ActiveRecord::Migration[5.1]
|
2
2
|
def up
|
3
3
|
add_column :manifestation_checkout_stat_transitions, :most_recent, :boolean, null: true
|
4
4
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddMostRecentToManifestationReserveStatTransitions < ActiveRecord::Migration[
|
1
|
+
class AddMostRecentToManifestationReserveStatTransitions < ActiveRecord::Migration[5.1]
|
2
2
|
def up
|
3
3
|
add_column :manifestation_reserve_stat_transitions, :most_recent, :boolean, null: true
|
4
4
|
end
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,49 +10,30 @@
|
|
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: 2017_01_14_174536) do
|
14
|
+
|
15
|
+
# These are extensions that must be enabled in order to support this database
|
16
|
+
enable_extension "pgcrypto"
|
17
|
+
enable_extension "plpgsql"
|
14
18
|
|
15
19
|
create_table "accepts", force: :cascade do |t|
|
16
|
-
t.
|
17
|
-
t.
|
20
|
+
t.bigint "basket_id"
|
21
|
+
t.uuid "item_id"
|
18
22
|
t.integer "librarian_id"
|
19
|
-
t.datetime "created_at"
|
20
|
-
t.datetime "updated_at"
|
23
|
+
t.datetime "created_at", null: false
|
24
|
+
t.datetime "updated_at", null: false
|
21
25
|
t.index ["basket_id"], name: "index_accepts_on_basket_id"
|
22
26
|
t.index ["item_id"], name: "index_accepts_on_item_id"
|
23
|
-
t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
|
24
|
-
end
|
25
|
-
|
26
|
-
create_table "active_storage_attachments", force: :cascade do |t|
|
27
|
-
t.string "name", null: false
|
28
|
-
t.string "record_type", null: false
|
29
|
-
t.integer "record_id", null: false
|
30
|
-
t.integer "blob_id", null: false
|
31
|
-
t.datetime "created_at", null: false
|
32
|
-
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
33
|
-
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
34
|
-
end
|
35
|
-
|
36
|
-
create_table "active_storage_blobs", force: :cascade do |t|
|
37
|
-
t.string "key", null: false
|
38
|
-
t.string "filename", null: false
|
39
|
-
t.string "content_type"
|
40
|
-
t.text "metadata"
|
41
|
-
t.bigint "byte_size", null: false
|
42
|
-
t.string "checksum", null: false
|
43
|
-
t.datetime "created_at", null: false
|
44
|
-
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
45
27
|
end
|
46
28
|
|
47
29
|
create_table "agent_import_file_transitions", force: :cascade do |t|
|
48
30
|
t.string "to_state"
|
49
|
-
t.
|
31
|
+
t.jsonb "metadata", default: "{}"
|
50
32
|
t.integer "sort_key"
|
51
33
|
t.integer "agent_import_file_id"
|
52
|
-
t.datetime "created_at"
|
53
|
-
t.datetime "updated_at"
|
54
|
-
t.boolean "most_recent"
|
55
|
-
t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
34
|
+
t.datetime "created_at", null: false
|
35
|
+
t.datetime "updated_at", null: false
|
36
|
+
t.boolean "most_recent"
|
56
37
|
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
57
38
|
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
58
39
|
end
|
@@ -66,14 +47,16 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
66
47
|
t.datetime "executed_at"
|
67
48
|
t.string "agent_import_file_name"
|
68
49
|
t.string "agent_import_content_type"
|
69
|
-
t.integer "
|
50
|
+
t.integer "agent_import_size"
|
70
51
|
t.datetime "agent_import_updated_at"
|
71
|
-
t.datetime "created_at"
|
72
|
-
t.datetime "updated_at"
|
52
|
+
t.datetime "created_at", null: false
|
53
|
+
t.datetime "updated_at", null: false
|
73
54
|
t.string "agent_import_fingerprint"
|
74
|
-
t.text "error_message"
|
75
55
|
t.string "edit_mode"
|
76
56
|
t.string "user_encoding"
|
57
|
+
t.string "agent_import_id"
|
58
|
+
t.jsonb "attachment_data"
|
59
|
+
t.index ["agent_import_id"], name: "index_agent_import_files_on_agent_import_id"
|
77
60
|
t.index ["parent_id"], name: "index_agent_import_files_on_parent_id"
|
78
61
|
t.index ["user_id"], name: "index_agent_import_files_on_user_id"
|
79
62
|
end
|
@@ -82,40 +65,59 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
82
65
|
t.integer "agent_import_file_id"
|
83
66
|
t.integer "agent_id"
|
84
67
|
t.text "body"
|
85
|
-
t.datetime "created_at"
|
86
|
-
t.datetime "updated_at"
|
68
|
+
t.datetime "created_at", null: false
|
69
|
+
t.datetime "updated_at", null: false
|
87
70
|
end
|
88
71
|
|
89
72
|
create_table "agent_merge_lists", force: :cascade do |t|
|
90
73
|
t.string "title"
|
91
|
-
t.datetime "created_at"
|
92
|
-
t.datetime "updated_at"
|
74
|
+
t.datetime "created_at", null: false
|
75
|
+
t.datetime "updated_at", null: false
|
93
76
|
end
|
94
77
|
|
95
78
|
create_table "agent_merges", force: :cascade do |t|
|
96
79
|
t.integer "agent_id", null: false
|
97
80
|
t.integer "agent_merge_list_id", null: false
|
98
|
-
t.datetime "created_at"
|
99
|
-
t.datetime "updated_at"
|
81
|
+
t.datetime "created_at", null: false
|
82
|
+
t.datetime "updated_at", null: false
|
100
83
|
t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
|
101
84
|
t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
102
85
|
end
|
103
86
|
|
87
|
+
create_table "agent_names", force: :cascade do |t|
|
88
|
+
t.string "first_name"
|
89
|
+
t.string "middle_name"
|
90
|
+
t.string "last_name"
|
91
|
+
t.string "full_name"
|
92
|
+
t.bigint "language_id"
|
93
|
+
t.bigint "agent_id"
|
94
|
+
t.bigint "profile_id"
|
95
|
+
t.integer "position"
|
96
|
+
t.string "source"
|
97
|
+
t.string "name_type"
|
98
|
+
t.datetime "created_at", null: false
|
99
|
+
t.datetime "updated_at", null: false
|
100
|
+
t.index ["agent_id"], name: "index_agent_names_on_agent_id"
|
101
|
+
t.index ["full_name"], name: "index_agent_names_on_full_name"
|
102
|
+
t.index ["language_id"], name: "index_agent_names_on_language_id"
|
103
|
+
t.index ["profile_id"], name: "index_agent_names_on_profile_id"
|
104
|
+
end
|
105
|
+
|
104
106
|
create_table "agent_relationship_types", force: :cascade do |t|
|
105
107
|
t.string "name", null: false
|
106
108
|
t.text "display_name"
|
107
109
|
t.text "note"
|
108
110
|
t.integer "position"
|
109
|
-
t.datetime "created_at"
|
110
|
-
t.datetime "updated_at"
|
111
|
+
t.datetime "created_at", null: false
|
112
|
+
t.datetime "updated_at", null: false
|
111
113
|
end
|
112
114
|
|
113
115
|
create_table "agent_relationships", force: :cascade do |t|
|
114
116
|
t.integer "parent_id"
|
115
117
|
t.integer "child_id"
|
116
118
|
t.integer "agent_relationship_type_id"
|
117
|
-
t.datetime "created_at"
|
118
|
-
t.datetime "updated_at"
|
119
|
+
t.datetime "created_at", null: false
|
120
|
+
t.datetime "updated_at", null: false
|
119
121
|
t.integer "position"
|
120
122
|
t.index ["child_id"], name: "index_agent_relationships_on_child_id"
|
121
123
|
t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
@@ -125,9 +127,9 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
125
127
|
t.string "name", null: false
|
126
128
|
t.text "display_name"
|
127
129
|
t.text "note"
|
128
|
-
t.integer "position"
|
129
|
-
t.datetime "created_at"
|
130
|
-
t.datetime "updated_at"
|
130
|
+
t.integer "position"
|
131
|
+
t.datetime "created_at", null: false
|
132
|
+
t.datetime "updated_at", null: false
|
131
133
|
end
|
132
134
|
|
133
135
|
create_table "agents", force: :cascade do |t|
|
@@ -142,8 +144,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
142
144
|
t.string "full_name"
|
143
145
|
t.text "full_name_transcription"
|
144
146
|
t.text "full_name_alternative"
|
145
|
-
t.datetime "created_at"
|
146
|
-
t.datetime "updated_at"
|
147
|
+
t.datetime "created_at", null: false
|
148
|
+
t.datetime "updated_at", null: false
|
147
149
|
t.datetime "deleted_at"
|
148
150
|
t.string "zip_code_1"
|
149
151
|
t.string "zip_code_2"
|
@@ -186,35 +188,35 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
186
188
|
end
|
187
189
|
|
188
190
|
create_table "baskets", force: :cascade do |t|
|
189
|
-
t.
|
191
|
+
t.bigint "user_id"
|
190
192
|
t.text "note"
|
191
193
|
t.integer "lock_version", default: 0, null: false
|
192
|
-
t.datetime "created_at"
|
193
|
-
t.datetime "updated_at"
|
194
|
+
t.datetime "created_at", null: false
|
195
|
+
t.datetime "updated_at", null: false
|
194
196
|
t.index ["user_id"], name: "index_baskets_on_user_id"
|
195
197
|
end
|
196
198
|
|
197
|
-
create_table "bookstores", force: :cascade do |t|
|
198
|
-
t.
|
199
|
+
create_table "bookstores", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
200
|
+
t.string "name", null: false
|
199
201
|
t.string "zip_code"
|
200
202
|
t.text "address"
|
201
203
|
t.text "note"
|
202
204
|
t.string "telephone_number"
|
203
205
|
t.string "fax_number"
|
204
206
|
t.string "url"
|
205
|
-
t.integer "position"
|
207
|
+
t.integer "position"
|
206
208
|
t.datetime "deleted_at"
|
207
|
-
t.datetime "created_at"
|
208
|
-
t.datetime "updated_at"
|
209
|
+
t.datetime "created_at", null: false
|
210
|
+
t.datetime "updated_at", null: false
|
209
211
|
end
|
210
212
|
|
211
213
|
create_table "budget_types", force: :cascade do |t|
|
212
214
|
t.string "name"
|
213
215
|
t.text "display_name"
|
214
216
|
t.text "note"
|
215
|
-
t.integer "position"
|
216
|
-
t.datetime "created_at"
|
217
|
-
t.datetime "updated_at"
|
217
|
+
t.integer "position"
|
218
|
+
t.datetime "created_at", null: false
|
219
|
+
t.datetime "updated_at", null: false
|
218
220
|
end
|
219
221
|
|
220
222
|
create_table "carrier_type_has_checkout_types", force: :cascade do |t|
|
@@ -222,31 +224,32 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
222
224
|
t.integer "checkout_type_id", null: false
|
223
225
|
t.text "note"
|
224
226
|
t.integer "position"
|
225
|
-
t.datetime "created_at"
|
226
|
-
t.datetime "updated_at"
|
227
|
+
t.datetime "created_at", null: false
|
228
|
+
t.datetime "updated_at", null: false
|
227
229
|
t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
|
228
230
|
t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
229
231
|
end
|
230
232
|
|
231
233
|
create_table "carrier_types", force: :cascade do |t|
|
232
234
|
t.string "name", null: false
|
233
|
-
t.
|
235
|
+
t.jsonb "display_name_translations"
|
234
236
|
t.text "note"
|
235
|
-
t.integer "position"
|
236
|
-
t.datetime "created_at"
|
237
|
-
t.datetime "updated_at"
|
238
|
-
t.string "
|
237
|
+
t.integer "position"
|
238
|
+
t.datetime "created_at", null: false
|
239
|
+
t.datetime "updated_at", null: false
|
240
|
+
t.string "attachment_id"
|
241
|
+
t.string "attachment_filename"
|
242
|
+
t.integer "attachment_size"
|
239
243
|
t.string "attachment_content_type"
|
240
|
-
t.
|
241
|
-
t.datetime "attachment_updated_at"
|
244
|
+
t.jsonb "attachment_data"
|
242
245
|
end
|
243
246
|
|
244
247
|
create_table "checked_items", force: :cascade do |t|
|
245
248
|
t.integer "item_id", null: false
|
246
249
|
t.integer "basket_id", null: false
|
247
250
|
t.datetime "due_date", null: false
|
248
|
-
t.datetime "created_at"
|
249
|
-
t.datetime "updated_at"
|
251
|
+
t.datetime "created_at", null: false
|
252
|
+
t.datetime "updated_at", null: false
|
250
253
|
t.integer "librarian_id"
|
251
254
|
t.index ["basket_id"], name: "index_checked_items_on_basket_id"
|
252
255
|
t.index ["item_id"], name: "index_checked_items_on_item_id"
|
@@ -256,8 +259,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
256
259
|
t.integer "item_id", null: false
|
257
260
|
t.integer "librarian_id"
|
258
261
|
t.integer "basket_id"
|
259
|
-
t.datetime "created_at"
|
260
|
-
t.datetime "updated_at"
|
262
|
+
t.datetime "created_at", null: false
|
263
|
+
t.datetime "updated_at", null: false
|
261
264
|
t.integer "lock_version", default: 0, null: false
|
262
265
|
t.index ["basket_id"], name: "index_checkins_on_basket_id"
|
263
266
|
t.index ["item_id"], name: "index_checkins_on_item_id"
|
@@ -268,8 +271,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
268
271
|
t.integer "manifestation_checkout_stat_id", null: false
|
269
272
|
t.integer "manifestation_id", null: false
|
270
273
|
t.integer "checkouts_count"
|
271
|
-
t.datetime "created_at"
|
272
|
-
t.datetime "updated_at"
|
274
|
+
t.datetime "created_at", null: false
|
275
|
+
t.datetime "updated_at", null: false
|
273
276
|
t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
274
277
|
t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
|
275
278
|
end
|
@@ -278,8 +281,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
278
281
|
t.integer "user_checkout_stat_id", null: false
|
279
282
|
t.integer "user_id", null: false
|
280
283
|
t.integer "checkouts_count", default: 0, null: false
|
281
|
-
t.datetime "created_at"
|
282
|
-
t.datetime "updated_at"
|
284
|
+
t.datetime "created_at", null: false
|
285
|
+
t.datetime "updated_at", null: false
|
283
286
|
t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
284
287
|
t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
|
285
288
|
end
|
@@ -289,8 +292,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
289
292
|
t.text "display_name"
|
290
293
|
t.text "note"
|
291
294
|
t.integer "position"
|
292
|
-
t.datetime "created_at"
|
293
|
-
t.datetime "updated_at"
|
295
|
+
t.datetime "created_at", null: false
|
296
|
+
t.datetime "updated_at", null: false
|
294
297
|
t.index ["name"], name: "index_checkout_types_on_name"
|
295
298
|
end
|
296
299
|
|
@@ -303,8 +306,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
303
306
|
t.datetime "due_date"
|
304
307
|
t.integer "checkout_renewal_count", default: 0, null: false
|
305
308
|
t.integer "lock_version", default: 0, null: false
|
306
|
-
t.datetime "created_at"
|
307
|
-
t.datetime "updated_at"
|
309
|
+
t.datetime "created_at", null: false
|
310
|
+
t.datetime "updated_at", null: false
|
308
311
|
t.integer "shelf_id"
|
309
312
|
t.integer "library_id"
|
310
313
|
t.index ["basket_id"], name: "index_checkouts_on_basket_id"
|
@@ -322,27 +325,32 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
322
325
|
t.text "display_name"
|
323
326
|
t.text "note"
|
324
327
|
t.integer "position"
|
325
|
-
t.datetime "created_at"
|
326
|
-
t.datetime "updated_at"
|
328
|
+
t.datetime "created_at", null: false
|
329
|
+
t.datetime "updated_at", null: false
|
327
330
|
end
|
328
331
|
|
329
332
|
create_table "colors", force: :cascade do |t|
|
330
333
|
t.integer "library_group_id"
|
331
334
|
t.string "property"
|
332
335
|
t.string "code"
|
333
|
-
t.integer "position"
|
334
|
-
t.datetime "created_at"
|
335
|
-
t.datetime "updated_at"
|
336
|
+
t.integer "position"
|
337
|
+
t.datetime "created_at", null: false
|
338
|
+
t.datetime "updated_at", null: false
|
336
339
|
t.index ["library_group_id"], name: "index_colors_on_library_group_id"
|
337
340
|
end
|
338
341
|
|
339
342
|
create_table "content_types", force: :cascade do |t|
|
340
343
|
t.string "name", null: false
|
341
|
-
t.
|
344
|
+
t.jsonb "display_name_translations"
|
342
345
|
t.text "note"
|
343
|
-
t.integer "position"
|
344
|
-
t.datetime "created_at"
|
345
|
-
t.datetime "updated_at"
|
346
|
+
t.integer "position"
|
347
|
+
t.datetime "created_at", null: false
|
348
|
+
t.datetime "updated_at", null: false
|
349
|
+
t.string "attachment_id"
|
350
|
+
t.string "attachment_filename"
|
351
|
+
t.integer "attachment_size"
|
352
|
+
t.string "attachment_content_type"
|
353
|
+
t.jsonb "attachment_data"
|
346
354
|
end
|
347
355
|
|
348
356
|
create_table "countries", force: :cascade do |t|
|
@@ -364,18 +372,17 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
364
372
|
t.text "display_name"
|
365
373
|
t.text "note"
|
366
374
|
t.integer "position"
|
367
|
-
t.datetime "created_at"
|
368
|
-
t.datetime "updated_at"
|
375
|
+
t.datetime "created_at", null: false
|
376
|
+
t.datetime "updated_at", null: false
|
369
377
|
end
|
370
378
|
|
371
379
|
create_table "creates", force: :cascade do |t|
|
372
|
-
t.
|
373
|
-
t.
|
374
|
-
t.integer "position"
|
375
|
-
t.datetime "created_at"
|
376
|
-
t.datetime "updated_at"
|
380
|
+
t.bigint "agent_id", null: false
|
381
|
+
t.uuid "work_id", null: false
|
382
|
+
t.integer "position"
|
383
|
+
t.datetime "created_at", null: false
|
384
|
+
t.datetime "updated_at", null: false
|
377
385
|
t.integer "create_type_id"
|
378
|
-
t.json "full_name_translations", default: {}
|
379
386
|
t.index ["agent_id"], name: "index_creates_on_agent_id"
|
380
387
|
t.index ["work_id"], name: "index_creates_on_work_id"
|
381
388
|
end
|
@@ -391,31 +398,52 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
391
398
|
t.index ["user_id"], name: "index_demands_on_user_id"
|
392
399
|
end
|
393
400
|
|
401
|
+
create_table "doi_records", force: :cascade do |t|
|
402
|
+
t.string "body", null: false
|
403
|
+
t.string "registration_agency"
|
404
|
+
t.uuid "manifestation_id"
|
405
|
+
t.string "source"
|
406
|
+
t.datetime "created_at", null: false
|
407
|
+
t.datetime "updated_at", null: false
|
408
|
+
t.index ["body"], name: "index_doi_records_on_body", unique: true
|
409
|
+
t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id"
|
410
|
+
end
|
411
|
+
|
394
412
|
create_table "donates", force: :cascade do |t|
|
395
413
|
t.integer "agent_id", null: false
|
396
414
|
t.integer "item_id", null: false
|
397
|
-
t.datetime "created_at"
|
398
|
-
t.datetime "updated_at"
|
415
|
+
t.datetime "created_at", null: false
|
416
|
+
t.datetime "updated_at", null: false
|
399
417
|
t.index ["agent_id"], name: "index_donates_on_agent_id"
|
400
418
|
t.index ["item_id"], name: "index_donates_on_item_id"
|
401
419
|
end
|
402
420
|
|
421
|
+
create_table "exemplifies", force: :cascade do |t|
|
422
|
+
t.uuid "manifestation_id", null: false
|
423
|
+
t.uuid "item_id", null: false
|
424
|
+
t.integer "position"
|
425
|
+
t.datetime "created_at", null: false
|
426
|
+
t.datetime "updated_at", null: false
|
427
|
+
t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true
|
428
|
+
t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
|
429
|
+
end
|
430
|
+
|
403
431
|
create_table "form_of_works", force: :cascade do |t|
|
404
432
|
t.string "name", null: false
|
405
|
-
t.
|
433
|
+
t.jsonb "display_name_translations"
|
406
434
|
t.text "note"
|
407
|
-
t.integer "position"
|
408
|
-
t.datetime "created_at"
|
409
|
-
t.datetime "updated_at"
|
435
|
+
t.integer "position"
|
436
|
+
t.datetime "created_at", null: false
|
437
|
+
t.datetime "updated_at", null: false
|
410
438
|
end
|
411
439
|
|
412
440
|
create_table "frequencies", force: :cascade do |t|
|
413
441
|
t.string "name", null: false
|
414
|
-
t.
|
442
|
+
t.jsonb "display_name_translations"
|
415
443
|
t.text "note"
|
416
|
-
t.integer "position"
|
417
|
-
t.datetime "created_at"
|
418
|
-
t.datetime "updated_at"
|
444
|
+
t.integer "position"
|
445
|
+
t.datetime "created_at", null: false
|
446
|
+
t.datetime "updated_at", null: false
|
419
447
|
end
|
420
448
|
|
421
449
|
create_table "identifier_types", force: :cascade do |t|
|
@@ -423,18 +451,18 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
423
451
|
t.text "display_name"
|
424
452
|
t.text "note"
|
425
453
|
t.integer "position"
|
426
|
-
t.datetime "created_at"
|
427
|
-
t.datetime "updated_at"
|
454
|
+
t.datetime "created_at", null: false
|
455
|
+
t.datetime "updated_at", null: false
|
428
456
|
end
|
429
457
|
|
430
458
|
create_table "identifiers", force: :cascade do |t|
|
431
459
|
t.string "body", null: false
|
432
460
|
t.integer "identifier_type_id", null: false
|
433
|
-
t.
|
461
|
+
t.uuid "manifestation_id"
|
434
462
|
t.boolean "primary"
|
435
463
|
t.integer "position"
|
436
|
-
t.datetime "created_at"
|
437
|
-
t.datetime "updated_at"
|
464
|
+
t.datetime "created_at", null: false
|
465
|
+
t.datetime "updated_at", null: false
|
438
466
|
t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
439
467
|
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
440
468
|
end
|
@@ -443,10 +471,10 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
443
471
|
t.string "name"
|
444
472
|
t.string "email"
|
445
473
|
t.string "password_digest"
|
446
|
-
t.
|
474
|
+
t.bigint "profile_id"
|
447
475
|
t.datetime "created_at", null: false
|
448
476
|
t.datetime "updated_at", null: false
|
449
|
-
t.string "provider"
|
477
|
+
t.string "provider", null: false
|
450
478
|
t.index ["email"], name: "index_identities_on_email"
|
451
479
|
t.index ["name"], name: "index_identities_on_name"
|
452
480
|
t.index ["profile_id"], name: "index_identities_on_profile_id"
|
@@ -454,82 +482,77 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
454
482
|
|
455
483
|
create_table "import_request_transitions", force: :cascade do |t|
|
456
484
|
t.string "to_state"
|
457
|
-
t.
|
485
|
+
t.jsonb "metadata", default: "{}"
|
458
486
|
t.integer "sort_key"
|
459
487
|
t.integer "import_request_id"
|
460
|
-
t.datetime "created_at"
|
461
|
-
t.datetime "updated_at"
|
462
|
-
t.boolean "most_recent"
|
463
|
-
t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
488
|
+
t.datetime "created_at", null: false
|
489
|
+
t.datetime "updated_at", null: false
|
490
|
+
t.boolean "most_recent"
|
464
491
|
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
465
492
|
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
466
493
|
end
|
467
494
|
|
468
495
|
create_table "import_requests", force: :cascade do |t|
|
469
496
|
t.string "isbn"
|
470
|
-
t.
|
471
|
-
t.
|
472
|
-
t.datetime "created_at"
|
473
|
-
t.datetime "updated_at"
|
497
|
+
t.uuid "manifestation_id"
|
498
|
+
t.bigint "user_id"
|
499
|
+
t.datetime "created_at", null: false
|
500
|
+
t.datetime "updated_at", null: false
|
474
501
|
t.index ["isbn"], name: "index_import_requests_on_isbn"
|
475
502
|
t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
476
503
|
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
477
504
|
end
|
478
505
|
|
479
|
-
create_table "isbn_record_and_manifestations", force: :cascade do |t|
|
480
|
-
t.integer "isbn_record_id", null: false
|
481
|
-
t.integer "manifestation_id", null: false
|
482
|
-
t.integer "position"
|
483
|
-
t.datetime "created_at", null: false
|
484
|
-
t.datetime "updated_at", null: false
|
485
|
-
t.index ["isbn_record_id"], name: "index_isbn_record_and_manifestations_on_isbn_record_id"
|
486
|
-
t.index ["manifestation_id"], name: "index_isbn_record_and_manifestations_on_manifestation_id"
|
487
|
-
end
|
488
|
-
|
489
506
|
create_table "isbn_records", force: :cascade do |t|
|
490
507
|
t.string "body", null: false
|
491
508
|
t.string "isbn_type"
|
492
509
|
t.string "source"
|
510
|
+
t.uuid "manifestation_id"
|
493
511
|
t.datetime "created_at", null: false
|
494
512
|
t.datetime "updated_at", null: false
|
495
513
|
t.index ["body"], name: "index_isbn_records_on_body", unique: true
|
496
|
-
|
497
|
-
|
498
|
-
create_table "issn_record_and_manifestations", force: :cascade do |t|
|
499
|
-
t.integer "issn_record_id", null: false
|
500
|
-
t.integer "manifestation_id", null: false
|
501
|
-
t.integer "position"
|
502
|
-
t.datetime "created_at", null: false
|
503
|
-
t.datetime "updated_at", null: false
|
504
|
-
t.index ["issn_record_id"], name: "index_issn_record_and_manifestations_on_issn_record_id"
|
505
|
-
t.index ["manifestation_id"], name: "index_issn_record_and_manifestations_on_manifestation_id"
|
514
|
+
t.index ["manifestation_id"], name: "index_isbn_records_on_manifestation_id"
|
506
515
|
end
|
507
516
|
|
508
517
|
create_table "issn_records", force: :cascade do |t|
|
509
518
|
t.string "body", null: false
|
510
519
|
t.string "issn_type"
|
511
520
|
t.string "source"
|
521
|
+
t.uuid "manifestation_id"
|
512
522
|
t.datetime "created_at", null: false
|
513
523
|
t.datetime "updated_at", null: false
|
514
524
|
t.index ["body"], name: "index_issn_records_on_body", unique: true
|
525
|
+
t.index ["manifestation_id"], name: "index_issn_records_on_manifestation_id"
|
515
526
|
end
|
516
527
|
|
517
528
|
create_table "item_has_use_restrictions", force: :cascade do |t|
|
518
529
|
t.integer "item_id", null: false
|
519
530
|
t.integer "use_restriction_id", null: false
|
520
|
-
t.datetime "created_at"
|
521
|
-
t.datetime "updated_at"
|
531
|
+
t.datetime "created_at", null: false
|
532
|
+
t.datetime "updated_at", null: false
|
522
533
|
t.index ["item_id"], name: "index_item_has_use_restrictions_on_item_id"
|
523
534
|
t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
|
524
535
|
end
|
525
536
|
|
526
|
-
create_table "
|
537
|
+
create_table "item_transitions", force: :cascade do |t|
|
538
|
+
t.string "to_state", null: false
|
539
|
+
t.jsonb "metadata", default: "{}"
|
540
|
+
t.integer "sort_key", null: false
|
541
|
+
t.uuid "item_id", null: false
|
542
|
+
t.boolean "most_recent", null: false
|
543
|
+
t.datetime "created_at", null: false
|
544
|
+
t.datetime "updated_at", null: false
|
545
|
+
t.index ["item_id"], name: "index_item_transitions_on_item_id"
|
546
|
+
t.index ["sort_key", "item_id"], name: "index_item_transitions_on_sort_key_and_item_id", unique: true
|
547
|
+
end
|
548
|
+
|
549
|
+
create_table "items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
527
550
|
t.string "call_number"
|
528
551
|
t.string "item_identifier"
|
529
|
-
t.datetime "created_at"
|
530
|
-
t.datetime "updated_at"
|
552
|
+
t.datetime "created_at", null: false
|
553
|
+
t.datetime "updated_at", null: false
|
531
554
|
t.datetime "deleted_at"
|
532
|
-
t.
|
555
|
+
t.bigint "shelf_id", default: 1
|
533
556
|
t.boolean "include_supplements", default: false, null: false
|
534
557
|
t.text "note"
|
535
558
|
t.string "url"
|
@@ -545,7 +568,7 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
545
568
|
t.string "binding_item_identifier"
|
546
569
|
t.string "binding_call_number"
|
547
570
|
t.datetime "binded_at"
|
548
|
-
t.
|
571
|
+
t.uuid "manifestation_id"
|
549
572
|
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
550
573
|
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
551
574
|
t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
|
@@ -571,24 +594,10 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
571
594
|
t.index ["name"], name: "index_languages_on_name", unique: true
|
572
595
|
end
|
573
596
|
|
574
|
-
create_table "
|
575
|
-
t.integer "item_id", null: false
|
576
|
-
t.integer "user_group_id", null: false
|
577
|
-
t.integer "loan_period", default: 0, null: false
|
578
|
-
t.datetime "fixed_due_date"
|
579
|
-
t.integer "renewal", default: 0, null: false
|
580
|
-
t.integer "fine", default: 0, null: false
|
581
|
-
t.text "note"
|
582
|
-
t.integer "position"
|
583
|
-
t.datetime "created_at"
|
584
|
-
t.datetime "updated_at"
|
585
|
-
t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
|
586
|
-
end
|
587
|
-
|
588
|
-
create_table "libraries", force: :cascade do |t|
|
597
|
+
create_table "libraries", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
589
598
|
t.string "name", null: false
|
590
|
-
t.
|
591
|
-
t.
|
599
|
+
t.jsonb "display_name_translations"
|
600
|
+
t.jsonb "short_display_name_translations"
|
592
601
|
t.string "zip_code"
|
593
602
|
t.text "street"
|
594
603
|
t.text "locality"
|
@@ -599,60 +608,45 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
599
608
|
t.text "note"
|
600
609
|
t.integer "call_number_rows", default: 1, null: false
|
601
610
|
t.string "call_number_delimiter", default: "|", null: false
|
602
|
-
t.integer "library_group_id", null: false
|
611
|
+
t.integer "library_group_id", default: 1, null: false
|
603
612
|
t.integer "users_count", default: 0, null: false
|
604
|
-
t.integer "position"
|
613
|
+
t.integer "position"
|
605
614
|
t.integer "country_id"
|
606
|
-
t.datetime "created_at"
|
607
|
-
t.datetime "updated_at"
|
615
|
+
t.datetime "created_at", null: false
|
616
|
+
t.datetime "updated_at", null: false
|
608
617
|
t.datetime "deleted_at"
|
609
618
|
t.text "opening_hour"
|
610
619
|
t.string "isil"
|
611
620
|
t.float "latitude"
|
612
621
|
t.float "longitude"
|
613
622
|
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
614
|
-
t.index ["name"], name: "index_libraries_on_name"
|
615
|
-
end
|
616
|
-
|
617
|
-
create_table "library_group_translations", force: :cascade do |t|
|
618
|
-
t.integer "library_group_id", null: false
|
619
|
-
t.string "locale", null: false
|
620
|
-
t.datetime "created_at", null: false
|
621
|
-
t.datetime "updated_at", null: false
|
622
|
-
t.text "login_banner"
|
623
|
-
t.text "footer_banner"
|
624
|
-
t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
|
625
|
-
t.index ["locale"], name: "index_library_group_translations_on_locale"
|
623
|
+
t.index ["name"], name: "index_libraries_on_name", unique: true
|
626
624
|
end
|
627
625
|
|
628
626
|
create_table "library_groups", force: :cascade do |t|
|
629
627
|
t.string "name", null: false
|
630
|
-
t.
|
628
|
+
t.jsonb "display_name_translations"
|
631
629
|
t.string "short_name", null: false
|
632
|
-
t.
|
633
|
-
t.
|
630
|
+
t.cidr "my_networks"
|
631
|
+
t.jsonb "login_banner_translations"
|
634
632
|
t.text "note"
|
635
633
|
t.integer "country_id"
|
636
|
-
t.integer "position"
|
637
|
-
t.datetime "created_at"
|
638
|
-
t.datetime "updated_at"
|
639
|
-
t.
|
634
|
+
t.integer "position"
|
635
|
+
t.datetime "created_at", null: false
|
636
|
+
t.datetime "updated_at", null: false
|
637
|
+
t.cidr "admin_networks"
|
640
638
|
t.string "url", default: "http://localhost:3000/"
|
641
|
-
t.
|
639
|
+
t.jsonb "settings"
|
640
|
+
t.jsonb "footer_banner_translations"
|
642
641
|
t.text "html_snippet"
|
642
|
+
t.string "book_jacket_source"
|
643
643
|
t.integer "max_number_of_results", default: 500
|
644
644
|
t.boolean "family_name_first", default: true
|
645
|
+
t.string "screenshot_generator"
|
645
646
|
t.integer "pub_year_facet_range_interval", default: 10
|
646
|
-
t.
|
647
|
-
t.
|
648
|
-
t.
|
649
|
-
t.string "header_logo_content_type"
|
650
|
-
t.integer "header_logo_file_size"
|
651
|
-
t.datetime "header_logo_updated_at"
|
652
|
-
t.text "header_logo_meta"
|
653
|
-
t.json "login_banner_translations", default: "\"{}\"", null: false
|
654
|
-
t.json "footer_banner_translations", default: "\"{}\"", null: false
|
655
|
-
t.index ["short_name"], name: "index_library_groups_on_short_name"
|
647
|
+
t.bigint "user_id"
|
648
|
+
t.index ["name"], name: "index_library_groups_on_name", unique: true
|
649
|
+
t.index ["short_name"], name: "index_library_groups_on_short_name", unique: true
|
656
650
|
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
657
651
|
end
|
658
652
|
|
@@ -660,9 +654,9 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
660
654
|
t.string "name", null: false
|
661
655
|
t.string "display_name"
|
662
656
|
t.text "note"
|
663
|
-
t.integer "position"
|
664
|
-
t.datetime "created_at"
|
665
|
-
t.datetime "updated_at"
|
657
|
+
t.integer "position"
|
658
|
+
t.datetime "created_at", null: false
|
659
|
+
t.datetime "updated_at", null: false
|
666
660
|
end
|
667
661
|
|
668
662
|
create_table "manifestation_checkout_stat_transitions", force: :cascade do |t|
|
@@ -670,8 +664,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
670
664
|
t.text "metadata", default: "{}"
|
671
665
|
t.integer "sort_key"
|
672
666
|
t.integer "manifestation_checkout_stat_id"
|
673
|
-
t.datetime "created_at"
|
674
|
-
t.datetime "updated_at"
|
667
|
+
t.datetime "created_at", null: false
|
668
|
+
t.datetime "updated_at", null: false
|
675
669
|
t.boolean "most_recent"
|
676
670
|
t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
677
671
|
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
@@ -681,8 +675,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
681
675
|
t.datetime "start_date"
|
682
676
|
t.datetime "end_date"
|
683
677
|
t.text "note"
|
684
|
-
t.datetime "created_at"
|
685
|
-
t.datetime "updated_at"
|
678
|
+
t.datetime "created_at", null: false
|
679
|
+
t.datetime "updated_at", null: false
|
686
680
|
t.datetime "started_at"
|
687
681
|
t.datetime "completed_at"
|
688
682
|
t.integer "user_id"
|
@@ -694,18 +688,19 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
694
688
|
t.text "display_name"
|
695
689
|
t.text "note"
|
696
690
|
t.integer "position"
|
697
|
-
t.datetime "created_at"
|
698
|
-
t.datetime "updated_at"
|
691
|
+
t.datetime "created_at", null: false
|
692
|
+
t.datetime "updated_at", null: false
|
699
693
|
end
|
700
694
|
|
701
695
|
create_table "manifestation_relationships", force: :cascade do |t|
|
702
|
-
t.
|
703
|
-
t.
|
704
|
-
t.
|
705
|
-
t.datetime "created_at"
|
706
|
-
t.datetime "updated_at"
|
696
|
+
t.uuid "parent_id"
|
697
|
+
t.uuid "child_id"
|
698
|
+
t.bigint "manifestation_relationship_type_id"
|
699
|
+
t.datetime "created_at", null: false
|
700
|
+
t.datetime "updated_at", null: false
|
707
701
|
t.integer "position"
|
708
702
|
t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
703
|
+
t.index ["manifestation_relationship_type_id"], name: "index_manifestation_relationships_on_relationship_type_id"
|
709
704
|
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
710
705
|
end
|
711
706
|
|
@@ -714,8 +709,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
714
709
|
t.text "metadata", default: "{}"
|
715
710
|
t.integer "sort_key"
|
716
711
|
t.integer "manifestation_reserve_stat_id"
|
717
|
-
t.datetime "created_at"
|
718
|
-
t.datetime "updated_at"
|
712
|
+
t.datetime "created_at", null: false
|
713
|
+
t.datetime "updated_at", null: false
|
719
714
|
t.boolean "most_recent"
|
720
715
|
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
721
716
|
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
@@ -725,15 +720,15 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
725
720
|
t.datetime "start_date"
|
726
721
|
t.datetime "end_date"
|
727
722
|
t.text "note"
|
728
|
-
t.datetime "created_at"
|
729
|
-
t.datetime "updated_at"
|
723
|
+
t.datetime "created_at", null: false
|
724
|
+
t.datetime "updated_at", null: false
|
730
725
|
t.datetime "started_at"
|
731
726
|
t.datetime "completed_at"
|
732
727
|
t.integer "user_id"
|
733
728
|
t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
|
734
729
|
end
|
735
730
|
|
736
|
-
create_table "manifestations", force: :cascade do |t|
|
731
|
+
create_table "manifestations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
737
732
|
t.text "original_title", null: false
|
738
733
|
t.text "title_alternative"
|
739
734
|
t.text "title_transcription"
|
@@ -741,12 +736,12 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
741
736
|
t.string "manifestation_identifier"
|
742
737
|
t.datetime "date_of_publication"
|
743
738
|
t.datetime "date_copyrighted"
|
744
|
-
t.datetime "created_at"
|
745
|
-
t.datetime "updated_at"
|
739
|
+
t.datetime "created_at", null: false
|
740
|
+
t.datetime "updated_at", null: false
|
746
741
|
t.datetime "deleted_at"
|
747
742
|
t.string "access_address"
|
748
743
|
t.integer "language_id", default: 1, null: false
|
749
|
-
t.
|
744
|
+
t.bigint "carrier_type_id", null: false
|
750
745
|
t.integer "start_page"
|
751
746
|
t.integer "end_page"
|
752
747
|
t.integer "height"
|
@@ -767,7 +762,7 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
767
762
|
t.boolean "subscription_master", default: false, null: false
|
768
763
|
t.string "attachment_file_name"
|
769
764
|
t.string "attachment_content_type"
|
770
|
-
t.integer "
|
765
|
+
t.integer "attachment_size"
|
771
766
|
t.datetime "attachment_updated_at"
|
772
767
|
t.text "title_alternative_transcription"
|
773
768
|
t.text "description"
|
@@ -792,104 +787,43 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
792
787
|
t.text "publication_place"
|
793
788
|
t.text "extent"
|
794
789
|
t.text "dimensions"
|
790
|
+
t.string "attachment_id"
|
791
|
+
t.string "attachment_fingerprint"
|
792
|
+
t.jsonb "attachment_data"
|
795
793
|
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
794
|
+
t.index ["attachment_id"], name: "index_manifestations_on_attachment_id"
|
795
|
+
t.index ["carrier_type_id"], name: "index_manifestations_on_carrier_type_id"
|
796
796
|
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
797
|
-
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
|
797
|
+
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier", unique: true
|
798
798
|
t.index ["updated_at"], name: "index_manifestations_on_updated_at"
|
799
799
|
end
|
800
800
|
|
801
801
|
create_table "medium_of_performances", force: :cascade do |t|
|
802
802
|
t.string "name", null: false
|
803
|
-
t.
|
803
|
+
t.jsonb "display_name_translations"
|
804
804
|
t.text "note"
|
805
805
|
t.integer "position"
|
806
|
-
t.datetime "created_at"
|
807
|
-
t.datetime "updated_at"
|
808
|
-
end
|
809
|
-
|
810
|
-
create_table "message_request_transitions", force: :cascade do |t|
|
811
|
-
t.string "to_state"
|
812
|
-
t.text "metadata", default: "{}"
|
813
|
-
t.integer "sort_key"
|
814
|
-
t.integer "message_request_id"
|
815
|
-
t.datetime "created_at"
|
816
|
-
t.datetime "updated_at"
|
817
|
-
t.boolean "most_recent", null: false
|
818
|
-
t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
819
|
-
t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
820
|
-
t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
821
|
-
end
|
822
|
-
|
823
|
-
create_table "message_requests", force: :cascade do |t|
|
824
|
-
t.integer "sender_id"
|
825
|
-
t.integer "receiver_id"
|
826
|
-
t.integer "message_template_id"
|
827
|
-
t.datetime "sent_at"
|
828
|
-
t.datetime "deleted_at"
|
829
|
-
t.text "body"
|
830
|
-
t.datetime "created_at"
|
831
|
-
t.datetime "updated_at"
|
832
|
-
end
|
833
|
-
|
834
|
-
create_table "message_templates", force: :cascade do |t|
|
835
|
-
t.string "status", null: false
|
836
|
-
t.text "title", null: false
|
837
|
-
t.text "body", null: false
|
838
|
-
t.integer "position"
|
839
|
-
t.string "locale", default: "en"
|
840
|
-
t.datetime "created_at"
|
841
|
-
t.datetime "updated_at"
|
842
|
-
t.index ["status"], name: "index_message_templates_on_status", unique: true
|
843
|
-
end
|
844
|
-
|
845
|
-
create_table "message_transitions", force: :cascade do |t|
|
846
|
-
t.string "to_state"
|
847
|
-
t.text "metadata", default: "{}"
|
848
|
-
t.integer "sort_key"
|
849
|
-
t.integer "message_id"
|
850
|
-
t.datetime "created_at"
|
851
|
-
t.datetime "updated_at"
|
852
|
-
t.boolean "most_recent", null: false
|
853
|
-
t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
|
854
|
-
t.index ["message_id"], name: "index_message_transitions_on_message_id"
|
855
|
-
t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
856
|
-
end
|
857
|
-
|
858
|
-
create_table "messages", force: :cascade do |t|
|
859
|
-
t.datetime "read_at"
|
860
|
-
t.integer "receiver_id"
|
861
|
-
t.integer "sender_id"
|
862
|
-
t.string "subject", null: false
|
863
|
-
t.text "body"
|
864
|
-
t.integer "message_request_id"
|
865
|
-
t.integer "parent_id"
|
866
|
-
t.datetime "created_at"
|
867
|
-
t.datetime "updated_at"
|
868
|
-
t.integer "lft"
|
869
|
-
t.integer "rgt"
|
870
|
-
t.integer "depth"
|
871
|
-
t.index ["message_request_id"], name: "index_messages_on_message_request_id"
|
872
|
-
t.index ["parent_id"], name: "index_messages_on_parent_id"
|
873
|
-
t.index ["receiver_id"], name: "index_messages_on_receiver_id"
|
874
|
-
t.index ["sender_id"], name: "index_messages_on_sender_id"
|
806
|
+
t.datetime "created_at", null: false
|
807
|
+
t.datetime "updated_at", null: false
|
875
808
|
end
|
876
809
|
|
877
810
|
create_table "owns", force: :cascade do |t|
|
878
|
-
t.
|
879
|
-
t.
|
880
|
-
t.integer "position"
|
881
|
-
t.datetime "created_at"
|
882
|
-
t.datetime "updated_at"
|
811
|
+
t.bigint "agent_id", null: false
|
812
|
+
t.uuid "item_id", null: false
|
813
|
+
t.integer "position"
|
814
|
+
t.datetime "created_at", null: false
|
815
|
+
t.datetime "updated_at", null: false
|
883
816
|
t.index ["agent_id"], name: "index_owns_on_agent_id"
|
884
817
|
t.index ["item_id"], name: "index_owns_on_item_id"
|
885
818
|
end
|
886
819
|
|
887
820
|
create_table "periodicals", force: :cascade do |t|
|
888
|
-
t.text "original_title"
|
889
|
-
t.
|
821
|
+
t.text "original_title"
|
822
|
+
t.string "periodical_type"
|
823
|
+
t.uuid "manifestation_id"
|
890
824
|
t.datetime "created_at", null: false
|
891
825
|
t.datetime "updated_at", null: false
|
892
|
-
t.index ["
|
826
|
+
t.index ["manifestation_id"], name: "index_periodicals_on_manifestation_id"
|
893
827
|
end
|
894
828
|
|
895
829
|
create_table "picture_files", force: :cascade do |t|
|
@@ -899,17 +833,18 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
899
833
|
t.text "title"
|
900
834
|
t.string "thumbnail"
|
901
835
|
t.integer "position"
|
902
|
-
t.datetime "created_at"
|
903
|
-
t.datetime "updated_at"
|
836
|
+
t.datetime "created_at", null: false
|
837
|
+
t.datetime "updated_at", null: false
|
904
838
|
t.string "picture_file_name"
|
905
839
|
t.string "picture_content_type"
|
906
|
-
t.integer "
|
840
|
+
t.integer "picture_size"
|
907
841
|
t.datetime "picture_updated_at"
|
908
842
|
t.text "picture_meta"
|
909
843
|
t.string "picture_fingerprint"
|
910
|
-
t.
|
911
|
-
t.
|
844
|
+
t.string "picture_id"
|
845
|
+
t.jsonb "image_data"
|
912
846
|
t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
847
|
+
t.index ["picture_id"], name: "index_picture_files_on_picture_id"
|
913
848
|
end
|
914
849
|
|
915
850
|
create_table "produce_types", force: :cascade do |t|
|
@@ -917,34 +852,32 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
917
852
|
t.text "display_name"
|
918
853
|
t.text "note"
|
919
854
|
t.integer "position"
|
920
|
-
t.datetime "created_at"
|
921
|
-
t.datetime "updated_at"
|
855
|
+
t.datetime "created_at", null: false
|
856
|
+
t.datetime "updated_at", null: false
|
922
857
|
end
|
923
858
|
|
924
859
|
create_table "produces", force: :cascade do |t|
|
925
|
-
t.
|
926
|
-
t.
|
927
|
-
t.integer "position"
|
928
|
-
t.datetime "created_at"
|
929
|
-
t.datetime "updated_at"
|
860
|
+
t.bigint "agent_id", null: false
|
861
|
+
t.uuid "manifestation_id", null: false
|
862
|
+
t.integer "position"
|
863
|
+
t.datetime "created_at", null: false
|
864
|
+
t.datetime "updated_at", null: false
|
930
865
|
t.integer "produce_type_id"
|
931
|
-
t.json "full_name_translations", default: {}
|
932
866
|
t.index ["agent_id"], name: "index_produces_on_agent_id"
|
933
867
|
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
934
868
|
end
|
935
869
|
|
936
|
-
create_table "profiles", force: :cascade do |t|
|
937
|
-
t.
|
938
|
-
t.
|
939
|
-
t.integer "library_id"
|
870
|
+
create_table "profiles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
871
|
+
t.uuid "user_group_id"
|
872
|
+
t.uuid "library_id"
|
940
873
|
t.string "locale"
|
941
874
|
t.string "user_number"
|
942
875
|
t.text "full_name"
|
943
876
|
t.text "note"
|
944
877
|
t.text "keyword_list"
|
945
|
-
t.
|
946
|
-
t.datetime "created_at"
|
947
|
-
t.datetime "updated_at"
|
878
|
+
t.bigint "required_role_id"
|
879
|
+
t.datetime "created_at", null: false
|
880
|
+
t.datetime "updated_at", null: false
|
948
881
|
t.string "checkout_icalendar_token"
|
949
882
|
t.boolean "save_checkout_history", default: false, null: false
|
950
883
|
t.datetime "expired_at"
|
@@ -953,7 +886,6 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
953
886
|
t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
|
954
887
|
t.index ["library_id"], name: "index_profiles_on_library_id"
|
955
888
|
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
956
|
-
t.index ["user_id"], name: "index_profiles_on_user_id"
|
957
889
|
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
958
890
|
end
|
959
891
|
|
@@ -962,46 +894,47 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
962
894
|
t.text "display_name"
|
963
895
|
t.text "note"
|
964
896
|
t.integer "position"
|
965
|
-
t.datetime "created_at"
|
966
|
-
t.datetime "updated_at"
|
897
|
+
t.datetime "created_at", null: false
|
898
|
+
t.datetime "updated_at", null: false
|
967
899
|
end
|
968
900
|
|
969
901
|
create_table "realizes", force: :cascade do |t|
|
970
|
-
t.
|
971
|
-
t.
|
972
|
-
t.integer "position"
|
973
|
-
t.datetime "created_at"
|
974
|
-
t.datetime "updated_at"
|
902
|
+
t.bigint "agent_id", null: false
|
903
|
+
t.uuid "expression_id", null: false
|
904
|
+
t.integer "position"
|
905
|
+
t.datetime "created_at", null: false
|
906
|
+
t.datetime "updated_at", null: false
|
975
907
|
t.integer "realize_type_id"
|
976
|
-
t.json "full_name_translations", default: {}
|
977
908
|
t.index ["agent_id"], name: "index_realizes_on_agent_id"
|
978
909
|
t.index ["expression_id"], name: "index_realizes_on_expression_id"
|
979
910
|
end
|
980
911
|
|
981
912
|
create_table "request_status_types", force: :cascade do |t|
|
982
913
|
t.string "name", null: false
|
983
|
-
t.
|
914
|
+
t.jsonb "display_name_translations"
|
984
915
|
t.text "note"
|
985
|
-
t.integer "position"
|
986
|
-
t.datetime "created_at"
|
987
|
-
t.datetime "updated_at"
|
916
|
+
t.integer "position"
|
917
|
+
t.datetime "created_at", null: false
|
918
|
+
t.datetime "updated_at", null: false
|
919
|
+
t.index ["name"], name: "index_request_status_types_on_name", unique: true
|
988
920
|
end
|
989
921
|
|
990
922
|
create_table "request_types", force: :cascade do |t|
|
991
923
|
t.string "name", null: false
|
992
|
-
t.
|
924
|
+
t.jsonb "display_name_translations"
|
993
925
|
t.text "note"
|
994
|
-
t.integer "position"
|
995
|
-
t.datetime "created_at"
|
996
|
-
t.datetime "updated_at"
|
926
|
+
t.integer "position"
|
927
|
+
t.datetime "created_at", null: false
|
928
|
+
t.datetime "updated_at", null: false
|
929
|
+
t.index ["name"], name: "index_request_types_on_name", unique: true
|
997
930
|
end
|
998
931
|
|
999
932
|
create_table "reserve_stat_has_manifestations", force: :cascade do |t|
|
1000
933
|
t.integer "manifestation_reserve_stat_id", null: false
|
1001
934
|
t.integer "manifestation_id", null: false
|
1002
935
|
t.integer "reserves_count"
|
1003
|
-
t.datetime "created_at"
|
1004
|
-
t.datetime "updated_at"
|
936
|
+
t.datetime "created_at", null: false
|
937
|
+
t.datetime "updated_at", null: false
|
1005
938
|
t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
|
1006
939
|
t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
1007
940
|
end
|
@@ -1010,8 +943,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1010
943
|
t.integer "user_reserve_stat_id", null: false
|
1011
944
|
t.integer "user_id", null: false
|
1012
945
|
t.integer "reserves_count"
|
1013
|
-
t.datetime "created_at"
|
1014
|
-
t.datetime "updated_at"
|
946
|
+
t.datetime "created_at", null: false
|
947
|
+
t.datetime "updated_at", null: false
|
1015
948
|
t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
|
1016
949
|
t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
1017
950
|
end
|
@@ -1021,8 +954,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1021
954
|
t.text "metadata", default: "{}"
|
1022
955
|
t.integer "sort_key"
|
1023
956
|
t.integer "reserve_id"
|
1024
|
-
t.datetime "created_at"
|
1025
|
-
t.datetime "updated_at"
|
957
|
+
t.datetime "created_at", null: false
|
958
|
+
t.datetime "updated_at", null: false
|
1026
959
|
t.boolean "most_recent"
|
1027
960
|
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
1028
961
|
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
@@ -1034,8 +967,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1034
967
|
t.integer "item_id"
|
1035
968
|
t.integer "request_status_type_id", null: false
|
1036
969
|
t.datetime "checked_out_at"
|
1037
|
-
t.datetime "created_at"
|
1038
|
-
t.datetime "updated_at"
|
970
|
+
t.datetime "created_at", null: false
|
971
|
+
t.datetime "updated_at", null: false
|
1039
972
|
t.datetime "canceled_at"
|
1040
973
|
t.datetime "expired_at"
|
1041
974
|
t.datetime "deleted_at"
|
@@ -1054,37 +987,36 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1054
987
|
|
1055
988
|
create_table "resource_export_file_transitions", force: :cascade do |t|
|
1056
989
|
t.string "to_state"
|
1057
|
-
t.
|
990
|
+
t.jsonb "metadata", default: "{}"
|
1058
991
|
t.integer "sort_key"
|
1059
992
|
t.integer "resource_export_file_id"
|
1060
|
-
t.datetime "created_at"
|
1061
|
-
t.datetime "updated_at"
|
1062
|
-
t.boolean "most_recent"
|
1063
|
-
t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
993
|
+
t.datetime "created_at", null: false
|
994
|
+
t.datetime "updated_at", null: false
|
995
|
+
t.boolean "most_recent"
|
1064
996
|
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1065
997
|
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1066
998
|
end
|
1067
999
|
|
1068
1000
|
create_table "resource_export_files", force: :cascade do |t|
|
1069
1001
|
t.integer "user_id"
|
1070
|
-
t.string "resource_export_file_name"
|
1071
|
-
t.string "resource_export_content_type"
|
1072
|
-
t.integer "resource_export_file_size"
|
1073
|
-
t.datetime "resource_export_updated_at"
|
1074
1002
|
t.datetime "executed_at"
|
1075
|
-
t.datetime "created_at"
|
1076
|
-
t.datetime "updated_at"
|
1003
|
+
t.datetime "created_at", null: false
|
1004
|
+
t.datetime "updated_at", null: false
|
1005
|
+
t.string "resource_export_id"
|
1006
|
+
t.integer "resource_export_size"
|
1007
|
+
t.string "resource_export_filename"
|
1008
|
+
t.jsonb "attachment_data"
|
1009
|
+
t.index ["resource_export_id"], name: "index_resource_export_files_on_resource_export_id"
|
1077
1010
|
end
|
1078
1011
|
|
1079
1012
|
create_table "resource_import_file_transitions", force: :cascade do |t|
|
1080
1013
|
t.string "to_state"
|
1081
|
-
t.
|
1014
|
+
t.jsonb "metadata", default: "{}"
|
1082
1015
|
t.integer "sort_key"
|
1083
1016
|
t.integer "resource_import_file_id"
|
1084
|
-
t.datetime "created_at"
|
1085
|
-
t.datetime "updated_at"
|
1086
|
-
t.boolean "most_recent"
|
1087
|
-
t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1017
|
+
t.datetime "created_at", null: false
|
1018
|
+
t.datetime "updated_at", null: false
|
1019
|
+
t.boolean "most_recent"
|
1088
1020
|
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1089
1021
|
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1090
1022
|
end
|
@@ -1098,16 +1030,18 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1098
1030
|
t.datetime "executed_at"
|
1099
1031
|
t.string "resource_import_file_name"
|
1100
1032
|
t.string "resource_import_content_type"
|
1101
|
-
t.integer "
|
1033
|
+
t.integer "resource_import_size"
|
1102
1034
|
t.datetime "resource_import_updated_at"
|
1103
|
-
t.datetime "created_at"
|
1104
|
-
t.datetime "updated_at"
|
1035
|
+
t.datetime "created_at", null: false
|
1036
|
+
t.datetime "updated_at", null: false
|
1105
1037
|
t.string "edit_mode"
|
1106
1038
|
t.string "resource_import_fingerprint"
|
1107
|
-
t.text "error_message"
|
1108
1039
|
t.string "user_encoding"
|
1109
1040
|
t.integer "default_shelf_id"
|
1041
|
+
t.string "resource_import_id"
|
1042
|
+
t.jsonb "attachment_data"
|
1110
1043
|
t.index ["parent_id"], name: "index_resource_import_files_on_parent_id"
|
1044
|
+
t.index ["resource_import_id"], name: "index_resource_import_files_on_resource_import_id"
|
1111
1045
|
t.index ["user_id"], name: "index_resource_import_files_on_user_id"
|
1112
1046
|
end
|
1113
1047
|
|
@@ -1116,9 +1050,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1116
1050
|
t.integer "manifestation_id"
|
1117
1051
|
t.integer "item_id"
|
1118
1052
|
t.text "body"
|
1119
|
-
t.datetime "created_at"
|
1120
|
-
t.datetime "updated_at"
|
1121
|
-
t.text "error_message"
|
1053
|
+
t.datetime "created_at", null: false
|
1054
|
+
t.datetime "updated_at", null: false
|
1122
1055
|
t.index ["item_id"], name: "index_resource_import_results_on_item_id"
|
1123
1056
|
t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
1124
1057
|
t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
|
@@ -1126,10 +1059,10 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1126
1059
|
|
1127
1060
|
create_table "roles", force: :cascade do |t|
|
1128
1061
|
t.string "name", null: false
|
1129
|
-
t.
|
1062
|
+
t.jsonb "display_name_translations"
|
1130
1063
|
t.text "note"
|
1131
|
-
t.datetime "created_at"
|
1132
|
-
t.datetime "updated_at"
|
1064
|
+
t.datetime "created_at", null: false
|
1065
|
+
t.datetime "updated_at", null: false
|
1133
1066
|
t.integer "score", default: 0, null: false
|
1134
1067
|
t.integer "position"
|
1135
1068
|
end
|
@@ -1143,22 +1076,22 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1143
1076
|
t.text "query_param", null: false
|
1144
1077
|
t.text "additional_param"
|
1145
1078
|
t.text "note"
|
1146
|
-
t.integer "position"
|
1147
|
-
t.datetime "created_at"
|
1148
|
-
t.datetime "updated_at"
|
1079
|
+
t.integer "position"
|
1080
|
+
t.datetime "created_at", null: false
|
1081
|
+
t.datetime "updated_at", null: false
|
1149
1082
|
end
|
1150
1083
|
|
1151
1084
|
create_table "series_statement_merge_lists", force: :cascade do |t|
|
1152
1085
|
t.string "title"
|
1153
|
-
t.datetime "created_at"
|
1154
|
-
t.datetime "updated_at"
|
1086
|
+
t.datetime "created_at", null: false
|
1087
|
+
t.datetime "updated_at", null: false
|
1155
1088
|
end
|
1156
1089
|
|
1157
1090
|
create_table "series_statement_merges", force: :cascade do |t|
|
1158
1091
|
t.integer "series_statement_id", null: false
|
1159
1092
|
t.integer "series_statement_merge_list_id", null: false
|
1160
|
-
t.datetime "created_at"
|
1161
|
-
t.datetime "updated_at"
|
1093
|
+
t.datetime "created_at", null: false
|
1094
|
+
t.datetime "updated_at", null: false
|
1162
1095
|
t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
1163
1096
|
t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
1164
1097
|
end
|
@@ -1169,8 +1102,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1169
1102
|
t.text "title_subseries"
|
1170
1103
|
t.text "numbering_subseries"
|
1171
1104
|
t.integer "position"
|
1172
|
-
t.datetime "created_at"
|
1173
|
-
t.datetime "updated_at"
|
1105
|
+
t.datetime "created_at", null: false
|
1106
|
+
t.datetime "updated_at", null: false
|
1174
1107
|
t.text "title_transcription"
|
1175
1108
|
t.text "title_alternative"
|
1176
1109
|
t.string "series_statement_identifier"
|
@@ -1189,25 +1122,25 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1189
1122
|
|
1190
1123
|
create_table "shelves", force: :cascade do |t|
|
1191
1124
|
t.string "name", null: false
|
1192
|
-
t.
|
1125
|
+
t.jsonb "display_name_translations"
|
1193
1126
|
t.text "note"
|
1194
|
-
t.
|
1127
|
+
t.uuid "library_id", null: false
|
1195
1128
|
t.integer "items_count", default: 0, null: false
|
1196
|
-
t.integer "position"
|
1197
|
-
t.datetime "created_at"
|
1198
|
-
t.datetime "updated_at"
|
1129
|
+
t.integer "position"
|
1130
|
+
t.datetime "created_at", null: false
|
1131
|
+
t.datetime "updated_at", null: false
|
1199
1132
|
t.datetime "deleted_at"
|
1200
1133
|
t.boolean "closed", default: false, null: false
|
1201
1134
|
t.index ["library_id"], name: "index_shelves_on_library_id"
|
1202
1135
|
end
|
1203
1136
|
|
1204
1137
|
create_table "subscribes", force: :cascade do |t|
|
1205
|
-
t.
|
1206
|
-
t.
|
1138
|
+
t.bigint "subscription_id"
|
1139
|
+
t.uuid "work_id", null: false
|
1207
1140
|
t.datetime "start_at", null: false
|
1208
1141
|
t.datetime "end_at", null: false
|
1209
|
-
t.datetime "created_at"
|
1210
|
-
t.datetime "updated_at"
|
1142
|
+
t.datetime "created_at", null: false
|
1143
|
+
t.datetime "updated_at", null: false
|
1211
1144
|
t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
1212
1145
|
t.index ["work_id"], name: "index_subscribes_on_work_id"
|
1213
1146
|
end
|
@@ -1215,12 +1148,12 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1215
1148
|
create_table "subscriptions", force: :cascade do |t|
|
1216
1149
|
t.text "title", null: false
|
1217
1150
|
t.text "note"
|
1218
|
-
t.
|
1151
|
+
t.bigint "user_id"
|
1219
1152
|
t.integer "order_list_id"
|
1220
1153
|
t.datetime "deleted_at"
|
1221
1154
|
t.integer "subscribes_count", default: 0, null: false
|
1222
|
-
t.datetime "created_at"
|
1223
|
-
t.datetime "updated_at"
|
1155
|
+
t.datetime "created_at", null: false
|
1156
|
+
t.datetime "updated_at", null: false
|
1224
1157
|
t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
1225
1158
|
t.index ["user_id"], name: "index_subscriptions_on_user_id"
|
1226
1159
|
end
|
@@ -1230,8 +1163,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1230
1163
|
t.text "display_name"
|
1231
1164
|
t.text "note"
|
1232
1165
|
t.integer "position"
|
1233
|
-
t.datetime "created_at"
|
1234
|
-
t.datetime "updated_at"
|
1166
|
+
t.datetime "created_at", null: false
|
1167
|
+
t.datetime "updated_at", null: false
|
1235
1168
|
end
|
1236
1169
|
|
1237
1170
|
create_table "user_checkout_stat_transitions", force: :cascade do |t|
|
@@ -1239,8 +1172,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1239
1172
|
t.text "metadata", default: "{}"
|
1240
1173
|
t.integer "sort_key"
|
1241
1174
|
t.integer "user_checkout_stat_id"
|
1242
|
-
t.datetime "created_at"
|
1243
|
-
t.datetime "updated_at"
|
1175
|
+
t.datetime "created_at", null: false
|
1176
|
+
t.datetime "updated_at", null: false
|
1244
1177
|
t.boolean "most_recent"
|
1245
1178
|
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1246
1179
|
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
@@ -1250,8 +1183,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1250
1183
|
t.datetime "start_date"
|
1251
1184
|
t.datetime "end_date"
|
1252
1185
|
t.text "note"
|
1253
|
-
t.datetime "created_at"
|
1254
|
-
t.datetime "updated_at"
|
1186
|
+
t.datetime "created_at", null: false
|
1187
|
+
t.datetime "updated_at", null: false
|
1255
1188
|
t.datetime "started_at"
|
1256
1189
|
t.datetime "completed_at"
|
1257
1190
|
t.integer "user_id"
|
@@ -1263,25 +1196,19 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1263
1196
|
t.text "metadata", default: "{}"
|
1264
1197
|
t.integer "sort_key"
|
1265
1198
|
t.integer "user_export_file_id"
|
1266
|
-
t.datetime "created_at"
|
1267
|
-
t.datetime "updated_at"
|
1268
|
-
t.boolean "most_recent"
|
1199
|
+
t.datetime "created_at", null: false
|
1200
|
+
t.datetime "updated_at", null: false
|
1201
|
+
t.boolean "most_recent"
|
1269
1202
|
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1270
|
-
t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1271
1203
|
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1272
|
-
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
|
1273
1204
|
end
|
1274
1205
|
|
1275
1206
|
create_table "user_export_files", force: :cascade do |t|
|
1276
1207
|
t.integer "user_id"
|
1277
|
-
t.string "user_export_file_name"
|
1278
|
-
t.string "user_export_content_type"
|
1279
|
-
t.integer "user_export_file_size"
|
1280
|
-
t.datetime "user_export_updated_at"
|
1281
1208
|
t.datetime "executed_at"
|
1282
|
-
t.datetime "created_at"
|
1283
|
-
t.datetime "updated_at"
|
1284
|
-
t.
|
1209
|
+
t.datetime "created_at", null: false
|
1210
|
+
t.datetime "updated_at", null: false
|
1211
|
+
t.jsonb "attachment_data"
|
1285
1212
|
end
|
1286
1213
|
|
1287
1214
|
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
@@ -1296,20 +1223,20 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1296
1223
|
t.datetime "fixed_due_date"
|
1297
1224
|
t.text "note"
|
1298
1225
|
t.integer "position"
|
1299
|
-
t.datetime "created_at"
|
1300
|
-
t.datetime "updated_at"
|
1226
|
+
t.datetime "created_at", null: false
|
1227
|
+
t.datetime "updated_at", null: false
|
1301
1228
|
t.integer "current_checkout_count"
|
1302
1229
|
t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
|
1303
1230
|
t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
|
1304
1231
|
end
|
1305
1232
|
|
1306
|
-
create_table "user_groups", force: :cascade do |t|
|
1233
|
+
create_table "user_groups", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
1307
1234
|
t.string "name"
|
1308
|
-
t.
|
1235
|
+
t.jsonb "display_name_translations"
|
1309
1236
|
t.text "note"
|
1310
|
-
t.integer "position"
|
1311
|
-
t.datetime "created_at"
|
1312
|
-
t.datetime "updated_at"
|
1237
|
+
t.integer "position"
|
1238
|
+
t.datetime "created_at", null: false
|
1239
|
+
t.datetime "updated_at", null: false
|
1313
1240
|
t.datetime "deleted_at"
|
1314
1241
|
t.integer "valid_period_for_new_user", default: 0, null: false
|
1315
1242
|
t.datetime "expired_at"
|
@@ -1319,10 +1246,10 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1319
1246
|
end
|
1320
1247
|
|
1321
1248
|
create_table "user_has_roles", force: :cascade do |t|
|
1322
|
-
t.
|
1323
|
-
t.
|
1324
|
-
t.datetime "created_at"
|
1325
|
-
t.datetime "updated_at"
|
1249
|
+
t.bigint "user_id", null: false
|
1250
|
+
t.bigint "role_id", null: false
|
1251
|
+
t.datetime "created_at", null: false
|
1252
|
+
t.datetime "updated_at", null: false
|
1326
1253
|
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
1327
1254
|
t.index ["user_id"], name: "index_user_has_roles_on_user_id"
|
1328
1255
|
end
|
@@ -1332,11 +1259,10 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1332
1259
|
t.text "metadata", default: "{}"
|
1333
1260
|
t.integer "sort_key"
|
1334
1261
|
t.integer "user_import_file_id"
|
1335
|
-
t.datetime "created_at"
|
1336
|
-
t.datetime "updated_at"
|
1337
|
-
t.boolean "most_recent"
|
1262
|
+
t.datetime "created_at", null: false
|
1263
|
+
t.datetime "updated_at", null: false
|
1264
|
+
t.boolean "most_recent"
|
1338
1265
|
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1339
|
-
t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
|
1340
1266
|
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1341
1267
|
end
|
1342
1268
|
|
@@ -1346,28 +1272,25 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1346
1272
|
t.datetime "executed_at"
|
1347
1273
|
t.string "user_import_file_name"
|
1348
1274
|
t.string "user_import_content_type"
|
1349
|
-
t.
|
1275
|
+
t.string "user_import_file_size"
|
1350
1276
|
t.datetime "user_import_updated_at"
|
1351
1277
|
t.string "user_import_fingerprint"
|
1352
1278
|
t.string "edit_mode"
|
1353
1279
|
t.text "error_message"
|
1354
|
-
t.datetime "created_at"
|
1355
|
-
t.datetime "updated_at"
|
1280
|
+
t.datetime "created_at", null: false
|
1281
|
+
t.datetime "updated_at", null: false
|
1356
1282
|
t.string "user_encoding"
|
1357
1283
|
t.integer "default_library_id"
|
1358
1284
|
t.integer "default_user_group_id"
|
1359
|
-
t.
|
1285
|
+
t.jsonb "attachment_data"
|
1360
1286
|
end
|
1361
1287
|
|
1362
1288
|
create_table "user_import_results", force: :cascade do |t|
|
1363
1289
|
t.integer "user_import_file_id"
|
1364
1290
|
t.integer "user_id"
|
1365
1291
|
t.text "body"
|
1366
|
-
t.datetime "created_at"
|
1367
|
-
t.datetime "updated_at"
|
1368
|
-
t.text "error_message"
|
1369
|
-
t.index ["user_id"], name: "index_user_import_results_on_user_id"
|
1370
|
-
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1292
|
+
t.datetime "created_at", null: false
|
1293
|
+
t.datetime "updated_at", null: false
|
1371
1294
|
end
|
1372
1295
|
|
1373
1296
|
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
@@ -1375,8 +1298,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1375
1298
|
t.text "metadata", default: "{}"
|
1376
1299
|
t.integer "sort_key"
|
1377
1300
|
t.integer "user_reserve_stat_id"
|
1378
|
-
t.datetime "created_at"
|
1379
|
-
t.datetime "updated_at"
|
1301
|
+
t.datetime "created_at", null: false
|
1302
|
+
t.datetime "updated_at", null: false
|
1380
1303
|
t.boolean "most_recent"
|
1381
1304
|
t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1382
1305
|
t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
@@ -1386,8 +1309,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1386
1309
|
t.datetime "start_date"
|
1387
1310
|
t.datetime "end_date"
|
1388
1311
|
t.text "note"
|
1389
|
-
t.datetime "created_at"
|
1390
|
-
t.datetime "updated_at"
|
1312
|
+
t.datetime "created_at", null: false
|
1313
|
+
t.datetime "updated_at", null: false
|
1391
1314
|
t.datetime "started_at"
|
1392
1315
|
t.datetime "completed_at"
|
1393
1316
|
t.integer "user_id"
|
@@ -1405,8 +1328,8 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1405
1328
|
t.datetime "last_sign_in_at"
|
1406
1329
|
t.string "current_sign_in_ip"
|
1407
1330
|
t.string "last_sign_in_ip"
|
1408
|
-
t.datetime "created_at"
|
1409
|
-
t.datetime "updated_at"
|
1331
|
+
t.datetime "created_at", null: false
|
1332
|
+
t.datetime "updated_at", null: false
|
1410
1333
|
t.string "username"
|
1411
1334
|
t.datetime "deleted_at"
|
1412
1335
|
t.datetime "expired_at"
|
@@ -1414,21 +1337,49 @@ ActiveRecord::Schema.define(version: 2019_03_14_151124) do
|
|
1414
1337
|
t.string "unlock_token"
|
1415
1338
|
t.datetime "locked_at"
|
1416
1339
|
t.datetime "confirmed_at"
|
1417
|
-
t.
|
1340
|
+
t.uuid "profile_id"
|
1341
|
+
t.index ["email"], name: "index_users_on_email", unique: true
|
1342
|
+
t.index ["profile_id"], name: "index_users_on_profile_id"
|
1418
1343
|
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1419
1344
|
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1420
1345
|
t.index ["username"], name: "index_users_on_username", unique: true
|
1421
1346
|
end
|
1422
1347
|
|
1423
1348
|
create_table "withdraws", force: :cascade do |t|
|
1424
|
-
t.
|
1425
|
-
t.
|
1349
|
+
t.bigint "basket_id"
|
1350
|
+
t.uuid "item_id"
|
1426
1351
|
t.integer "librarian_id"
|
1427
1352
|
t.datetime "created_at", null: false
|
1428
1353
|
t.datetime "updated_at", null: false
|
1429
1354
|
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
1430
1355
|
t.index ["item_id"], name: "index_withdraws_on_item_id"
|
1431
|
-
t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
|
1432
1356
|
end
|
1433
1357
|
|
1358
|
+
add_foreign_key "accepts", "baskets", on_delete: :nullify
|
1359
|
+
add_foreign_key "accepts", "items"
|
1360
|
+
add_foreign_key "baskets", "users"
|
1361
|
+
add_foreign_key "creates", "agents"
|
1362
|
+
add_foreign_key "doi_records", "manifestations"
|
1363
|
+
add_foreign_key "exemplifies", "items"
|
1364
|
+
add_foreign_key "exemplifies", "manifestations"
|
1365
|
+
add_foreign_key "identifiers", "manifestations"
|
1366
|
+
add_foreign_key "import_requests", "manifestations"
|
1367
|
+
add_foreign_key "import_requests", "users"
|
1368
|
+
add_foreign_key "isbn_records", "manifestations"
|
1369
|
+
add_foreign_key "issn_records", "manifestations"
|
1370
|
+
add_foreign_key "items", "manifestations"
|
1371
|
+
add_foreign_key "library_groups", "users"
|
1372
|
+
add_foreign_key "owns", "agents"
|
1373
|
+
add_foreign_key "owns", "items"
|
1374
|
+
add_foreign_key "periodicals", "manifestations"
|
1375
|
+
add_foreign_key "produces", "agents"
|
1376
|
+
add_foreign_key "produces", "manifestations"
|
1377
|
+
add_foreign_key "shelves", "libraries"
|
1378
|
+
add_foreign_key "subscribes", "subscriptions"
|
1379
|
+
add_foreign_key "subscriptions", "users"
|
1380
|
+
add_foreign_key "user_has_roles", "roles"
|
1381
|
+
add_foreign_key "user_has_roles", "users", on_delete: :cascade
|
1382
|
+
add_foreign_key "users", "profiles", on_delete: :cascade
|
1383
|
+
add_foreign_key "withdraws", "baskets", on_delete: :nullify
|
1384
|
+
add_foreign_key "withdraws", "items"
|
1434
1385
|
end
|