enju_search_log 0.2.0 → 0.3.0.beta.1

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