enju_seed 0.3.0.beta.3 → 0.3.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/my_accounts_controller.rb +34 -29
- data/app/models/concerns/enju_seed/enju_user.rb +0 -3
- data/app/views/my_accounts/_edit_credential.html.erb +99 -0
- data/app/views/my_accounts/_form.html.erb +24 -0
- data/app/views/my_accounts/_show.html.erb +1 -0
- data/app/views/my_accounts/edit.html.erb +32 -0
- data/app/views/my_accounts/show.html.erb +49 -0
- data/app/views/profiles/_edit_credential.html.erb +6 -6
- data/app/views/profiles/_edit_profile.html.erb +42 -0
- data/app/views/profiles/_form.html.erb +15 -0
- data/app/views/profiles/_show.html.erb +1 -0
- data/app/views/profiles/edit.html.erb +33 -0
- data/app/views/profiles/index.html.erb +70 -0
- data/app/views/profiles/new.html.erb +88 -0
- data/app/views/profiles/show.html+phone.erb +1 -0
- data/app/views/profiles/show.html.erb +67 -0
- data/app/views/roles/_form.html.erb +19 -0
- data/app/views/roles/edit.html.erb +13 -0
- data/app/views/roles/index.html.erb +32 -0
- data/app/views/roles/new.html.erb +12 -0
- data/app/views/roles/show.html.erb +46 -0
- data/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -1
- data/lib/enju_seed/version.rb +1 -1
- data/spec/controllers/my_accounts_controller_spec.rb +3 -1
- data/spec/dummy/app/controllers/application_controller.rb +0 -1
- data/spec/dummy/db/migrate/001_create_agents.rb +1 -1
- data/spec/dummy/db/migrate/002_devise_create_users.rb +1 -1
- 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/121_create_checked_items.rb +1 -1
- data/spec/dummy/db/migrate/125_create_donates.rb +1 -1
- 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/132_create_circulation_statuses.rb +1 -1
- data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
- data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
- data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +1 -1
- data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
- data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +1 -1
- data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -1
- data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
- data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
- data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
- data/spec/dummy/db/migrate/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/20090812151902_create_agent_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +1 -1
- data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
- data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
- data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
- data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +1 -1
- data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
- data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +1 -1
- data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
- data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +1 -1
- data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
- data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/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 +1 -1
- 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 +1 -1
- 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 +1 -1
- data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/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 +1 -1
- data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/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/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 +1 -1
- data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +1 -1
- data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/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 +1 -1
- data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +1 -1
- data/spec/dummy/db/migrate/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/20150106001709_create_demands.rb +1 -1
- data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20150302110310_add_attachment_id_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20150304183215_add_picture_id_to_picture_file.rb +1 -1
- data/spec/dummy/db/migrate/20150305025906_add_resource_import_id_to_resource_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20150305030046_add_resource_export_id_to_resource_export_file.rb +1 -1
- data/spec/dummy/db/migrate/20150305031709_add_agent_import_id_to_agent_import_file.rb +1 -1
- data/spec/dummy/db/migrate/20150305105231_add_attachment_fingerprint_to_manifestation.rb +1 -1
- data/spec/dummy/db/migrate/20150420145354_add_attachment_to_carrier_type.rb +1 -1
- data/spec/dummy/db/migrate/20150420145420_add_attachment_to_content_type.rb +1 -1
- data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160513000929_create_agent_names.rb +1 -1
- data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
- data/spec/dummy/db/migrate/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 +1 -1
- data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813191820_add_screenshot_generator_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
- data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
- data/spec/dummy/db/schema.rb +1250 -1317
- metadata +285 -289
- data/app/views/my_accounts/_edit_credential.html.slim +0 -63
- data/app/views/my_accounts/_form.html.slim +0 -20
- data/app/views/my_accounts/_show.html.slim +0 -1
- data/app/views/my_accounts/edit.html.slim +0 -30
- data/app/views/my_accounts/show.html+phone.slim +0 -1
- data/app/views/my_accounts/show.html.slim +0 -57
- data/app/views/profiles/_edit_credential.html.slim +0 -67
- data/app/views/profiles/_edit_profile.html.slim +0 -40
- data/app/views/profiles/_form.html.slim +0 -12
- data/app/views/profiles/_show.html.slim +0 -1
- data/app/views/profiles/edit.html.slim +0 -30
- data/app/views/profiles/index.html.slim +0 -61
- data/app/views/profiles/new.html.slim +0 -65
- data/app/views/profiles/show.html+phone.slim +0 -1
- data/app/views/profiles/show.html.slim +0 -67
- data/app/views/roles/_form.html.slim +0 -16
- data/app/views/roles/edit.html.slim +0 -15
- data/app/views/roles/index.html.slim +0 -27
- data/app/views/roles/new.html.slim +0 -13
- data/app/views/roles/show.html.slim +0 -46
- 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/20110913115320_add_lft_and_rgt_to_message.rb +0 -11
- data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +0 -5
- 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/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/fixtures/message_requests.yml +0 -26
- data/spec/fixtures/message_templates.yml +0 -98
- data/spec/fixtures/messages.yml +0 -56
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddAgentImportIdToAgentImportFile < ActiveRecord::Migration
|
1
|
+
class AddAgentImportIdToAgentImportFile < ActiveRecord::Migration[5.0]
|
2
2
|
def change
|
3
3
|
add_column :agent_import_files, :agent_import_id, :string
|
4
4
|
rename_column :agent_import_files, :agent_import_file_size, :agent_import_size
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This migration comes from enju_library_engine (originally 20151213070943)
|
2
|
-
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
|
2
|
+
class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[5.0]
|
3
3
|
def up
|
4
4
|
if defined?(Globalize)
|
5
5
|
LibraryGroup.create_translation_table!({
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class AddMostRecentToManifestationCheckoutStatTransitions < ActiveRecord::Migration
|
1
|
+
class AddMostRecentToManifestationCheckoutStatTransitions < ActiveRecord::Migration[5.0]
|
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.0]
|
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
@@ -16,1424 +16,1357 @@ ActiveRecord::Schema.define(version: 20170114174536) do
|
|
16
16
|
enable_extension "plpgsql"
|
17
17
|
enable_extension "pgcrypto"
|
18
18
|
|
19
|
-
create_table "accepts", force: :cascade do |t|
|
20
|
-
t.integer
|
21
|
-
t.uuid
|
22
|
-
t.integer
|
23
|
-
t.datetime "created_at",
|
24
|
-
t.datetime "updated_at",
|
25
|
-
t.index ["basket_id"], name: "index_accepts_on_basket_id"
|
26
|
-
t.index ["item_id"], name: "index_accepts_on_item_id"
|
27
|
-
end
|
28
|
-
|
29
|
-
create_table "agent_import_file_transitions", force: :cascade do |t|
|
30
|
-
t.string
|
31
|
-
t.jsonb
|
32
|
-
t.integer
|
33
|
-
t.integer
|
34
|
-
t.datetime "created_at"
|
35
|
-
t.datetime "updated_at"
|
36
|
-
t.boolean
|
37
|
-
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
38
|
-
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
39
|
-
end
|
40
|
-
|
41
|
-
create_table "agent_import_files", force: :cascade do |t|
|
42
|
-
t.integer
|
43
|
-
t.string
|
44
|
-
t.integer
|
45
|
-
t.integer
|
46
|
-
t.text
|
19
|
+
create_table "accepts", id: :serial, force: :cascade do |t|
|
20
|
+
t.integer "basket_id"
|
21
|
+
t.uuid "item_id"
|
22
|
+
t.integer "librarian_id"
|
23
|
+
t.datetime "created_at", null: false
|
24
|
+
t.datetime "updated_at", null: false
|
25
|
+
t.index ["basket_id"], name: "index_accepts_on_basket_id"
|
26
|
+
t.index ["item_id"], name: "index_accepts_on_item_id"
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "agent_import_file_transitions", id: :serial, force: :cascade do |t|
|
30
|
+
t.string "to_state"
|
31
|
+
t.jsonb "metadata", default: "{}"
|
32
|
+
t.integer "sort_key"
|
33
|
+
t.integer "agent_import_file_id"
|
34
|
+
t.datetime "created_at", null: false
|
35
|
+
t.datetime "updated_at", null: false
|
36
|
+
t.boolean "most_recent"
|
37
|
+
t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
|
38
|
+
t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
|
39
|
+
end
|
40
|
+
|
41
|
+
create_table "agent_import_files", id: :serial, force: :cascade do |t|
|
42
|
+
t.integer "parent_id"
|
43
|
+
t.string "content_type"
|
44
|
+
t.integer "size"
|
45
|
+
t.integer "user_id"
|
46
|
+
t.text "note"
|
47
47
|
t.datetime "executed_at"
|
48
|
-
t.string
|
49
|
-
t.string
|
50
|
-
t.integer
|
48
|
+
t.string "agent_import_file_name"
|
49
|
+
t.string "agent_import_content_type"
|
50
|
+
t.integer "agent_import_size"
|
51
51
|
t.datetime "agent_import_updated_at"
|
52
|
-
t.datetime "created_at"
|
53
|
-
t.datetime "updated_at"
|
54
|
-
t.string
|
55
|
-
t.
|
56
|
-
t.string
|
57
|
-
t.string
|
58
|
-
t.
|
59
|
-
t.
|
60
|
-
t.index ["
|
61
|
-
t.index ["
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
t.integer
|
67
|
-
t.
|
68
|
-
t.
|
69
|
-
t.datetime "
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
t.
|
75
|
-
t.datetime "
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
t.integer
|
81
|
-
t.
|
82
|
-
t.datetime "
|
83
|
-
t.
|
84
|
-
t.index ["
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
t.string
|
90
|
-
t.string
|
91
|
-
t.string
|
92
|
-
t.
|
93
|
-
t.integer
|
94
|
-
t.integer
|
95
|
-
t.integer
|
96
|
-
t.
|
97
|
-
t.string
|
98
|
-
t.
|
99
|
-
t.datetime "
|
100
|
-
t.
|
101
|
-
t.index ["
|
102
|
-
t.index ["
|
103
|
-
t.index ["
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
t.
|
109
|
-
t.text
|
110
|
-
t.
|
111
|
-
t.
|
112
|
-
t.datetime "
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
t.integer
|
118
|
-
t.integer
|
119
|
-
t.
|
120
|
-
t.datetime "
|
121
|
-
t.
|
122
|
-
t.
|
123
|
-
t.index ["
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
t.
|
129
|
-
t.text
|
130
|
-
t.
|
131
|
-
t.
|
132
|
-
t.datetime "
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
t.string
|
138
|
-
t.string
|
139
|
-
t.string
|
140
|
-
t.string
|
141
|
-
t.string
|
142
|
-
t.string
|
143
|
-
t.string
|
144
|
-
t.string
|
145
|
-
t.
|
146
|
-
t.text
|
147
|
-
t.
|
148
|
-
t.datetime "
|
149
|
-
t.datetime "updated_at"
|
52
|
+
t.datetime "created_at", null: false
|
53
|
+
t.datetime "updated_at", null: false
|
54
|
+
t.string "agent_import_fingerprint"
|
55
|
+
t.string "edit_mode"
|
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"
|
60
|
+
t.index ["parent_id"], name: "index_agent_import_files_on_parent_id"
|
61
|
+
t.index ["user_id"], name: "index_agent_import_files_on_user_id"
|
62
|
+
end
|
63
|
+
|
64
|
+
create_table "agent_import_results", id: :serial, force: :cascade do |t|
|
65
|
+
t.integer "agent_import_file_id"
|
66
|
+
t.integer "agent_id"
|
67
|
+
t.text "body"
|
68
|
+
t.datetime "created_at", null: false
|
69
|
+
t.datetime "updated_at", null: false
|
70
|
+
end
|
71
|
+
|
72
|
+
create_table "agent_merge_lists", id: :serial, force: :cascade do |t|
|
73
|
+
t.string "title"
|
74
|
+
t.datetime "created_at", null: false
|
75
|
+
t.datetime "updated_at", null: false
|
76
|
+
end
|
77
|
+
|
78
|
+
create_table "agent_merges", id: :serial, force: :cascade do |t|
|
79
|
+
t.integer "agent_id", null: false
|
80
|
+
t.integer "agent_merge_list_id", null: false
|
81
|
+
t.datetime "created_at", null: false
|
82
|
+
t.datetime "updated_at", null: false
|
83
|
+
t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
|
84
|
+
t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
|
85
|
+
end
|
86
|
+
|
87
|
+
create_table "agent_names", id: :serial, 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.integer "language_id"
|
93
|
+
t.integer "agent_id"
|
94
|
+
t.integer "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
|
+
|
106
|
+
create_table "agent_relationship_types", id: :serial, force: :cascade do |t|
|
107
|
+
t.string "name", null: false
|
108
|
+
t.text "display_name"
|
109
|
+
t.text "note"
|
110
|
+
t.integer "position"
|
111
|
+
t.datetime "created_at", null: false
|
112
|
+
t.datetime "updated_at", null: false
|
113
|
+
end
|
114
|
+
|
115
|
+
create_table "agent_relationships", id: :serial, force: :cascade do |t|
|
116
|
+
t.integer "parent_id"
|
117
|
+
t.integer "child_id"
|
118
|
+
t.integer "agent_relationship_type_id"
|
119
|
+
t.datetime "created_at", null: false
|
120
|
+
t.datetime "updated_at", null: false
|
121
|
+
t.integer "position"
|
122
|
+
t.index ["child_id"], name: "index_agent_relationships_on_child_id"
|
123
|
+
t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
|
124
|
+
end
|
125
|
+
|
126
|
+
create_table "agent_types", id: :serial, force: :cascade do |t|
|
127
|
+
t.string "name", null: false
|
128
|
+
t.text "display_name"
|
129
|
+
t.text "note"
|
130
|
+
t.integer "position"
|
131
|
+
t.datetime "created_at", null: false
|
132
|
+
t.datetime "updated_at", null: false
|
133
|
+
end
|
134
|
+
|
135
|
+
create_table "agents", id: :serial, force: :cascade do |t|
|
136
|
+
t.string "last_name"
|
137
|
+
t.string "middle_name"
|
138
|
+
t.string "first_name"
|
139
|
+
t.string "last_name_transcription"
|
140
|
+
t.string "middle_name_transcription"
|
141
|
+
t.string "first_name_transcription"
|
142
|
+
t.string "corporate_name"
|
143
|
+
t.string "corporate_name_transcription"
|
144
|
+
t.string "full_name"
|
145
|
+
t.text "full_name_transcription"
|
146
|
+
t.text "full_name_alternative"
|
147
|
+
t.datetime "created_at", null: false
|
148
|
+
t.datetime "updated_at", null: false
|
150
149
|
t.datetime "deleted_at"
|
151
|
-
t.string
|
152
|
-
t.string
|
153
|
-
t.text
|
154
|
-
t.text
|
155
|
-
t.text
|
156
|
-
t.text
|
157
|
-
t.string
|
158
|
-
t.string
|
159
|
-
t.string
|
160
|
-
t.string
|
161
|
-
t.text
|
162
|
-
t.text
|
163
|
-
t.string
|
164
|
-
t.text
|
165
|
-
t.text
|
166
|
-
t.text
|
150
|
+
t.string "zip_code_1"
|
151
|
+
t.string "zip_code_2"
|
152
|
+
t.text "address_1"
|
153
|
+
t.text "address_2"
|
154
|
+
t.text "address_1_note"
|
155
|
+
t.text "address_2_note"
|
156
|
+
t.string "telephone_number_1"
|
157
|
+
t.string "telephone_number_2"
|
158
|
+
t.string "fax_number_1"
|
159
|
+
t.string "fax_number_2"
|
160
|
+
t.text "other_designation"
|
161
|
+
t.text "place"
|
162
|
+
t.string "postal_code"
|
163
|
+
t.text "street"
|
164
|
+
t.text "locality"
|
165
|
+
t.text "region"
|
167
166
|
t.datetime "date_of_birth"
|
168
167
|
t.datetime "date_of_death"
|
169
|
-
t.integer
|
170
|
-
t.integer
|
171
|
-
t.integer
|
172
|
-
t.integer
|
173
|
-
t.text
|
174
|
-
t.integer
|
175
|
-
t.integer
|
176
|
-
t.text
|
177
|
-
t.text
|
178
|
-
t.text
|
179
|
-
t.string
|
180
|
-
t.string
|
181
|
-
t.string
|
182
|
-
t.integer
|
183
|
-
t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
184
|
-
t.index ["country_id"], name: "index_agents_on_country_id"
|
185
|
-
t.index ["full_name"], name: "index_agents_on_full_name"
|
186
|
-
t.index ["language_id"], name: "index_agents_on_language_id"
|
187
|
-
t.index ["profile_id"], name: "index_agents_on_profile_id"
|
188
|
-
t.index ["required_role_id"], name: "index_agents_on_required_role_id"
|
189
|
-
end
|
190
|
-
|
191
|
-
create_table "baskets", force: :cascade do |t|
|
192
|
-
t.integer
|
193
|
-
t.text
|
194
|
-
t.integer
|
195
|
-
t.datetime "created_at",
|
196
|
-
t.datetime "updated_at",
|
197
|
-
t.index ["user_id"], name: "index_baskets_on_user_id"
|
168
|
+
t.integer "language_id", default: 1, null: false
|
169
|
+
t.integer "country_id", default: 1, null: false
|
170
|
+
t.integer "agent_type_id", default: 1, null: false
|
171
|
+
t.integer "lock_version", default: 0, null: false
|
172
|
+
t.text "note"
|
173
|
+
t.integer "required_role_id", default: 1, null: false
|
174
|
+
t.integer "required_score", default: 0, null: false
|
175
|
+
t.text "email"
|
176
|
+
t.text "url"
|
177
|
+
t.text "full_name_alternative_transcription"
|
178
|
+
t.string "birth_date"
|
179
|
+
t.string "death_date"
|
180
|
+
t.string "agent_identifier"
|
181
|
+
t.integer "profile_id"
|
182
|
+
t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
|
183
|
+
t.index ["country_id"], name: "index_agents_on_country_id"
|
184
|
+
t.index ["full_name"], name: "index_agents_on_full_name"
|
185
|
+
t.index ["language_id"], name: "index_agents_on_language_id"
|
186
|
+
t.index ["profile_id"], name: "index_agents_on_profile_id"
|
187
|
+
t.index ["required_role_id"], name: "index_agents_on_required_role_id"
|
188
|
+
end
|
189
|
+
|
190
|
+
create_table "baskets", id: :serial, force: :cascade do |t|
|
191
|
+
t.integer "user_id"
|
192
|
+
t.text "note"
|
193
|
+
t.integer "lock_version", default: 0, null: false
|
194
|
+
t.datetime "created_at", null: false
|
195
|
+
t.datetime "updated_at", null: false
|
196
|
+
t.index ["user_id"], name: "index_baskets_on_user_id"
|
198
197
|
end
|
199
198
|
|
200
199
|
create_table "bookstores", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
201
|
-
t.string
|
202
|
-
t.string
|
203
|
-
t.text
|
204
|
-
t.text
|
205
|
-
t.string
|
206
|
-
t.string
|
207
|
-
t.string
|
208
|
-
t.integer
|
200
|
+
t.string "name", null: false
|
201
|
+
t.string "zip_code"
|
202
|
+
t.text "address"
|
203
|
+
t.text "note"
|
204
|
+
t.string "telephone_number"
|
205
|
+
t.string "fax_number"
|
206
|
+
t.string "url"
|
207
|
+
t.integer "position"
|
209
208
|
t.datetime "deleted_at"
|
210
|
-
t.datetime "created_at",
|
211
|
-
t.datetime "updated_at",
|
212
|
-
end
|
213
|
-
|
214
|
-
create_table "budget_types", force: :cascade do |t|
|
215
|
-
t.string
|
216
|
-
t.text
|
217
|
-
t.text
|
218
|
-
t.integer
|
219
|
-
t.datetime "created_at"
|
220
|
-
t.datetime "updated_at"
|
221
|
-
end
|
222
|
-
|
223
|
-
create_table "carrier_type_has_checkout_types", force: :cascade do |t|
|
224
|
-
t.integer
|
225
|
-
t.integer
|
226
|
-
t.text
|
227
|
-
t.integer
|
228
|
-
t.datetime "created_at"
|
229
|
-
t.datetime "updated_at"
|
230
|
-
t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
|
231
|
-
t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
232
|
-
end
|
233
|
-
|
234
|
-
create_table "carrier_types", force: :cascade do |t|
|
235
|
-
t.string
|
236
|
-
t.jsonb
|
237
|
-
t.text
|
238
|
-
t.integer
|
239
|
-
t.datetime "created_at",
|
240
|
-
t.datetime "updated_at",
|
241
|
-
t.string
|
242
|
-
t.string
|
243
|
-
t.integer
|
244
|
-
t.string
|
245
|
-
t.jsonb
|
246
|
-
end
|
247
|
-
|
248
|
-
create_table "checked_items", force: :cascade do |t|
|
249
|
-
t.integer
|
250
|
-
t.integer
|
251
|
-
t.datetime "due_date",
|
252
|
-
t.datetime "created_at"
|
253
|
-
t.datetime "updated_at"
|
254
|
-
t.integer
|
255
|
-
t.index ["basket_id"], name: "index_checked_items_on_basket_id"
|
256
|
-
t.index ["item_id"], name: "index_checked_items_on_item_id"
|
257
|
-
end
|
258
|
-
|
259
|
-
create_table "checkins", force: :cascade do |t|
|
260
|
-
t.integer
|
261
|
-
t.integer
|
262
|
-
t.integer
|
263
|
-
t.datetime "created_at"
|
264
|
-
t.datetime "updated_at"
|
265
|
-
t.integer
|
266
|
-
t.index ["basket_id"], name: "index_checkins_on_basket_id"
|
267
|
-
t.index ["item_id"], name: "index_checkins_on_item_id"
|
268
|
-
t.index ["librarian_id"], name: "index_checkins_on_librarian_id"
|
269
|
-
end
|
270
|
-
|
271
|
-
create_table "checkout_stat_has_manifestations", force: :cascade do |t|
|
272
|
-
t.integer
|
273
|
-
t.integer
|
274
|
-
t.integer
|
275
|
-
t.datetime "created_at"
|
276
|
-
t.datetime "updated_at"
|
277
|
-
t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
278
|
-
t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
|
279
|
-
end
|
280
|
-
|
281
|
-
create_table "checkout_stat_has_users", force: :cascade do |t|
|
282
|
-
t.integer
|
283
|
-
t.integer
|
284
|
-
t.integer
|
285
|
-
t.datetime "created_at"
|
286
|
-
t.datetime "updated_at"
|
287
|
-
t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
288
|
-
t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
|
289
|
-
end
|
290
|
-
|
291
|
-
create_table "checkout_types", force: :cascade do |t|
|
292
|
-
t.string
|
293
|
-
t.text
|
294
|
-
t.text
|
295
|
-
t.integer
|
296
|
-
t.datetime "created_at"
|
297
|
-
t.datetime "updated_at"
|
298
|
-
t.index ["name"], name: "index_checkout_types_on_name"
|
299
|
-
end
|
300
|
-
|
301
|
-
create_table "checkouts", force: :cascade do |t|
|
302
|
-
t.integer
|
303
|
-
t.integer
|
304
|
-
t.integer
|
305
|
-
t.integer
|
306
|
-
t.integer
|
209
|
+
t.datetime "created_at", null: false
|
210
|
+
t.datetime "updated_at", null: false
|
211
|
+
end
|
212
|
+
|
213
|
+
create_table "budget_types", id: :serial, force: :cascade do |t|
|
214
|
+
t.string "name"
|
215
|
+
t.text "display_name"
|
216
|
+
t.text "note"
|
217
|
+
t.integer "position"
|
218
|
+
t.datetime "created_at", null: false
|
219
|
+
t.datetime "updated_at", null: false
|
220
|
+
end
|
221
|
+
|
222
|
+
create_table "carrier_type_has_checkout_types", id: :serial, force: :cascade do |t|
|
223
|
+
t.integer "carrier_type_id", null: false
|
224
|
+
t.integer "checkout_type_id", null: false
|
225
|
+
t.text "note"
|
226
|
+
t.integer "position"
|
227
|
+
t.datetime "created_at", null: false
|
228
|
+
t.datetime "updated_at", null: false
|
229
|
+
t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
|
230
|
+
t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
231
|
+
end
|
232
|
+
|
233
|
+
create_table "carrier_types", id: :serial, force: :cascade do |t|
|
234
|
+
t.string "name", null: false
|
235
|
+
t.jsonb "display_name_translations"
|
236
|
+
t.text "note"
|
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"
|
243
|
+
t.string "attachment_content_type"
|
244
|
+
t.jsonb "attachment_data"
|
245
|
+
end
|
246
|
+
|
247
|
+
create_table "checked_items", id: :serial, force: :cascade do |t|
|
248
|
+
t.integer "item_id", null: false
|
249
|
+
t.integer "basket_id", null: false
|
250
|
+
t.datetime "due_date", null: false
|
251
|
+
t.datetime "created_at", null: false
|
252
|
+
t.datetime "updated_at", null: false
|
253
|
+
t.integer "librarian_id"
|
254
|
+
t.index ["basket_id"], name: "index_checked_items_on_basket_id"
|
255
|
+
t.index ["item_id"], name: "index_checked_items_on_item_id"
|
256
|
+
end
|
257
|
+
|
258
|
+
create_table "checkins", id: :serial, force: :cascade do |t|
|
259
|
+
t.integer "item_id", null: false
|
260
|
+
t.integer "librarian_id"
|
261
|
+
t.integer "basket_id"
|
262
|
+
t.datetime "created_at", null: false
|
263
|
+
t.datetime "updated_at", null: false
|
264
|
+
t.integer "lock_version", default: 0, null: false
|
265
|
+
t.index ["basket_id"], name: "index_checkins_on_basket_id"
|
266
|
+
t.index ["item_id"], name: "index_checkins_on_item_id"
|
267
|
+
t.index ["librarian_id"], name: "index_checkins_on_librarian_id"
|
268
|
+
end
|
269
|
+
|
270
|
+
create_table "checkout_stat_has_manifestations", id: :serial, force: :cascade do |t|
|
271
|
+
t.integer "manifestation_checkout_stat_id", null: false
|
272
|
+
t.integer "manifestation_id", null: false
|
273
|
+
t.integer "checkouts_count"
|
274
|
+
t.datetime "created_at", null: false
|
275
|
+
t.datetime "updated_at", null: false
|
276
|
+
t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
277
|
+
t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
|
278
|
+
end
|
279
|
+
|
280
|
+
create_table "checkout_stat_has_users", id: :serial, force: :cascade do |t|
|
281
|
+
t.integer "user_checkout_stat_id", null: false
|
282
|
+
t.integer "user_id", null: false
|
283
|
+
t.integer "checkouts_count", default: 0, null: false
|
284
|
+
t.datetime "created_at", null: false
|
285
|
+
t.datetime "updated_at", null: false
|
286
|
+
t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
287
|
+
t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
|
288
|
+
end
|
289
|
+
|
290
|
+
create_table "checkout_types", id: :serial, force: :cascade do |t|
|
291
|
+
t.string "name", null: false
|
292
|
+
t.text "display_name"
|
293
|
+
t.text "note"
|
294
|
+
t.integer "position"
|
295
|
+
t.datetime "created_at", null: false
|
296
|
+
t.datetime "updated_at", null: false
|
297
|
+
t.index ["name"], name: "index_checkout_types_on_name"
|
298
|
+
end
|
299
|
+
|
300
|
+
create_table "checkouts", id: :serial, force: :cascade do |t|
|
301
|
+
t.integer "user_id"
|
302
|
+
t.integer "item_id", null: false
|
303
|
+
t.integer "checkin_id"
|
304
|
+
t.integer "librarian_id"
|
305
|
+
t.integer "basket_id"
|
307
306
|
t.datetime "due_date"
|
308
|
-
t.integer
|
309
|
-
t.integer
|
310
|
-
t.datetime "created_at"
|
311
|
-
t.datetime "updated_at"
|
312
|
-
t.integer
|
313
|
-
t.integer
|
314
|
-
t.index ["basket_id"], name: "index_checkouts_on_basket_id"
|
315
|
-
t.index ["checkin_id"], name: "index_checkouts_on_checkin_id"
|
316
|
-
t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
|
317
|
-
t.index ["item_id"], name: "index_checkouts_on_item_id"
|
318
|
-
t.index ["librarian_id"], name: "index_checkouts_on_librarian_id"
|
319
|
-
t.index ["library_id"], name: "index_checkouts_on_library_id"
|
320
|
-
t.index ["shelf_id"], name: "index_checkouts_on_shelf_id"
|
321
|
-
t.index ["user_id"], name: "index_checkouts_on_user_id"
|
322
|
-
end
|
323
|
-
|
324
|
-
create_table "circulation_statuses", force: :cascade do |t|
|
325
|
-
t.string
|
326
|
-
t.text
|
327
|
-
t.text
|
328
|
-
t.integer
|
329
|
-
t.datetime "created_at"
|
330
|
-
t.datetime "updated_at"
|
331
|
-
end
|
332
|
-
|
333
|
-
create_table "colors", force: :cascade do |t|
|
334
|
-
t.integer
|
335
|
-
t.string
|
336
|
-
t.string
|
337
|
-
t.integer
|
338
|
-
t.datetime "created_at"
|
339
|
-
t.datetime "updated_at"
|
340
|
-
t.index ["library_group_id"], name: "index_colors_on_library_group_id"
|
341
|
-
end
|
342
|
-
|
343
|
-
create_table "content_types", force: :cascade do |t|
|
344
|
-
t.string
|
345
|
-
t.jsonb
|
346
|
-
t.text
|
347
|
-
t.integer
|
348
|
-
t.datetime "created_at",
|
349
|
-
t.datetime "updated_at",
|
350
|
-
t.string
|
351
|
-
t.string
|
352
|
-
t.integer
|
353
|
-
t.string
|
354
|
-
t.jsonb
|
355
|
-
end
|
356
|
-
|
357
|
-
create_table "countries", force: :cascade do |t|
|
358
|
-
t.string
|
359
|
-
t.text
|
360
|
-
t.string
|
361
|
-
t.string
|
362
|
-
t.string
|
363
|
-
t.text
|
307
|
+
t.integer "checkout_renewal_count", default: 0, null: false
|
308
|
+
t.integer "lock_version", default: 0, null: false
|
309
|
+
t.datetime "created_at", null: false
|
310
|
+
t.datetime "updated_at", null: false
|
311
|
+
t.integer "shelf_id"
|
312
|
+
t.integer "library_id"
|
313
|
+
t.index ["basket_id"], name: "index_checkouts_on_basket_id"
|
314
|
+
t.index ["checkin_id"], name: "index_checkouts_on_checkin_id"
|
315
|
+
t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
|
316
|
+
t.index ["item_id"], name: "index_checkouts_on_item_id"
|
317
|
+
t.index ["librarian_id"], name: "index_checkouts_on_librarian_id"
|
318
|
+
t.index ["library_id"], name: "index_checkouts_on_library_id"
|
319
|
+
t.index ["shelf_id"], name: "index_checkouts_on_shelf_id"
|
320
|
+
t.index ["user_id"], name: "index_checkouts_on_user_id"
|
321
|
+
end
|
322
|
+
|
323
|
+
create_table "circulation_statuses", id: :serial, force: :cascade do |t|
|
324
|
+
t.string "name", null: false
|
325
|
+
t.text "display_name"
|
326
|
+
t.text "note"
|
327
|
+
t.integer "position"
|
328
|
+
t.datetime "created_at", null: false
|
329
|
+
t.datetime "updated_at", null: false
|
330
|
+
end
|
331
|
+
|
332
|
+
create_table "colors", id: :serial, force: :cascade do |t|
|
333
|
+
t.integer "library_group_id"
|
334
|
+
t.string "property"
|
335
|
+
t.string "code"
|
336
|
+
t.integer "position"
|
337
|
+
t.datetime "created_at", null: false
|
338
|
+
t.datetime "updated_at", null: false
|
339
|
+
t.index ["library_group_id"], name: "index_colors_on_library_group_id"
|
340
|
+
end
|
341
|
+
|
342
|
+
create_table "content_types", id: :serial, force: :cascade do |t|
|
343
|
+
t.string "name", null: false
|
344
|
+
t.jsonb "display_name_translations"
|
345
|
+
t.text "note"
|
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"
|
354
|
+
end
|
355
|
+
|
356
|
+
create_table "countries", id: :serial, force: :cascade do |t|
|
357
|
+
t.string "name", null: false
|
358
|
+
t.text "display_name"
|
359
|
+
t.string "alpha_2"
|
360
|
+
t.string "alpha_3"
|
361
|
+
t.string "numeric_3"
|
362
|
+
t.text "note"
|
363
|
+
t.integer "position"
|
364
|
+
t.index ["alpha_2"], name: "index_countries_on_alpha_2"
|
365
|
+
t.index ["alpha_3"], name: "index_countries_on_alpha_3"
|
366
|
+
t.index ["name"], name: "index_countries_on_name"
|
367
|
+
t.index ["numeric_3"], name: "index_countries_on_numeric_3"
|
368
|
+
end
|
369
|
+
|
370
|
+
create_table "create_types", id: :serial, force: :cascade do |t|
|
371
|
+
t.string "name"
|
372
|
+
t.text "display_name"
|
373
|
+
t.text "note"
|
374
|
+
t.integer "position"
|
375
|
+
t.datetime "created_at", null: false
|
376
|
+
t.datetime "updated_at", null: false
|
377
|
+
end
|
378
|
+
|
379
|
+
create_table "creates", id: :serial, force: :cascade do |t|
|
380
|
+
t.integer "agent_id", null: false
|
381
|
+
t.uuid "work_id", null: false
|
364
382
|
t.integer "position"
|
365
|
-
t.
|
366
|
-
t.
|
367
|
-
t.
|
368
|
-
t.index ["
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
t.
|
374
|
-
t.
|
375
|
-
t.integer
|
376
|
-
t.datetime "created_at"
|
377
|
-
t.datetime "updated_at"
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
t.
|
385
|
-
t.
|
386
|
-
t.
|
387
|
-
t.
|
388
|
-
t.
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
t.
|
396
|
-
t.
|
397
|
-
t.
|
398
|
-
t.
|
399
|
-
t.index ["
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
t.
|
405
|
-
t.uuid
|
406
|
-
t.
|
407
|
-
t.datetime "created_at",
|
408
|
-
t.datetime "updated_at",
|
409
|
-
t.index ["
|
410
|
-
t.index ["manifestation_id"], name: "
|
411
|
-
end
|
412
|
-
|
413
|
-
create_table "
|
414
|
-
t.
|
415
|
-
t.
|
416
|
-
t.
|
417
|
-
t.
|
418
|
-
t.
|
419
|
-
t.
|
420
|
-
end
|
421
|
-
|
422
|
-
create_table "
|
423
|
-
t.
|
424
|
-
t.
|
425
|
-
t.
|
426
|
-
t.
|
427
|
-
t.datetime "
|
428
|
-
t.
|
429
|
-
end
|
430
|
-
|
431
|
-
create_table "
|
432
|
-
t.string
|
433
|
-
t.
|
434
|
-
t.text
|
435
|
-
t.integer
|
436
|
-
t.datetime "created_at",
|
437
|
-
t.datetime "updated_at",
|
438
|
-
end
|
439
|
-
|
440
|
-
create_table "
|
441
|
-
t.string
|
442
|
-
t.
|
443
|
-
t.
|
444
|
-
t.
|
445
|
-
t.
|
446
|
-
t.datetime "
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
t.
|
454
|
-
t.
|
455
|
-
t.
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
t.string
|
460
|
-
t.
|
461
|
-
t.
|
462
|
-
t.
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
t.
|
467
|
-
t.
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
t.
|
472
|
-
t.
|
473
|
-
t.
|
474
|
-
t.
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
t.
|
479
|
-
t.
|
480
|
-
t.
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
t.
|
485
|
-
t.
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
t.
|
490
|
-
t.
|
491
|
-
t.
|
492
|
-
t.
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
t.
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
t.
|
501
|
-
t.
|
502
|
-
t.
|
503
|
-
t.
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
t.
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
t.
|
512
|
-
t.
|
513
|
-
t.
|
514
|
-
t.
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
t.string
|
521
|
-
t.
|
522
|
-
t.
|
523
|
-
t.
|
524
|
-
t.
|
525
|
-
t.
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
t.integer "item_id", null: false
|
530
|
-
t.integer "use_restriction_id", null: false
|
531
|
-
t.datetime "created_at"
|
532
|
-
t.datetime "updated_at"
|
533
|
-
t.index ["item_id"], name: "index_item_has_use_restrictions_on_item_id", using: :btree
|
534
|
-
t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id", using: :btree
|
535
|
-
end
|
536
|
-
|
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", using: :btree
|
546
|
-
t.index ["sort_key", "item_id"], name: "index_item_transitions_on_sort_key_and_item_id", unique: true, using: :btree
|
383
|
+
t.datetime "created_at", null: false
|
384
|
+
t.datetime "updated_at", null: false
|
385
|
+
t.integer "create_type_id"
|
386
|
+
t.index ["agent_id"], name: "index_creates_on_agent_id"
|
387
|
+
t.index ["work_id"], name: "index_creates_on_work_id"
|
388
|
+
end
|
389
|
+
|
390
|
+
create_table "demands", id: :serial, force: :cascade do |t|
|
391
|
+
t.integer "user_id"
|
392
|
+
t.integer "item_id"
|
393
|
+
t.integer "message_id"
|
394
|
+
t.datetime "created_at", null: false
|
395
|
+
t.datetime "updated_at", null: false
|
396
|
+
t.index ["item_id"], name: "index_demands_on_item_id"
|
397
|
+
t.index ["message_id"], name: "index_demands_on_message_id"
|
398
|
+
t.index ["user_id"], name: "index_demands_on_user_id"
|
399
|
+
end
|
400
|
+
|
401
|
+
create_table "doi_records", id: :serial, 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
|
+
|
412
|
+
create_table "donates", id: :serial, force: :cascade do |t|
|
413
|
+
t.integer "agent_id", null: false
|
414
|
+
t.integer "item_id", null: false
|
415
|
+
t.datetime "created_at", null: false
|
416
|
+
t.datetime "updated_at", null: false
|
417
|
+
t.index ["agent_id"], name: "index_donates_on_agent_id"
|
418
|
+
t.index ["item_id"], name: "index_donates_on_item_id"
|
419
|
+
end
|
420
|
+
|
421
|
+
create_table "exemplifies", id: :serial, 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
|
+
|
431
|
+
create_table "form_of_works", id: :serial, force: :cascade do |t|
|
432
|
+
t.string "name", null: false
|
433
|
+
t.jsonb "display_name_translations"
|
434
|
+
t.text "note"
|
435
|
+
t.integer "position"
|
436
|
+
t.datetime "created_at", null: false
|
437
|
+
t.datetime "updated_at", null: false
|
438
|
+
end
|
439
|
+
|
440
|
+
create_table "frequencies", id: :serial, force: :cascade do |t|
|
441
|
+
t.string "name", null: false
|
442
|
+
t.jsonb "display_name_translations"
|
443
|
+
t.text "note"
|
444
|
+
t.integer "position"
|
445
|
+
t.datetime "created_at", null: false
|
446
|
+
t.datetime "updated_at", null: false
|
447
|
+
end
|
448
|
+
|
449
|
+
create_table "identifier_types", id: :serial, force: :cascade do |t|
|
450
|
+
t.string "name"
|
451
|
+
t.text "display_name"
|
452
|
+
t.text "note"
|
453
|
+
t.integer "position"
|
454
|
+
t.datetime "created_at", null: false
|
455
|
+
t.datetime "updated_at", null: false
|
456
|
+
end
|
457
|
+
|
458
|
+
create_table "identifiers", id: :serial, force: :cascade do |t|
|
459
|
+
t.string "body", null: false
|
460
|
+
t.integer "identifier_type_id", null: false
|
461
|
+
t.uuid "manifestation_id"
|
462
|
+
t.boolean "primary"
|
463
|
+
t.integer "position"
|
464
|
+
t.datetime "created_at", null: false
|
465
|
+
t.datetime "updated_at", null: false
|
466
|
+
t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
|
467
|
+
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
468
|
+
end
|
469
|
+
|
470
|
+
create_table "identities", id: :serial, force: :cascade do |t|
|
471
|
+
t.string "name"
|
472
|
+
t.string "email"
|
473
|
+
t.string "password_digest"
|
474
|
+
t.integer "profile_id"
|
475
|
+
t.datetime "created_at", null: false
|
476
|
+
t.datetime "updated_at", null: false
|
477
|
+
t.string "provider", null: false
|
478
|
+
t.index ["email"], name: "index_identities_on_email"
|
479
|
+
t.index ["name"], name: "index_identities_on_name"
|
480
|
+
t.index ["profile_id"], name: "index_identities_on_profile_id"
|
481
|
+
end
|
482
|
+
|
483
|
+
create_table "import_request_transitions", id: :serial, force: :cascade do |t|
|
484
|
+
t.string "to_state"
|
485
|
+
t.jsonb "metadata", default: "{}"
|
486
|
+
t.integer "sort_key"
|
487
|
+
t.integer "import_request_id"
|
488
|
+
t.datetime "created_at", null: false
|
489
|
+
t.datetime "updated_at", null: false
|
490
|
+
t.boolean "most_recent"
|
491
|
+
t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
|
492
|
+
t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
|
493
|
+
end
|
494
|
+
|
495
|
+
create_table "import_requests", id: :serial, force: :cascade do |t|
|
496
|
+
t.string "isbn"
|
497
|
+
t.uuid "manifestation_id"
|
498
|
+
t.integer "user_id"
|
499
|
+
t.datetime "created_at", null: false
|
500
|
+
t.datetime "updated_at", null: false
|
501
|
+
t.index ["isbn"], name: "index_import_requests_on_isbn"
|
502
|
+
t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
|
503
|
+
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
504
|
+
end
|
505
|
+
|
506
|
+
create_table "isbn_records", id: :serial, force: :cascade do |t|
|
507
|
+
t.string "body", null: false
|
508
|
+
t.string "isbn_type"
|
509
|
+
t.string "source"
|
510
|
+
t.uuid "manifestation_id"
|
511
|
+
t.datetime "created_at", null: false
|
512
|
+
t.datetime "updated_at", null: false
|
513
|
+
t.index ["body"], name: "index_isbn_records_on_body", unique: true
|
514
|
+
t.index ["manifestation_id"], name: "index_isbn_records_on_manifestation_id"
|
515
|
+
end
|
516
|
+
|
517
|
+
create_table "issn_records", id: :serial, force: :cascade do |t|
|
518
|
+
t.string "body", null: false
|
519
|
+
t.string "issn_type"
|
520
|
+
t.string "source"
|
521
|
+
t.uuid "manifestation_id"
|
522
|
+
t.datetime "created_at", null: false
|
523
|
+
t.datetime "updated_at", null: false
|
524
|
+
t.index ["body"], name: "index_issn_records_on_body", unique: true
|
525
|
+
t.index ["manifestation_id"], name: "index_issn_records_on_manifestation_id"
|
526
|
+
end
|
527
|
+
|
528
|
+
create_table "item_has_use_restrictions", id: :serial, force: :cascade do |t|
|
529
|
+
t.integer "item_id", null: false
|
530
|
+
t.integer "use_restriction_id", null: false
|
531
|
+
t.datetime "created_at", null: false
|
532
|
+
t.datetime "updated_at", null: false
|
533
|
+
t.index ["item_id"], name: "index_item_has_use_restrictions_on_item_id"
|
534
|
+
t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
|
535
|
+
end
|
536
|
+
|
537
|
+
create_table "item_transitions", id: :serial, 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
547
|
end
|
548
548
|
|
549
549
|
create_table "items", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
550
|
-
t.string
|
551
|
-
t.string
|
552
|
-
t.datetime "created_at",
|
553
|
-
t.datetime "updated_at",
|
550
|
+
t.string "call_number"
|
551
|
+
t.string "item_identifier"
|
552
|
+
t.datetime "created_at", null: false
|
553
|
+
t.datetime "updated_at", null: false
|
554
554
|
t.datetime "deleted_at"
|
555
|
-
t.integer
|
556
|
-
t.boolean
|
557
|
-
t.text
|
558
|
-
t.string
|
559
|
-
t.integer
|
560
|
-
t.integer
|
561
|
-
t.integer
|
562
|
-
t.integer
|
555
|
+
t.integer "shelf_id", default: 1
|
556
|
+
t.boolean "include_supplements", default: false, null: false
|
557
|
+
t.text "note"
|
558
|
+
t.string "url"
|
559
|
+
t.integer "price"
|
560
|
+
t.integer "lock_version", default: 0, null: false
|
561
|
+
t.integer "required_role_id", default: 1, null: false
|
562
|
+
t.integer "required_score", default: 0, null: false
|
563
563
|
t.datetime "acquired_at"
|
564
|
-
t.integer
|
565
|
-
t.integer
|
566
|
-
t.integer
|
567
|
-
t.integer
|
568
|
-
t.string
|
569
|
-
t.string
|
564
|
+
t.integer "bookstore_id"
|
565
|
+
t.integer "budget_type_id"
|
566
|
+
t.integer "circulation_status_id", default: 5, null: false
|
567
|
+
t.integer "checkout_type_id", default: 1, null: false
|
568
|
+
t.string "binding_item_identifier"
|
569
|
+
t.string "binding_call_number"
|
570
570
|
t.datetime "binded_at"
|
571
|
-
t.uuid
|
572
|
-
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
573
|
-
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
574
|
-
t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
|
575
|
-
t.index ["circulation_status_id"], name: "index_items_on_circulation_status_id"
|
576
|
-
t.index ["item_identifier"], name: "index_items_on_item_identifier"
|
577
|
-
t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
|
578
|
-
t.index ["required_role_id"], name: "index_items_on_required_role_id"
|
579
|
-
t.index ["shelf_id"], name: "index_items_on_shelf_id"
|
580
|
-
end
|
581
|
-
|
582
|
-
create_table "languages", force: :cascade do |t|
|
583
|
-
t.string
|
584
|
-
t.string
|
585
|
-
t.text
|
586
|
-
t.string
|
587
|
-
t.string
|
588
|
-
t.string
|
589
|
-
t.text
|
571
|
+
t.uuid "manifestation_id"
|
572
|
+
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
573
|
+
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
574
|
+
t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
|
575
|
+
t.index ["circulation_status_id"], name: "index_items_on_circulation_status_id"
|
576
|
+
t.index ["item_identifier"], name: "index_items_on_item_identifier"
|
577
|
+
t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
|
578
|
+
t.index ["required_role_id"], name: "index_items_on_required_role_id"
|
579
|
+
t.index ["shelf_id"], name: "index_items_on_shelf_id"
|
580
|
+
end
|
581
|
+
|
582
|
+
create_table "languages", id: :serial, force: :cascade do |t|
|
583
|
+
t.string "name", null: false
|
584
|
+
t.string "native_name"
|
585
|
+
t.text "display_name"
|
586
|
+
t.string "iso_639_1"
|
587
|
+
t.string "iso_639_2"
|
588
|
+
t.string "iso_639_3"
|
589
|
+
t.text "note"
|
590
590
|
t.integer "position"
|
591
|
-
t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
|
592
|
-
t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
|
593
|
-
t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
|
594
|
-
t.index ["name"], name: "index_languages_on_name", unique: true
|
591
|
+
t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
|
592
|
+
t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
|
593
|
+
t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
|
594
|
+
t.index ["name"], name: "index_languages_on_name", unique: true
|
595
595
|
end
|
596
596
|
|
597
|
-
create_table "lending_policies", force: :cascade do |t|
|
598
|
-
t.integer
|
599
|
-
t.integer
|
600
|
-
t.integer
|
597
|
+
create_table "lending_policies", id: :serial, force: :cascade do |t|
|
598
|
+
t.integer "item_id", null: false
|
599
|
+
t.integer "user_group_id", null: false
|
600
|
+
t.integer "loan_period", default: 0, null: false
|
601
601
|
t.datetime "fixed_due_date"
|
602
|
-
t.integer
|
603
|
-
t.integer
|
604
|
-
t.text
|
605
|
-
t.integer
|
606
|
-
t.datetime "created_at"
|
607
|
-
t.datetime "updated_at"
|
608
|
-
t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
|
602
|
+
t.integer "renewal", default: 0, null: false
|
603
|
+
t.integer "fine", default: 0, null: false
|
604
|
+
t.text "note"
|
605
|
+
t.integer "position"
|
606
|
+
t.datetime "created_at", null: false
|
607
|
+
t.datetime "updated_at", null: false
|
608
|
+
t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
|
609
609
|
end
|
610
610
|
|
611
611
|
create_table "libraries", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
612
|
-
t.string
|
613
|
-
t.jsonb
|
614
|
-
t.jsonb
|
615
|
-
t.string
|
616
|
-
t.text
|
617
|
-
t.text
|
618
|
-
t.text
|
619
|
-
t.string
|
620
|
-
t.string
|
621
|
-
t.string
|
622
|
-
t.text
|
623
|
-
t.integer
|
624
|
-
t.string
|
625
|
-
t.integer
|
626
|
-
t.integer
|
627
|
-
t.integer
|
628
|
-
t.integer
|
629
|
-
t.datetime "created_at",
|
630
|
-
t.datetime "updated_at",
|
612
|
+
t.string "name", null: false
|
613
|
+
t.jsonb "display_name_translations"
|
614
|
+
t.jsonb "short_display_name_translations"
|
615
|
+
t.string "zip_code"
|
616
|
+
t.text "street"
|
617
|
+
t.text "locality"
|
618
|
+
t.text "region"
|
619
|
+
t.string "telephone_number_1"
|
620
|
+
t.string "telephone_number_2"
|
621
|
+
t.string "fax_number"
|
622
|
+
t.text "note"
|
623
|
+
t.integer "call_number_rows", default: 1, null: false
|
624
|
+
t.string "call_number_delimiter", default: "|", null: false
|
625
|
+
t.integer "library_group_id", default: 1, null: false
|
626
|
+
t.integer "users_count", default: 0, null: false
|
627
|
+
t.integer "position"
|
628
|
+
t.integer "country_id"
|
629
|
+
t.datetime "created_at", null: false
|
630
|
+
t.datetime "updated_at", null: false
|
631
631
|
t.datetime "deleted_at"
|
632
|
-
t.text
|
633
|
-
t.string
|
634
|
-
t.float
|
635
|
-
t.float
|
636
|
-
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
637
|
-
t.index ["name"], name: "index_libraries_on_name", unique: true
|
638
|
-
end
|
639
|
-
|
640
|
-
create_table "library_groups", force: :cascade do |t|
|
641
|
-
t.string
|
642
|
-
t.jsonb
|
643
|
-
t.string
|
644
|
-
t.cidr
|
645
|
-
t.jsonb
|
646
|
-
t.text
|
647
|
-
t.integer
|
648
|
-
t.integer
|
649
|
-
t.datetime "created_at",
|
650
|
-
t.datetime "updated_at",
|
651
|
-
t.cidr
|
652
|
-
t.string
|
653
|
-
t.jsonb
|
654
|
-
t.jsonb
|
655
|
-
t.text
|
656
|
-
t.string
|
657
|
-
t.integer
|
658
|
-
t.boolean
|
659
|
-
t.string
|
660
|
-
t.integer
|
661
|
-
t.integer
|
662
|
-
t.index ["name"], name: "index_library_groups_on_name", unique: true
|
663
|
-
t.index ["short_name"], name: "index_library_groups_on_short_name", unique: true
|
664
|
-
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
665
|
-
end
|
666
|
-
|
667
|
-
create_table "licenses", force: :cascade do |t|
|
668
|
-
t.string
|
669
|
-
t.string
|
670
|
-
t.text
|
671
|
-
t.integer
|
672
|
-
t.datetime "created_at"
|
673
|
-
t.datetime "updated_at"
|
674
|
-
end
|
675
|
-
|
676
|
-
create_table "manifestation_checkout_stat_transitions", force: :cascade do |t|
|
677
|
-
t.string
|
678
|
-
t.text
|
679
|
-
t.integer
|
680
|
-
t.integer
|
681
|
-
t.datetime "created_at"
|
682
|
-
t.datetime "updated_at"
|
683
|
-
t.boolean
|
684
|
-
t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
685
|
-
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
686
|
-
end
|
687
|
-
|
688
|
-
create_table "manifestation_checkout_stats", force: :cascade do |t|
|
632
|
+
t.text "opening_hour"
|
633
|
+
t.string "isil"
|
634
|
+
t.float "latitude"
|
635
|
+
t.float "longitude"
|
636
|
+
t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
|
637
|
+
t.index ["name"], name: "index_libraries_on_name", unique: true
|
638
|
+
end
|
639
|
+
|
640
|
+
create_table "library_groups", id: :serial, force: :cascade do |t|
|
641
|
+
t.string "name", null: false
|
642
|
+
t.jsonb "display_name_translations"
|
643
|
+
t.string "short_name", null: false
|
644
|
+
t.cidr "my_networks"
|
645
|
+
t.jsonb "login_banner_translations"
|
646
|
+
t.text "note"
|
647
|
+
t.integer "country_id"
|
648
|
+
t.integer "position"
|
649
|
+
t.datetime "created_at", null: false
|
650
|
+
t.datetime "updated_at", null: false
|
651
|
+
t.cidr "admin_networks"
|
652
|
+
t.string "url", default: "http://localhost:3000/"
|
653
|
+
t.jsonb "settings"
|
654
|
+
t.jsonb "footer_banner_translations"
|
655
|
+
t.text "html_snippet"
|
656
|
+
t.string "book_jacket_source"
|
657
|
+
t.integer "max_number_of_results", default: 500
|
658
|
+
t.boolean "family_name_first", default: true
|
659
|
+
t.string "screenshot_generator"
|
660
|
+
t.integer "pub_year_facet_range_interval", default: 10
|
661
|
+
t.integer "user_id"
|
662
|
+
t.index ["name"], name: "index_library_groups_on_name", unique: true
|
663
|
+
t.index ["short_name"], name: "index_library_groups_on_short_name", unique: true
|
664
|
+
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
665
|
+
end
|
666
|
+
|
667
|
+
create_table "licenses", id: :serial, force: :cascade do |t|
|
668
|
+
t.string "name", null: false
|
669
|
+
t.string "display_name"
|
670
|
+
t.text "note"
|
671
|
+
t.integer "position"
|
672
|
+
t.datetime "created_at", null: false
|
673
|
+
t.datetime "updated_at", null: false
|
674
|
+
end
|
675
|
+
|
676
|
+
create_table "manifestation_checkout_stat_transitions", id: :serial, force: :cascade do |t|
|
677
|
+
t.string "to_state"
|
678
|
+
t.text "metadata", default: "{}"
|
679
|
+
t.integer "sort_key"
|
680
|
+
t.integer "manifestation_checkout_stat_id"
|
681
|
+
t.datetime "created_at", null: false
|
682
|
+
t.datetime "updated_at", null: false
|
683
|
+
t.boolean "most_recent"
|
684
|
+
t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
|
685
|
+
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
686
|
+
end
|
687
|
+
|
688
|
+
create_table "manifestation_checkout_stats", id: :serial, force: :cascade do |t|
|
689
689
|
t.datetime "start_date"
|
690
690
|
t.datetime "end_date"
|
691
|
-
t.text
|
692
|
-
t.datetime "created_at"
|
693
|
-
t.datetime "updated_at"
|
691
|
+
t.text "note"
|
692
|
+
t.datetime "created_at", null: false
|
693
|
+
t.datetime "updated_at", null: false
|
694
694
|
t.datetime "started_at"
|
695
695
|
t.datetime "completed_at"
|
696
|
-
t.integer
|
697
|
-
t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
|
698
|
-
end
|
699
|
-
|
700
|
-
create_table "manifestation_relationship_types", force: :cascade do |t|
|
701
|
-
t.string
|
702
|
-
t.text
|
703
|
-
t.text
|
704
|
-
t.integer
|
705
|
-
t.datetime "created_at"
|
706
|
-
t.datetime "updated_at"
|
707
|
-
end
|
708
|
-
|
709
|
-
create_table "manifestation_relationships", force: :cascade do |t|
|
710
|
-
t.uuid
|
711
|
-
t.uuid
|
712
|
-
t.integer
|
713
|
-
t.datetime "created_at",
|
714
|
-
t.datetime "updated_at",
|
715
|
-
t.integer
|
716
|
-
t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
717
|
-
t.index ["manifestation_relationship_type_id"], name: "index_manifestation_relationships_on_relationship_type_id"
|
718
|
-
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
719
|
-
end
|
720
|
-
|
721
|
-
create_table "manifestation_reserve_stat_transitions", force: :cascade do |t|
|
722
|
-
t.string
|
723
|
-
t.text
|
724
|
-
t.integer
|
725
|
-
t.integer
|
726
|
-
t.datetime "created_at"
|
727
|
-
t.datetime "updated_at"
|
728
|
-
t.boolean
|
729
|
-
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
730
|
-
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
731
|
-
end
|
732
|
-
|
733
|
-
create_table "manifestation_reserve_stats", force: :cascade do |t|
|
696
|
+
t.integer "user_id"
|
697
|
+
t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
|
698
|
+
end
|
699
|
+
|
700
|
+
create_table "manifestation_relationship_types", id: :serial, force: :cascade do |t|
|
701
|
+
t.string "name", null: false
|
702
|
+
t.text "display_name"
|
703
|
+
t.text "note"
|
704
|
+
t.integer "position"
|
705
|
+
t.datetime "created_at", null: false
|
706
|
+
t.datetime "updated_at", null: false
|
707
|
+
end
|
708
|
+
|
709
|
+
create_table "manifestation_relationships", id: :serial, force: :cascade do |t|
|
710
|
+
t.uuid "parent_id"
|
711
|
+
t.uuid "child_id"
|
712
|
+
t.integer "manifestation_relationship_type_id"
|
713
|
+
t.datetime "created_at", null: false
|
714
|
+
t.datetime "updated_at", null: false
|
715
|
+
t.integer "position"
|
716
|
+
t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
|
717
|
+
t.index ["manifestation_relationship_type_id"], name: "index_manifestation_relationships_on_relationship_type_id"
|
718
|
+
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
719
|
+
end
|
720
|
+
|
721
|
+
create_table "manifestation_reserve_stat_transitions", id: :serial, force: :cascade do |t|
|
722
|
+
t.string "to_state"
|
723
|
+
t.text "metadata", default: "{}"
|
724
|
+
t.integer "sort_key"
|
725
|
+
t.integer "manifestation_reserve_stat_id"
|
726
|
+
t.datetime "created_at", null: false
|
727
|
+
t.datetime "updated_at", null: false
|
728
|
+
t.boolean "most_recent"
|
729
|
+
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
730
|
+
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
731
|
+
end
|
732
|
+
|
733
|
+
create_table "manifestation_reserve_stats", id: :serial, force: :cascade do |t|
|
734
734
|
t.datetime "start_date"
|
735
735
|
t.datetime "end_date"
|
736
|
-
t.text
|
737
|
-
t.datetime "created_at"
|
738
|
-
t.datetime "updated_at"
|
736
|
+
t.text "note"
|
737
|
+
t.datetime "created_at", null: false
|
738
|
+
t.datetime "updated_at", null: false
|
739
739
|
t.datetime "started_at"
|
740
740
|
t.datetime "completed_at"
|
741
|
-
t.integer
|
742
|
-
t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
|
741
|
+
t.integer "user_id"
|
742
|
+
t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
|
743
743
|
end
|
744
744
|
|
745
745
|
create_table "manifestations", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
746
|
-
t.text
|
747
|
-
t.text
|
748
|
-
t.text
|
749
|
-
t.string
|
750
|
-
t.string
|
746
|
+
t.text "original_title", null: false
|
747
|
+
t.text "title_alternative"
|
748
|
+
t.text "title_transcription"
|
749
|
+
t.string "classification_number"
|
750
|
+
t.string "manifestation_identifier"
|
751
751
|
t.datetime "date_of_publication"
|
752
752
|
t.datetime "date_copyrighted"
|
753
|
-
t.datetime "created_at",
|
754
|
-
t.datetime "updated_at",
|
753
|
+
t.datetime "created_at", null: false
|
754
|
+
t.datetime "updated_at", null: false
|
755
755
|
t.datetime "deleted_at"
|
756
|
-
t.string
|
757
|
-
t.integer
|
758
|
-
t.integer
|
759
|
-
t.integer
|
760
|
-
t.integer
|
761
|
-
t.integer
|
762
|
-
t.integer
|
763
|
-
t.integer
|
764
|
-
t.integer
|
765
|
-
t.text
|
766
|
-
t.string
|
767
|
-
t.string
|
768
|
-
t.string
|
769
|
-
t.integer
|
770
|
-
t.text
|
771
|
-
t.boolean
|
772
|
-
t.integer
|
773
|
-
t.integer
|
774
|
-
t.integer
|
775
|
-
t.integer
|
776
|
-
t.boolean
|
777
|
-
t.string
|
778
|
-
t.string
|
779
|
-
t.integer
|
756
|
+
t.string "access_address"
|
757
|
+
t.integer "language_id", default: 1, null: false
|
758
|
+
t.integer "carrier_type_id", null: false
|
759
|
+
t.integer "start_page"
|
760
|
+
t.integer "end_page"
|
761
|
+
t.integer "height"
|
762
|
+
t.integer "width"
|
763
|
+
t.integer "depth"
|
764
|
+
t.integer "price"
|
765
|
+
t.text "fulltext"
|
766
|
+
t.string "volume_number_string"
|
767
|
+
t.string "issue_number_string"
|
768
|
+
t.string "serial_number_string"
|
769
|
+
t.integer "edition"
|
770
|
+
t.text "note"
|
771
|
+
t.boolean "repository_content", default: false, null: false
|
772
|
+
t.integer "lock_version", default: 0, null: false
|
773
|
+
t.integer "required_role_id", default: 1, null: false
|
774
|
+
t.integer "required_score", default: 0, null: false
|
775
|
+
t.integer "frequency_id", default: 1, null: false
|
776
|
+
t.boolean "subscription_master", default: false, null: false
|
777
|
+
t.string "attachment_file_name"
|
778
|
+
t.string "attachment_content_type"
|
779
|
+
t.integer "attachment_size"
|
780
780
|
t.datetime "attachment_updated_at"
|
781
|
-
t.text
|
782
|
-
t.text
|
783
|
-
t.text
|
781
|
+
t.text "title_alternative_transcription"
|
782
|
+
t.text "description"
|
783
|
+
t.text "abstract"
|
784
784
|
t.datetime "available_at"
|
785
785
|
t.datetime "valid_until"
|
786
786
|
t.datetime "date_submitted"
|
787
787
|
t.datetime "date_accepted"
|
788
788
|
t.datetime "date_captured"
|
789
|
-
t.string
|
790
|
-
t.string
|
791
|
-
t.integer
|
792
|
-
t.integer
|
793
|
-
t.integer
|
794
|
-
t.integer
|
795
|
-
t.integer
|
796
|
-
t.text
|
797
|
-
t.integer
|
798
|
-
t.boolean
|
799
|
-
t.boolean
|
800
|
-
t.text
|
801
|
-
t.text
|
802
|
-
t.text
|
803
|
-
t.text
|
804
|
-
t.string
|
805
|
-
t.string
|
806
|
-
t.jsonb
|
807
|
-
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
808
|
-
t.index ["attachment_id"], name: "index_manifestations_on_attachment_id"
|
809
|
-
t.index ["carrier_type_id"], name: "index_manifestations_on_carrier_type_id"
|
810
|
-
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
811
|
-
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier", unique: true
|
812
|
-
t.index ["updated_at"], name: "index_manifestations_on_updated_at"
|
813
|
-
end
|
814
|
-
|
815
|
-
create_table "medium_of_performances", force: :cascade do |t|
|
816
|
-
t.string
|
817
|
-
t.jsonb
|
818
|
-
t.text
|
819
|
-
t.integer
|
820
|
-
t.datetime "created_at",
|
821
|
-
t.datetime "updated_at",
|
822
|
-
end
|
823
|
-
|
824
|
-
create_table "
|
825
|
-
t.
|
826
|
-
t.
|
827
|
-
t.integer
|
828
|
-
t.
|
829
|
-
t.datetime "
|
830
|
-
t.
|
831
|
-
t.index ["
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
t.
|
837
|
-
t.
|
838
|
-
t.
|
839
|
-
t.datetime "
|
840
|
-
t.
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
t.
|
848
|
-
t.
|
849
|
-
t.
|
850
|
-
t.
|
851
|
-
t.
|
852
|
-
t.
|
853
|
-
t.
|
854
|
-
t.
|
855
|
-
end
|
856
|
-
|
857
|
-
create_table "message_transitions", force: :cascade do |t|
|
858
|
-
t.string "to_state"
|
859
|
-
t.text "metadata", default: "{}"
|
860
|
-
t.integer "sort_key"
|
861
|
-
t.integer "message_id"
|
862
|
-
t.datetime "created_at"
|
863
|
-
t.datetime "updated_at"
|
864
|
-
t.boolean "most_recent"
|
865
|
-
t.index ["message_id"], name: "index_message_transitions_on_message_id", using: :btree
|
866
|
-
t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true, using: :btree
|
867
|
-
end
|
868
|
-
|
869
|
-
create_table "messages", force: :cascade do |t|
|
870
|
-
t.datetime "read_at"
|
871
|
-
t.integer "receiver_id"
|
872
|
-
t.integer "sender_id"
|
873
|
-
t.string "subject", null: false
|
874
|
-
t.text "body"
|
875
|
-
t.integer "message_request_id"
|
876
|
-
t.integer "parent_id"
|
877
|
-
t.datetime "created_at"
|
878
|
-
t.datetime "updated_at"
|
879
|
-
t.integer "lft"
|
880
|
-
t.integer "rgt"
|
881
|
-
t.integer "depth"
|
882
|
-
t.index ["message_request_id"], name: "index_messages_on_message_request_id", using: :btree
|
883
|
-
t.index ["parent_id"], name: "index_messages_on_parent_id", using: :btree
|
884
|
-
t.index ["receiver_id"], name: "index_messages_on_receiver_id", using: :btree
|
885
|
-
t.index ["sender_id"], name: "index_messages_on_sender_id", using: :btree
|
886
|
-
end
|
887
|
-
|
888
|
-
create_table "owns", force: :cascade do |t|
|
889
|
-
t.integer "agent_id", null: false
|
890
|
-
t.uuid "item_id", null: false
|
891
|
-
t.integer "position"
|
892
|
-
t.datetime "created_at", null: false
|
893
|
-
t.datetime "updated_at", null: false
|
894
|
-
t.index ["agent_id"], name: "index_owns_on_agent_id", using: :btree
|
895
|
-
t.index ["item_id"], name: "index_owns_on_item_id", using: :btree
|
896
|
-
end
|
897
|
-
|
898
|
-
create_table "periodicals", force: :cascade do |t|
|
899
|
-
t.text "original_title"
|
900
|
-
t.string "periodical_type"
|
901
|
-
t.uuid "manifestation_id"
|
902
|
-
t.datetime "created_at", null: false
|
903
|
-
t.datetime "updated_at", null: false
|
904
|
-
t.index ["manifestation_id"], name: "index_periodicals_on_manifestation_id", using: :btree
|
905
|
-
end
|
906
|
-
|
907
|
-
create_table "picture_files", force: :cascade do |t|
|
908
|
-
t.integer "picture_attachable_id"
|
909
|
-
t.string "picture_attachable_type"
|
910
|
-
t.string "content_type"
|
911
|
-
t.text "title"
|
912
|
-
t.string "thumbnail"
|
913
|
-
t.integer "position"
|
914
|
-
t.datetime "created_at"
|
915
|
-
t.datetime "updated_at"
|
916
|
-
t.string "picture_file_name"
|
917
|
-
t.string "picture_content_type"
|
918
|
-
t.integer "picture_size"
|
789
|
+
t.string "pub_date"
|
790
|
+
t.string "edition_string"
|
791
|
+
t.integer "volume_number"
|
792
|
+
t.integer "issue_number"
|
793
|
+
t.integer "serial_number"
|
794
|
+
t.integer "content_type_id", default: 1
|
795
|
+
t.integer "year_of_publication"
|
796
|
+
t.text "attachment_meta"
|
797
|
+
t.integer "month_of_publication"
|
798
|
+
t.boolean "fulltext_content"
|
799
|
+
t.boolean "serial"
|
800
|
+
t.text "statement_of_responsibility"
|
801
|
+
t.text "publication_place"
|
802
|
+
t.text "extent"
|
803
|
+
t.text "dimensions"
|
804
|
+
t.string "attachment_id"
|
805
|
+
t.string "attachment_fingerprint"
|
806
|
+
t.jsonb "attachment_data"
|
807
|
+
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
808
|
+
t.index ["attachment_id"], name: "index_manifestations_on_attachment_id"
|
809
|
+
t.index ["carrier_type_id"], name: "index_manifestations_on_carrier_type_id"
|
810
|
+
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
811
|
+
t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier", unique: true
|
812
|
+
t.index ["updated_at"], name: "index_manifestations_on_updated_at"
|
813
|
+
end
|
814
|
+
|
815
|
+
create_table "medium_of_performances", id: :serial, force: :cascade do |t|
|
816
|
+
t.string "name", null: false
|
817
|
+
t.jsonb "display_name_translations"
|
818
|
+
t.text "note"
|
819
|
+
t.integer "position"
|
820
|
+
t.datetime "created_at", null: false
|
821
|
+
t.datetime "updated_at", null: false
|
822
|
+
end
|
823
|
+
|
824
|
+
create_table "owns", id: :serial, force: :cascade do |t|
|
825
|
+
t.integer "agent_id", null: false
|
826
|
+
t.uuid "item_id", null: false
|
827
|
+
t.integer "position"
|
828
|
+
t.datetime "created_at", null: false
|
829
|
+
t.datetime "updated_at", null: false
|
830
|
+
t.index ["agent_id"], name: "index_owns_on_agent_id"
|
831
|
+
t.index ["item_id"], name: "index_owns_on_item_id"
|
832
|
+
end
|
833
|
+
|
834
|
+
create_table "periodicals", id: :serial, force: :cascade do |t|
|
835
|
+
t.text "original_title"
|
836
|
+
t.string "periodical_type"
|
837
|
+
t.uuid "manifestation_id"
|
838
|
+
t.datetime "created_at", null: false
|
839
|
+
t.datetime "updated_at", null: false
|
840
|
+
t.index ["manifestation_id"], name: "index_periodicals_on_manifestation_id"
|
841
|
+
end
|
842
|
+
|
843
|
+
create_table "picture_files", id: :serial, force: :cascade do |t|
|
844
|
+
t.integer "picture_attachable_id"
|
845
|
+
t.string "picture_attachable_type"
|
846
|
+
t.string "content_type"
|
847
|
+
t.text "title"
|
848
|
+
t.string "thumbnail"
|
849
|
+
t.integer "position"
|
850
|
+
t.datetime "created_at", null: false
|
851
|
+
t.datetime "updated_at", null: false
|
852
|
+
t.string "picture_file_name"
|
853
|
+
t.string "picture_content_type"
|
854
|
+
t.integer "picture_size"
|
919
855
|
t.datetime "picture_updated_at"
|
920
|
-
t.text
|
921
|
-
t.string
|
922
|
-
t.string
|
923
|
-
t.jsonb
|
924
|
-
t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
925
|
-
t.index ["picture_id"], name: "index_picture_files_on_picture_id"
|
926
|
-
end
|
927
|
-
|
928
|
-
create_table "produce_types", force: :cascade do |t|
|
929
|
-
t.string
|
930
|
-
t.text
|
931
|
-
t.text
|
932
|
-
t.integer
|
933
|
-
t.datetime "created_at"
|
934
|
-
t.datetime "updated_at"
|
935
|
-
end
|
936
|
-
|
937
|
-
create_table "produces", force: :cascade do |t|
|
938
|
-
t.integer
|
939
|
-
t.uuid
|
940
|
-
t.integer
|
941
|
-
t.datetime "created_at",
|
942
|
-
t.datetime "updated_at",
|
943
|
-
t.integer
|
944
|
-
t.index ["agent_id"], name: "index_produces_on_agent_id"
|
945
|
-
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
856
|
+
t.text "picture_meta"
|
857
|
+
t.string "picture_fingerprint"
|
858
|
+
t.string "picture_id"
|
859
|
+
t.jsonb "image_data"
|
860
|
+
t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
|
861
|
+
t.index ["picture_id"], name: "index_picture_files_on_picture_id"
|
862
|
+
end
|
863
|
+
|
864
|
+
create_table "produce_types", id: :serial, force: :cascade do |t|
|
865
|
+
t.string "name"
|
866
|
+
t.text "display_name"
|
867
|
+
t.text "note"
|
868
|
+
t.integer "position"
|
869
|
+
t.datetime "created_at", null: false
|
870
|
+
t.datetime "updated_at", null: false
|
871
|
+
end
|
872
|
+
|
873
|
+
create_table "produces", id: :serial, force: :cascade do |t|
|
874
|
+
t.integer "agent_id", null: false
|
875
|
+
t.uuid "manifestation_id", null: false
|
876
|
+
t.integer "position"
|
877
|
+
t.datetime "created_at", null: false
|
878
|
+
t.datetime "updated_at", null: false
|
879
|
+
t.integer "produce_type_id"
|
880
|
+
t.index ["agent_id"], name: "index_produces_on_agent_id"
|
881
|
+
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
946
882
|
end
|
947
883
|
|
948
884
|
create_table "profiles", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
949
|
-
t.uuid
|
950
|
-
t.uuid
|
951
|
-
t.string
|
952
|
-
t.string
|
953
|
-
t.text
|
954
|
-
t.text
|
955
|
-
t.text
|
956
|
-
t.integer
|
957
|
-
t.datetime "created_at",
|
958
|
-
t.datetime "updated_at",
|
959
|
-
t.string
|
960
|
-
t.boolean
|
885
|
+
t.uuid "user_group_id"
|
886
|
+
t.uuid "library_id"
|
887
|
+
t.string "locale"
|
888
|
+
t.string "user_number"
|
889
|
+
t.text "full_name"
|
890
|
+
t.text "note"
|
891
|
+
t.text "keyword_list"
|
892
|
+
t.integer "required_role_id"
|
893
|
+
t.datetime "created_at", null: false
|
894
|
+
t.datetime "updated_at", null: false
|
895
|
+
t.string "checkout_icalendar_token"
|
896
|
+
t.boolean "save_checkout_history", default: false, null: false
|
961
897
|
t.datetime "expired_at"
|
962
|
-
t.text
|
898
|
+
t.text "full_name_transcription"
|
963
899
|
t.datetime "date_of_birth"
|
964
|
-
t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
|
965
|
-
t.index ["library_id"], name: "index_profiles_on_library_id"
|
966
|
-
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
967
|
-
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
968
|
-
end
|
969
|
-
|
970
|
-
create_table "realize_types", force: :cascade do |t|
|
971
|
-
t.string
|
972
|
-
t.text
|
973
|
-
t.text
|
974
|
-
t.integer
|
975
|
-
t.datetime "created_at"
|
976
|
-
t.datetime "updated_at"
|
977
|
-
end
|
978
|
-
|
979
|
-
create_table "realizes", force: :cascade do |t|
|
980
|
-
t.integer
|
981
|
-
t.uuid
|
982
|
-
t.integer
|
983
|
-
t.datetime "created_at",
|
984
|
-
t.datetime "updated_at",
|
985
|
-
t.integer
|
986
|
-
t.index ["agent_id"], name: "index_realizes_on_agent_id"
|
987
|
-
t.index ["expression_id"], name: "index_realizes_on_expression_id"
|
988
|
-
end
|
989
|
-
|
990
|
-
create_table "request_status_types", force: :cascade do |t|
|
991
|
-
t.string
|
992
|
-
t.jsonb
|
993
|
-
t.text
|
994
|
-
t.integer
|
995
|
-
t.datetime "created_at",
|
996
|
-
t.datetime "updated_at",
|
997
|
-
t.index ["name"], name: "index_request_status_types_on_name", unique: true
|
998
|
-
end
|
999
|
-
|
1000
|
-
create_table "request_types", force: :cascade do |t|
|
1001
|
-
t.string
|
1002
|
-
t.jsonb
|
1003
|
-
t.text
|
1004
|
-
t.integer
|
1005
|
-
t.datetime "created_at",
|
1006
|
-
t.datetime "updated_at",
|
1007
|
-
t.index ["name"], name: "index_request_types_on_name", unique: true
|
1008
|
-
end
|
1009
|
-
|
1010
|
-
create_table "reserve_stat_has_manifestations", force: :cascade do |t|
|
1011
|
-
t.integer
|
1012
|
-
t.integer
|
1013
|
-
t.integer
|
1014
|
-
t.datetime "created_at"
|
1015
|
-
t.datetime "updated_at"
|
1016
|
-
t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
|
1017
|
-
t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
1018
|
-
end
|
1019
|
-
|
1020
|
-
create_table "reserve_stat_has_users", force: :cascade do |t|
|
1021
|
-
t.integer
|
1022
|
-
t.integer
|
1023
|
-
t.integer
|
1024
|
-
t.datetime "created_at"
|
1025
|
-
t.datetime "updated_at"
|
1026
|
-
t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
|
1027
|
-
t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
1028
|
-
end
|
1029
|
-
|
1030
|
-
create_table "reserve_transitions", force: :cascade do |t|
|
1031
|
-
t.string
|
1032
|
-
t.text
|
1033
|
-
t.integer
|
1034
|
-
t.integer
|
1035
|
-
t.datetime "created_at"
|
1036
|
-
t.datetime "updated_at"
|
1037
|
-
t.boolean
|
1038
|
-
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
1039
|
-
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
1040
|
-
end
|
1041
|
-
|
1042
|
-
create_table "reserves", force: :cascade do |t|
|
1043
|
-
t.integer
|
1044
|
-
t.integer
|
1045
|
-
t.integer
|
1046
|
-
t.integer
|
900
|
+
t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
|
901
|
+
t.index ["library_id"], name: "index_profiles_on_library_id"
|
902
|
+
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
903
|
+
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
904
|
+
end
|
905
|
+
|
906
|
+
create_table "realize_types", id: :serial, force: :cascade do |t|
|
907
|
+
t.string "name"
|
908
|
+
t.text "display_name"
|
909
|
+
t.text "note"
|
910
|
+
t.integer "position"
|
911
|
+
t.datetime "created_at", null: false
|
912
|
+
t.datetime "updated_at", null: false
|
913
|
+
end
|
914
|
+
|
915
|
+
create_table "realizes", id: :serial, force: :cascade do |t|
|
916
|
+
t.integer "agent_id", null: false
|
917
|
+
t.uuid "expression_id", null: false
|
918
|
+
t.integer "position"
|
919
|
+
t.datetime "created_at", null: false
|
920
|
+
t.datetime "updated_at", null: false
|
921
|
+
t.integer "realize_type_id"
|
922
|
+
t.index ["agent_id"], name: "index_realizes_on_agent_id"
|
923
|
+
t.index ["expression_id"], name: "index_realizes_on_expression_id"
|
924
|
+
end
|
925
|
+
|
926
|
+
create_table "request_status_types", id: :serial, force: :cascade do |t|
|
927
|
+
t.string "name", null: false
|
928
|
+
t.jsonb "display_name_translations"
|
929
|
+
t.text "note"
|
930
|
+
t.integer "position"
|
931
|
+
t.datetime "created_at", null: false
|
932
|
+
t.datetime "updated_at", null: false
|
933
|
+
t.index ["name"], name: "index_request_status_types_on_name", unique: true
|
934
|
+
end
|
935
|
+
|
936
|
+
create_table "request_types", id: :serial, force: :cascade do |t|
|
937
|
+
t.string "name", null: false
|
938
|
+
t.jsonb "display_name_translations"
|
939
|
+
t.text "note"
|
940
|
+
t.integer "position"
|
941
|
+
t.datetime "created_at", null: false
|
942
|
+
t.datetime "updated_at", null: false
|
943
|
+
t.index ["name"], name: "index_request_types_on_name", unique: true
|
944
|
+
end
|
945
|
+
|
946
|
+
create_table "reserve_stat_has_manifestations", id: :serial, force: :cascade do |t|
|
947
|
+
t.integer "manifestation_reserve_stat_id", null: false
|
948
|
+
t.integer "manifestation_id", null: false
|
949
|
+
t.integer "reserves_count"
|
950
|
+
t.datetime "created_at", null: false
|
951
|
+
t.datetime "updated_at", null: false
|
952
|
+
t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
|
953
|
+
t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
954
|
+
end
|
955
|
+
|
956
|
+
create_table "reserve_stat_has_users", id: :serial, force: :cascade do |t|
|
957
|
+
t.integer "user_reserve_stat_id", null: false
|
958
|
+
t.integer "user_id", null: false
|
959
|
+
t.integer "reserves_count"
|
960
|
+
t.datetime "created_at", null: false
|
961
|
+
t.datetime "updated_at", null: false
|
962
|
+
t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
|
963
|
+
t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
964
|
+
end
|
965
|
+
|
966
|
+
create_table "reserve_transitions", id: :serial, force: :cascade do |t|
|
967
|
+
t.string "to_state"
|
968
|
+
t.text "metadata", default: "{}"
|
969
|
+
t.integer "sort_key"
|
970
|
+
t.integer "reserve_id"
|
971
|
+
t.datetime "created_at", null: false
|
972
|
+
t.datetime "updated_at", null: false
|
973
|
+
t.boolean "most_recent"
|
974
|
+
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
975
|
+
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
976
|
+
end
|
977
|
+
|
978
|
+
create_table "reserves", id: :serial, force: :cascade do |t|
|
979
|
+
t.integer "user_id", null: false
|
980
|
+
t.integer "manifestation_id", null: false
|
981
|
+
t.integer "item_id"
|
982
|
+
t.integer "request_status_type_id", null: false
|
1047
983
|
t.datetime "checked_out_at"
|
1048
|
-
t.datetime "created_at"
|
1049
|
-
t.datetime "updated_at"
|
984
|
+
t.datetime "created_at", null: false
|
985
|
+
t.datetime "updated_at", null: false
|
1050
986
|
t.datetime "canceled_at"
|
1051
987
|
t.datetime "expired_at"
|
1052
988
|
t.datetime "deleted_at"
|
1053
|
-
t.boolean
|
1054
|
-
t.boolean
|
1055
|
-
t.integer
|
989
|
+
t.boolean "expiration_notice_to_patron", default: false
|
990
|
+
t.boolean "expiration_notice_to_library", default: false
|
991
|
+
t.integer "pickup_location_id"
|
1056
992
|
t.datetime "retained_at"
|
1057
993
|
t.datetime "postponed_at"
|
1058
|
-
t.integer
|
1059
|
-
t.index ["item_id"], name: "index_reserves_on_item_id"
|
1060
|
-
t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id"
|
1061
|
-
t.index ["pickup_location_id"], name: "index_reserves_on_pickup_location_id"
|
1062
|
-
t.index ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
|
1063
|
-
t.index ["user_id"], name: "index_reserves_on_user_id"
|
1064
|
-
end
|
1065
|
-
|
1066
|
-
create_table "resource_export_file_transitions", force: :cascade do |t|
|
1067
|
-
t.string
|
1068
|
-
t.jsonb
|
1069
|
-
t.integer
|
1070
|
-
t.integer
|
1071
|
-
t.datetime "created_at"
|
1072
|
-
t.datetime "updated_at"
|
1073
|
-
t.boolean
|
1074
|
-
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1075
|
-
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1076
|
-
end
|
1077
|
-
|
1078
|
-
create_table "resource_export_files", force: :cascade do |t|
|
1079
|
-
t.integer
|
994
|
+
t.integer "lock_version", default: 0, null: false
|
995
|
+
t.index ["item_id"], name: "index_reserves_on_item_id"
|
996
|
+
t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id"
|
997
|
+
t.index ["pickup_location_id"], name: "index_reserves_on_pickup_location_id"
|
998
|
+
t.index ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
|
999
|
+
t.index ["user_id"], name: "index_reserves_on_user_id"
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
create_table "resource_export_file_transitions", id: :serial, force: :cascade do |t|
|
1003
|
+
t.string "to_state"
|
1004
|
+
t.jsonb "metadata", default: "{}"
|
1005
|
+
t.integer "sort_key"
|
1006
|
+
t.integer "resource_export_file_id"
|
1007
|
+
t.datetime "created_at", null: false
|
1008
|
+
t.datetime "updated_at", null: false
|
1009
|
+
t.boolean "most_recent"
|
1010
|
+
t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
|
1011
|
+
t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
create_table "resource_export_files", id: :serial, force: :cascade do |t|
|
1015
|
+
t.integer "user_id"
|
1080
1016
|
t.datetime "executed_at"
|
1081
|
-
t.datetime "created_at"
|
1082
|
-
t.datetime "updated_at"
|
1083
|
-
t.string
|
1084
|
-
t.integer
|
1085
|
-
t.string
|
1086
|
-
t.jsonb
|
1087
|
-
t.index ["resource_export_id"], name: "index_resource_export_files_on_resource_export_id"
|
1088
|
-
end
|
1089
|
-
|
1090
|
-
create_table "resource_import_file_transitions", force: :cascade do |t|
|
1091
|
-
t.string
|
1092
|
-
t.jsonb
|
1093
|
-
t.integer
|
1094
|
-
t.integer
|
1095
|
-
t.datetime "created_at"
|
1096
|
-
t.datetime "updated_at"
|
1097
|
-
t.boolean
|
1098
|
-
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1099
|
-
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1100
|
-
end
|
1101
|
-
|
1102
|
-
create_table "resource_import_files", force: :cascade do |t|
|
1103
|
-
t.integer
|
1104
|
-
t.string
|
1105
|
-
t.integer
|
1106
|
-
t.integer
|
1107
|
-
t.text
|
1017
|
+
t.datetime "created_at", null: false
|
1018
|
+
t.datetime "updated_at", null: false
|
1019
|
+
t.string "resource_export_id"
|
1020
|
+
t.integer "resource_export_size"
|
1021
|
+
t.string "resource_export_filename"
|
1022
|
+
t.jsonb "attachment_data"
|
1023
|
+
t.index ["resource_export_id"], name: "index_resource_export_files_on_resource_export_id"
|
1024
|
+
end
|
1025
|
+
|
1026
|
+
create_table "resource_import_file_transitions", id: :serial, force: :cascade do |t|
|
1027
|
+
t.string "to_state"
|
1028
|
+
t.jsonb "metadata", default: "{}"
|
1029
|
+
t.integer "sort_key"
|
1030
|
+
t.integer "resource_import_file_id"
|
1031
|
+
t.datetime "created_at", null: false
|
1032
|
+
t.datetime "updated_at", null: false
|
1033
|
+
t.boolean "most_recent"
|
1034
|
+
t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
|
1035
|
+
t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1036
|
+
end
|
1037
|
+
|
1038
|
+
create_table "resource_import_files", id: :serial, force: :cascade do |t|
|
1039
|
+
t.integer "parent_id"
|
1040
|
+
t.string "content_type"
|
1041
|
+
t.integer "size"
|
1042
|
+
t.integer "user_id"
|
1043
|
+
t.text "note"
|
1108
1044
|
t.datetime "executed_at"
|
1109
|
-
t.string
|
1110
|
-
t.string
|
1111
|
-
t.integer
|
1045
|
+
t.string "resource_import_file_name"
|
1046
|
+
t.string "resource_import_content_type"
|
1047
|
+
t.integer "resource_import_size"
|
1112
1048
|
t.datetime "resource_import_updated_at"
|
1113
|
-
t.datetime "created_at"
|
1114
|
-
t.datetime "updated_at"
|
1115
|
-
t.string
|
1116
|
-
t.string
|
1117
|
-
t.
|
1118
|
-
t.
|
1119
|
-
t.
|
1120
|
-
t.
|
1121
|
-
t.
|
1122
|
-
t.index ["
|
1123
|
-
t.index ["
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
t.integer
|
1129
|
-
t.integer
|
1130
|
-
t.
|
1131
|
-
t.
|
1132
|
-
t.datetime "
|
1133
|
-
t.
|
1134
|
-
t.
|
1135
|
-
t.index ["
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
t.
|
1142
|
-
t.
|
1143
|
-
t.
|
1144
|
-
t.
|
1145
|
-
t.
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
t.string
|
1152
|
-
t.text
|
1153
|
-
t.
|
1154
|
-
t.text
|
1155
|
-
t.text
|
1156
|
-
t.text
|
1157
|
-
t.
|
1158
|
-
t.
|
1159
|
-
t.
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
t.
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
t.
|
1172
|
-
t.
|
1173
|
-
t.
|
1174
|
-
t.
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
t.text
|
1181
|
-
t.text
|
1182
|
-
t.
|
1183
|
-
t.
|
1184
|
-
t.
|
1185
|
-
t.
|
1186
|
-
t.
|
1187
|
-
t.
|
1188
|
-
t.
|
1189
|
-
t.
|
1190
|
-
t.
|
1191
|
-
t.text
|
1192
|
-
t.text
|
1193
|
-
t.text
|
1194
|
-
t.
|
1195
|
-
t.
|
1196
|
-
t.
|
1197
|
-
t.
|
1198
|
-
t.index ["
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
t.
|
1205
|
-
t.
|
1206
|
-
t.
|
1207
|
-
t.
|
1208
|
-
t.
|
1209
|
-
t.
|
1210
|
-
t.datetime "created_at", null: false
|
1211
|
-
t.datetime "updated_at", null: false
|
1049
|
+
t.datetime "created_at", null: false
|
1050
|
+
t.datetime "updated_at", null: false
|
1051
|
+
t.string "edit_mode"
|
1052
|
+
t.string "resource_import_fingerprint"
|
1053
|
+
t.string "user_encoding"
|
1054
|
+
t.integer "default_shelf_id"
|
1055
|
+
t.string "resource_import_id"
|
1056
|
+
t.jsonb "attachment_data"
|
1057
|
+
t.index ["parent_id"], name: "index_resource_import_files_on_parent_id"
|
1058
|
+
t.index ["resource_import_id"], name: "index_resource_import_files_on_resource_import_id"
|
1059
|
+
t.index ["user_id"], name: "index_resource_import_files_on_user_id"
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
create_table "resource_import_results", id: :serial, force: :cascade do |t|
|
1063
|
+
t.integer "resource_import_file_id"
|
1064
|
+
t.integer "manifestation_id"
|
1065
|
+
t.integer "item_id"
|
1066
|
+
t.text "body"
|
1067
|
+
t.datetime "created_at", null: false
|
1068
|
+
t.datetime "updated_at", null: false
|
1069
|
+
t.index ["item_id"], name: "index_resource_import_results_on_item_id"
|
1070
|
+
t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
|
1071
|
+
t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
create_table "roles", id: :serial, force: :cascade do |t|
|
1075
|
+
t.string "name", null: false
|
1076
|
+
t.jsonb "display_name_translations"
|
1077
|
+
t.text "note"
|
1078
|
+
t.datetime "created_at", null: false
|
1079
|
+
t.datetime "updated_at", null: false
|
1080
|
+
t.integer "score", default: 0, null: false
|
1081
|
+
t.integer "position"
|
1082
|
+
end
|
1083
|
+
|
1084
|
+
create_table "search_engines", id: :serial, force: :cascade do |t|
|
1085
|
+
t.string "name", null: false
|
1086
|
+
t.text "display_name"
|
1087
|
+
t.string "url", null: false
|
1088
|
+
t.text "base_url", null: false
|
1089
|
+
t.text "http_method", null: false
|
1090
|
+
t.text "query_param", null: false
|
1091
|
+
t.text "additional_param"
|
1092
|
+
t.text "note"
|
1093
|
+
t.integer "position"
|
1094
|
+
t.datetime "created_at", null: false
|
1095
|
+
t.datetime "updated_at", null: false
|
1096
|
+
end
|
1097
|
+
|
1098
|
+
create_table "series_statement_merge_lists", id: :serial, force: :cascade do |t|
|
1099
|
+
t.string "title"
|
1100
|
+
t.datetime "created_at", null: false
|
1101
|
+
t.datetime "updated_at", null: false
|
1102
|
+
end
|
1103
|
+
|
1104
|
+
create_table "series_statement_merges", id: :serial, force: :cascade do |t|
|
1105
|
+
t.integer "series_statement_id", null: false
|
1106
|
+
t.integer "series_statement_merge_list_id", null: false
|
1107
|
+
t.datetime "created_at", null: false
|
1108
|
+
t.datetime "updated_at", null: false
|
1109
|
+
t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
|
1110
|
+
t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
create_table "series_statements", id: :serial, force: :cascade do |t|
|
1114
|
+
t.text "original_title"
|
1115
|
+
t.text "numbering"
|
1116
|
+
t.text "title_subseries"
|
1117
|
+
t.text "numbering_subseries"
|
1118
|
+
t.integer "position"
|
1119
|
+
t.datetime "created_at", null: false
|
1120
|
+
t.datetime "updated_at", null: false
|
1121
|
+
t.text "title_transcription"
|
1122
|
+
t.text "title_alternative"
|
1123
|
+
t.string "series_statement_identifier"
|
1124
|
+
t.integer "manifestation_id"
|
1125
|
+
t.text "note"
|
1126
|
+
t.text "title_subseries_transcription"
|
1127
|
+
t.text "creator_string"
|
1128
|
+
t.text "volume_number_string"
|
1129
|
+
t.text "volume_number_transcription_string"
|
1130
|
+
t.boolean "series_master"
|
1131
|
+
t.integer "root_manifestation_id"
|
1132
|
+
t.index ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
|
1133
|
+
t.index ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
|
1134
|
+
t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
|
1135
|
+
end
|
1136
|
+
|
1137
|
+
create_table "shelves", id: :serial, force: :cascade do |t|
|
1138
|
+
t.string "name", null: false
|
1139
|
+
t.jsonb "display_name_translations"
|
1140
|
+
t.text "note"
|
1141
|
+
t.uuid "library_id", null: false
|
1142
|
+
t.integer "items_count", default: 0, null: false
|
1143
|
+
t.integer "position"
|
1144
|
+
t.datetime "created_at", null: false
|
1145
|
+
t.datetime "updated_at", null: false
|
1212
1146
|
t.datetime "deleted_at"
|
1213
|
-
t.boolean
|
1214
|
-
t.index ["library_id"], name: "index_shelves_on_library_id"
|
1215
|
-
end
|
1216
|
-
|
1217
|
-
create_table "subscribes", force: :cascade do |t|
|
1218
|
-
t.integer
|
1219
|
-
t.uuid
|
1220
|
-
t.datetime "start_at",
|
1221
|
-
t.datetime "end_at",
|
1222
|
-
t.datetime "created_at",
|
1223
|
-
t.datetime "updated_at",
|
1224
|
-
t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
1225
|
-
t.index ["work_id"], name: "index_subscribes_on_work_id"
|
1226
|
-
end
|
1227
|
-
|
1228
|
-
create_table "subscriptions", force: :cascade do |t|
|
1229
|
-
t.text
|
1230
|
-
t.text
|
1231
|
-
t.integer
|
1232
|
-
t.integer
|
1147
|
+
t.boolean "closed", default: false, null: false
|
1148
|
+
t.index ["library_id"], name: "index_shelves_on_library_id"
|
1149
|
+
end
|
1150
|
+
|
1151
|
+
create_table "subscribes", id: :serial, force: :cascade do |t|
|
1152
|
+
t.integer "subscription_id"
|
1153
|
+
t.uuid "work_id", null: false
|
1154
|
+
t.datetime "start_at", null: false
|
1155
|
+
t.datetime "end_at", null: false
|
1156
|
+
t.datetime "created_at", null: false
|
1157
|
+
t.datetime "updated_at", null: false
|
1158
|
+
t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
|
1159
|
+
t.index ["work_id"], name: "index_subscribes_on_work_id"
|
1160
|
+
end
|
1161
|
+
|
1162
|
+
create_table "subscriptions", id: :serial, force: :cascade do |t|
|
1163
|
+
t.text "title", null: false
|
1164
|
+
t.text "note"
|
1165
|
+
t.integer "user_id"
|
1166
|
+
t.integer "order_list_id"
|
1233
1167
|
t.datetime "deleted_at"
|
1234
|
-
t.integer
|
1235
|
-
t.datetime "created_at",
|
1236
|
-
t.datetime "updated_at",
|
1237
|
-
t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
1238
|
-
t.index ["user_id"], name: "index_subscriptions_on_user_id"
|
1239
|
-
end
|
1240
|
-
|
1241
|
-
create_table "use_restrictions", force: :cascade do |t|
|
1242
|
-
t.string
|
1243
|
-
t.text
|
1244
|
-
t.text
|
1245
|
-
t.integer
|
1246
|
-
t.datetime "created_at"
|
1247
|
-
t.datetime "updated_at"
|
1248
|
-
end
|
1249
|
-
|
1250
|
-
create_table "user_checkout_stat_transitions", force: :cascade do |t|
|
1251
|
-
t.string
|
1252
|
-
t.text
|
1253
|
-
t.integer
|
1254
|
-
t.integer
|
1255
|
-
t.datetime "created_at"
|
1256
|
-
t.datetime "updated_at"
|
1257
|
-
t.boolean
|
1258
|
-
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1259
|
-
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1260
|
-
end
|
1261
|
-
|
1262
|
-
create_table "user_checkout_stats", force: :cascade do |t|
|
1168
|
+
t.integer "subscribes_count", default: 0, null: false
|
1169
|
+
t.datetime "created_at", null: false
|
1170
|
+
t.datetime "updated_at", null: false
|
1171
|
+
t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
|
1172
|
+
t.index ["user_id"], name: "index_subscriptions_on_user_id"
|
1173
|
+
end
|
1174
|
+
|
1175
|
+
create_table "use_restrictions", id: :serial, force: :cascade do |t|
|
1176
|
+
t.string "name", null: false
|
1177
|
+
t.text "display_name"
|
1178
|
+
t.text "note"
|
1179
|
+
t.integer "position"
|
1180
|
+
t.datetime "created_at", null: false
|
1181
|
+
t.datetime "updated_at", null: false
|
1182
|
+
end
|
1183
|
+
|
1184
|
+
create_table "user_checkout_stat_transitions", id: :serial, force: :cascade do |t|
|
1185
|
+
t.string "to_state"
|
1186
|
+
t.text "metadata", default: "{}"
|
1187
|
+
t.integer "sort_key"
|
1188
|
+
t.integer "user_checkout_stat_id"
|
1189
|
+
t.datetime "created_at", null: false
|
1190
|
+
t.datetime "updated_at", null: false
|
1191
|
+
t.boolean "most_recent"
|
1192
|
+
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1193
|
+
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1194
|
+
end
|
1195
|
+
|
1196
|
+
create_table "user_checkout_stats", id: :serial, force: :cascade do |t|
|
1263
1197
|
t.datetime "start_date"
|
1264
1198
|
t.datetime "end_date"
|
1265
|
-
t.text
|
1266
|
-
t.datetime "created_at"
|
1267
|
-
t.datetime "updated_at"
|
1199
|
+
t.text "note"
|
1200
|
+
t.datetime "created_at", null: false
|
1201
|
+
t.datetime "updated_at", null: false
|
1268
1202
|
t.datetime "started_at"
|
1269
1203
|
t.datetime "completed_at"
|
1270
|
-
t.integer
|
1271
|
-
t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
|
1204
|
+
t.integer "user_id"
|
1205
|
+
t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
|
1272
1206
|
end
|
1273
1207
|
|
1274
|
-
create_table "user_export_file_transitions", force: :cascade do |t|
|
1275
|
-
t.string
|
1276
|
-
t.text
|
1277
|
-
t.integer
|
1278
|
-
t.integer
|
1279
|
-
t.datetime "created_at"
|
1280
|
-
t.datetime "updated_at"
|
1281
|
-
t.boolean
|
1282
|
-
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1283
|
-
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1208
|
+
create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
|
1209
|
+
t.string "to_state"
|
1210
|
+
t.text "metadata", default: "{}"
|
1211
|
+
t.integer "sort_key"
|
1212
|
+
t.integer "user_export_file_id"
|
1213
|
+
t.datetime "created_at", null: false
|
1214
|
+
t.datetime "updated_at", null: false
|
1215
|
+
t.boolean "most_recent"
|
1216
|
+
t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
|
1217
|
+
t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
|
1284
1218
|
end
|
1285
1219
|
|
1286
|
-
create_table "user_export_files", force: :cascade do |t|
|
1287
|
-
t.integer
|
1220
|
+
create_table "user_export_files", id: :serial, force: :cascade do |t|
|
1221
|
+
t.integer "user_id"
|
1288
1222
|
t.datetime "executed_at"
|
1289
|
-
t.datetime "created_at"
|
1290
|
-
t.datetime "updated_at"
|
1291
|
-
t.jsonb
|
1292
|
-
end
|
1293
|
-
|
1294
|
-
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
1295
|
-
t.integer
|
1296
|
-
t.integer
|
1297
|
-
t.integer
|
1298
|
-
t.integer
|
1299
|
-
t.integer
|
1300
|
-
t.integer
|
1301
|
-
t.integer
|
1302
|
-
t.boolean
|
1223
|
+
t.datetime "created_at", null: false
|
1224
|
+
t.datetime "updated_at", null: false
|
1225
|
+
t.jsonb "attachment_data"
|
1226
|
+
end
|
1227
|
+
|
1228
|
+
create_table "user_group_has_checkout_types", id: :serial, force: :cascade do |t|
|
1229
|
+
t.integer "user_group_id", null: false
|
1230
|
+
t.integer "checkout_type_id", null: false
|
1231
|
+
t.integer "checkout_limit", default: 0, null: false
|
1232
|
+
t.integer "checkout_period", default: 0, null: false
|
1233
|
+
t.integer "checkout_renewal_limit", default: 0, null: false
|
1234
|
+
t.integer "reservation_limit", default: 0, null: false
|
1235
|
+
t.integer "reservation_expired_period", default: 7, null: false
|
1236
|
+
t.boolean "set_due_date_before_closing_day", default: false, null: false
|
1303
1237
|
t.datetime "fixed_due_date"
|
1304
|
-
t.text
|
1305
|
-
t.integer
|
1306
|
-
t.datetime "created_at"
|
1307
|
-
t.datetime "updated_at"
|
1308
|
-
t.integer
|
1309
|
-
t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
|
1310
|
-
t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
|
1238
|
+
t.text "note"
|
1239
|
+
t.integer "position"
|
1240
|
+
t.datetime "created_at", null: false
|
1241
|
+
t.datetime "updated_at", null: false
|
1242
|
+
t.integer "current_checkout_count"
|
1243
|
+
t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
|
1244
|
+
t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
|
1311
1245
|
end
|
1312
1246
|
|
1313
1247
|
create_table "user_groups", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
|
1314
|
-
t.string
|
1315
|
-
t.jsonb
|
1316
|
-
t.text
|
1317
|
-
t.integer
|
1318
|
-
t.datetime "created_at",
|
1319
|
-
t.datetime "updated_at",
|
1248
|
+
t.string "name"
|
1249
|
+
t.jsonb "display_name_translations"
|
1250
|
+
t.text "note"
|
1251
|
+
t.integer "position"
|
1252
|
+
t.datetime "created_at", null: false
|
1253
|
+
t.datetime "updated_at", null: false
|
1320
1254
|
t.datetime "deleted_at"
|
1321
|
-
t.integer
|
1255
|
+
t.integer "valid_period_for_new_user", default: 0, null: false
|
1322
1256
|
t.datetime "expired_at"
|
1323
|
-
t.integer
|
1324
|
-
t.integer
|
1325
|
-
t.integer
|
1257
|
+
t.integer "number_of_day_to_notify_overdue", default: 1, null: false
|
1258
|
+
t.integer "number_of_day_to_notify_due_date", default: 7, null: false
|
1259
|
+
t.integer "number_of_time_to_notify_overdue", default: 3, null: false
|
1326
1260
|
end
|
1327
1261
|
|
1328
|
-
create_table "user_has_roles", force: :cascade do |t|
|
1329
|
-
t.integer
|
1330
|
-
t.integer
|
1262
|
+
create_table "user_has_roles", id: :serial, force: :cascade do |t|
|
1263
|
+
t.integer "user_id", null: false
|
1264
|
+
t.integer "role_id", null: false
|
1331
1265
|
t.datetime "created_at", null: false
|
1332
1266
|
t.datetime "updated_at", null: false
|
1333
|
-
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
1334
|
-
t.index ["user_id"], name: "index_user_has_roles_on_user_id"
|
1267
|
+
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
1268
|
+
t.index ["user_id"], name: "index_user_has_roles_on_user_id"
|
1335
1269
|
end
|
1336
1270
|
|
1337
|
-
create_table "user_import_file_transitions", force: :cascade do |t|
|
1338
|
-
t.string
|
1339
|
-
t.text
|
1340
|
-
t.integer
|
1341
|
-
t.integer
|
1342
|
-
t.datetime "created_at"
|
1343
|
-
t.datetime "updated_at"
|
1344
|
-
t.boolean
|
1345
|
-
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1346
|
-
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1271
|
+
create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
|
1272
|
+
t.string "to_state"
|
1273
|
+
t.text "metadata", default: "{}"
|
1274
|
+
t.integer "sort_key"
|
1275
|
+
t.integer "user_import_file_id"
|
1276
|
+
t.datetime "created_at", null: false
|
1277
|
+
t.datetime "updated_at", null: false
|
1278
|
+
t.boolean "most_recent"
|
1279
|
+
t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
|
1280
|
+
t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
|
1347
1281
|
end
|
1348
1282
|
|
1349
|
-
create_table "user_import_files", force: :cascade do |t|
|
1350
|
-
t.integer
|
1351
|
-
t.text
|
1283
|
+
create_table "user_import_files", id: :serial, force: :cascade do |t|
|
1284
|
+
t.integer "user_id"
|
1285
|
+
t.text "note"
|
1352
1286
|
t.datetime "executed_at"
|
1353
|
-
t.string
|
1354
|
-
t.string
|
1355
|
-
t.string
|
1287
|
+
t.string "user_import_file_name"
|
1288
|
+
t.string "user_import_content_type"
|
1289
|
+
t.string "user_import_file_size"
|
1356
1290
|
t.datetime "user_import_updated_at"
|
1357
|
-
t.string
|
1358
|
-
t.string
|
1359
|
-
t.text
|
1360
|
-
t.datetime "created_at"
|
1361
|
-
t.datetime "updated_at"
|
1362
|
-
t.string
|
1363
|
-
t.integer
|
1364
|
-
t.integer
|
1365
|
-
t.jsonb
|
1366
|
-
end
|
1367
|
-
|
1368
|
-
create_table "user_import_results", force: :cascade do |t|
|
1369
|
-
t.integer
|
1370
|
-
t.integer
|
1371
|
-
t.text
|
1372
|
-
t.datetime "created_at"
|
1373
|
-
t.datetime "updated_at"
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
t.
|
1379
|
-
t.
|
1380
|
-
t.integer
|
1381
|
-
t.
|
1382
|
-
t.datetime "
|
1383
|
-
t.
|
1384
|
-
t.
|
1385
|
-
t.index ["
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
create_table "user_reserve_stats", force: :cascade do |t|
|
1291
|
+
t.string "user_import_fingerprint"
|
1292
|
+
t.string "edit_mode"
|
1293
|
+
t.text "error_message"
|
1294
|
+
t.datetime "created_at", null: false
|
1295
|
+
t.datetime "updated_at", null: false
|
1296
|
+
t.string "user_encoding"
|
1297
|
+
t.integer "default_library_id"
|
1298
|
+
t.integer "default_user_group_id"
|
1299
|
+
t.jsonb "attachment_data"
|
1300
|
+
end
|
1301
|
+
|
1302
|
+
create_table "user_import_results", id: :serial, force: :cascade do |t|
|
1303
|
+
t.integer "user_import_file_id"
|
1304
|
+
t.integer "user_id"
|
1305
|
+
t.text "body"
|
1306
|
+
t.datetime "created_at", null: false
|
1307
|
+
t.datetime "updated_at", null: false
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
create_table "user_reserve_stat_transitions", id: :serial, force: :cascade do |t|
|
1311
|
+
t.string "to_state"
|
1312
|
+
t.text "metadata", default: "{}"
|
1313
|
+
t.integer "sort_key"
|
1314
|
+
t.integer "user_reserve_stat_id"
|
1315
|
+
t.datetime "created_at", null: false
|
1316
|
+
t.datetime "updated_at", null: false
|
1317
|
+
t.boolean "most_recent"
|
1318
|
+
t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1319
|
+
t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1320
|
+
end
|
1321
|
+
|
1322
|
+
create_table "user_reserve_stats", id: :serial, force: :cascade do |t|
|
1390
1323
|
t.datetime "start_date"
|
1391
1324
|
t.datetime "end_date"
|
1392
|
-
t.text
|
1393
|
-
t.datetime "created_at"
|
1394
|
-
t.datetime "updated_at"
|
1325
|
+
t.text "note"
|
1326
|
+
t.datetime "created_at", null: false
|
1327
|
+
t.datetime "updated_at", null: false
|
1395
1328
|
t.datetime "started_at"
|
1396
1329
|
t.datetime "completed_at"
|
1397
|
-
t.integer
|
1398
|
-
t.index ["user_id"], name: "index_user_reserve_stats_on_user_id"
|
1330
|
+
t.integer "user_id"
|
1331
|
+
t.index ["user_id"], name: "index_user_reserve_stats_on_user_id"
|
1399
1332
|
end
|
1400
1333
|
|
1401
|
-
create_table "users", force: :cascade do |t|
|
1402
|
-
t.string
|
1403
|
-
t.string
|
1404
|
-
t.string
|
1334
|
+
create_table "users", id: :serial, force: :cascade do |t|
|
1335
|
+
t.string "email", default: "", null: false
|
1336
|
+
t.string "encrypted_password", default: "", null: false
|
1337
|
+
t.string "reset_password_token"
|
1405
1338
|
t.datetime "reset_password_sent_at"
|
1406
1339
|
t.datetime "remember_created_at"
|
1407
|
-
t.integer
|
1340
|
+
t.integer "sign_in_count", default: 0
|
1408
1341
|
t.datetime "current_sign_in_at"
|
1409
1342
|
t.datetime "last_sign_in_at"
|
1410
|
-
t.string
|
1411
|
-
t.string
|
1412
|
-
t.datetime "created_at"
|
1413
|
-
t.datetime "updated_at"
|
1414
|
-
t.string
|
1343
|
+
t.string "current_sign_in_ip"
|
1344
|
+
t.string "last_sign_in_ip"
|
1345
|
+
t.datetime "created_at", null: false
|
1346
|
+
t.datetime "updated_at", null: false
|
1347
|
+
t.string "username"
|
1415
1348
|
t.datetime "deleted_at"
|
1416
1349
|
t.datetime "expired_at"
|
1417
|
-
t.integer
|
1418
|
-
t.string
|
1350
|
+
t.integer "failed_attempts", default: 0
|
1351
|
+
t.string "unlock_token"
|
1419
1352
|
t.datetime "locked_at"
|
1420
1353
|
t.datetime "confirmed_at"
|
1421
|
-
t.uuid
|
1422
|
-
t.index ["email"], name: "index_users_on_email", unique: true
|
1423
|
-
t.index ["profile_id"], name: "index_users_on_profile_id"
|
1424
|
-
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1425
|
-
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1426
|
-
t.index ["username"], name: "index_users_on_username", unique: true
|
1427
|
-
end
|
1428
|
-
|
1429
|
-
create_table "withdraws", force: :cascade do |t|
|
1430
|
-
t.integer
|
1431
|
-
t.uuid
|
1432
|
-
t.integer
|
1433
|
-
t.datetime "created_at",
|
1434
|
-
t.datetime "updated_at",
|
1435
|
-
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
1436
|
-
t.index ["item_id"], name: "index_withdraws_on_item_id"
|
1354
|
+
t.uuid "profile_id"
|
1355
|
+
t.index ["email"], name: "index_users_on_email", unique: true
|
1356
|
+
t.index ["profile_id"], name: "index_users_on_profile_id"
|
1357
|
+
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1358
|
+
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|
1359
|
+
t.index ["username"], name: "index_users_on_username", unique: true
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
create_table "withdraws", id: :serial, force: :cascade do |t|
|
1363
|
+
t.integer "basket_id"
|
1364
|
+
t.uuid "item_id"
|
1365
|
+
t.integer "librarian_id"
|
1366
|
+
t.datetime "created_at", null: false
|
1367
|
+
t.datetime "updated_at", null: false
|
1368
|
+
t.index ["basket_id"], name: "index_withdraws_on_basket_id"
|
1369
|
+
t.index ["item_id"], name: "index_withdraws_on_item_id"
|
1437
1370
|
end
|
1438
1371
|
|
1439
1372
|
add_foreign_key "accepts", "baskets", on_delete: :nullify
|