enju_subject 0.4.0.beta.1 → 0.4.0.rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/classifications_controller.rb +0 -1
  3. data/app/controllers/subjects_controller.rb +1 -2
  4. data/app/models/classification.rb +3 -3
  5. data/app/models/classification_type.rb +3 -3
  6. data/app/models/subject.rb +4 -5
  7. data/app/models/subject_heading_type.rb +3 -3
  8. data/app/models/subject_type.rb +3 -3
  9. data/app/views/manifestations/_subject_facet.html.erb +1 -1
  10. data/db/migrate/029_create_subjects.rb +2 -7
  11. data/db/migrate/142_create_classifications.rb +1 -1
  12. data/db/migrate/144_create_classification_types.rb +1 -1
  13. data/db/migrate/145_create_subject_heading_types.rb +1 -1
  14. data/db/migrate/146_create_subject_types.rb +1 -1
  15. data/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +1 -1
  16. data/db/migrate/20120406020752_add_url_to_subject.rb +1 -1
  17. data/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +1 -1
  18. data/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +1 -1
  19. data/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +1 -1
  20. data/db/migrate/20150923173139_add_url_to_classification.rb +1 -1
  21. data/db/migrate/20150925092505_add_label_to_classification.rb +1 -1
  22. data/lib/enju_subject/version.rb +1 -1
  23. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  24. data/spec/dummy/config/environments/development.rb +31 -11
  25. data/spec/dummy/config/environments/production.rb +31 -16
  26. data/spec/dummy/config/environments/test.rb +10 -7
  27. data/spec/dummy/db/migrate/001_create_agents.rb +1 -2
  28. data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -2
  29. data/spec/dummy/db/migrate/006_create_items.rb +1 -2
  30. data/spec/dummy/db/migrate/012_create_owns.rb +1 -3
  31. data/spec/dummy/db/migrate/015_create_creates.rb +1 -3
  32. data/spec/dummy/db/migrate/041_create_roles.rb +1 -1
  33. data/spec/dummy/db/migrate/047_create_produces.rb +1 -3
  34. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -2
  35. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  36. data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
  37. data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -2
  38. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  39. data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
  40. data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
  41. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  42. data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -2
  43. data/spec/dummy/db/migrate/125_create_donates.rb +1 -1
  44. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
  45. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
  46. data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
  47. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
  48. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +1 -3
  49. data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
  50. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -2
  51. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  52. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
  53. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +1 -1
  54. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -1
  55. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
  56. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
  57. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
  58. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +1 -1
  59. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +1 -1
  60. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +1 -1
  61. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -1
  62. data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +1 -1
  63. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
  64. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
  65. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
  66. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +1 -1
  67. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  68. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +1 -1
  69. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  70. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +1 -1
  71. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +1 -1
  72. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +1 -1
  73. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
  74. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +1 -1
  75. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
  76. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
  77. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
  78. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
  79. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
  80. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
  81. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
  82. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
  83. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +1 -1
  84. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +1 -1
  85. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +1 -1
  86. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +1 -1
  87. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +1 -1
  88. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +1 -1
  89. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +1 -1
  90. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +1 -1
  91. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +1 -1
  92. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +1 -1
  93. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +1 -1
  94. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +1 -1
  95. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  96. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -1
  97. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  98. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -1
  99. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +1 -1
  100. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  101. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +1 -1
  102. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +1 -1
  103. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +1 -1
  104. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +1 -1
  105. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +1 -1
  106. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +1 -1
  107. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +1 -1
  108. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +1 -1
  109. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +1 -1
  110. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
  111. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
  112. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
  113. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
  114. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -2
  115. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  116. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +1 -1
  117. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +1 -1
  118. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +1 -1
  119. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +1 -1
  120. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +1 -1
  121. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +1 -1
  122. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +1 -1
  123. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  124. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  125. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +1 -1
  126. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
  127. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
  128. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
  129. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +2 -6
  130. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +1 -1
  131. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -1
  132. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
  133. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  134. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +1 -1
  135. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +1 -1
  136. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  137. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -6
  138. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +1 -1
  139. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  140. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  141. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +1 -1
  142. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +1 -1
  143. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
  144. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +1 -1
  145. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  146. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +1 -1
  147. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +1 -1
  148. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +1 -1
  149. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +1 -1
  150. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
  151. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
  152. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +1 -1
  153. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  154. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  155. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  156. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
  157. data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +11 -0
  158. data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
  159. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  160. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  161. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  162. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +1 -1
  163. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +1 -1
  164. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +1 -1
  165. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +1 -1
  166. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +1 -1
  167. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  168. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  169. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  170. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  171. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +1 -1
  172. data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
  173. data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
  174. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  175. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  176. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +1 -1
  177. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  178. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  179. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  180. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  181. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  182. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
  183. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
  184. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
  185. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
  186. data/spec/dummy/db/migrate/20190102034126_create_doi_records.rb +13 -0
  187. data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +10 -0
  188. data/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
  189. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
  190. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
  191. data/spec/dummy/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
  192. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
  193. data/spec/dummy/db/schema.rb +204 -121
  194. data/spec/dummy/db/test.sqlite3 +0 -0
  195. data/spec/dummy/public/404.html +55 -14
  196. data/spec/dummy/public/422.html +55 -14
  197. data/spec/dummy/public/500.html +54 -14
  198. data/spec/fixtures/classification_types.yml +3 -3
  199. data/spec/fixtures/classifications.yml +3 -3
  200. data/spec/fixtures/subject_heading_types.yml +3 -3
  201. data/spec/fixtures/subject_types.yml +3 -3
  202. data/spec/fixtures/subjects.yml +4 -5
  203. data/spec/models/classification_spec.rb +3 -3
  204. data/spec/models/classification_type_spec.rb +3 -3
  205. data/spec/models/subject_heading_type_spec.rb +3 -3
  206. data/spec/models/subject_spec.rb +4 -5
  207. data/spec/models/subject_type_spec.rb +3 -3
  208. metadata +42 -6
@@ -1,4 +1,4 @@
1
- class AddExpiredAtToProfile < ActiveRecord::Migration[4.2]
1
+ class AddExpiredAtToProfile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :profiles, :expired_at, :datetime
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddPublicationPlaceToManifestation < ActiveRecord::Migration[4.2]
1
+ class AddPublicationPlaceToManifestation < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :manifestations, :publication_place, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateColors < ActiveRecord::Migration[4.2]
1
+ class CreateColors < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :colors do |t|
4
4
  t.references :library_group, index: true
@@ -1,4 +1,4 @@
1
- class AddErrorMessageToResourceImportResult < ActiveRecord::Migration[4.2]
1
+ class AddErrorMessageToResourceImportResult < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :resource_import_results, :error_message, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddExtentToManifestation < ActiveRecord::Migration[4.2]
1
+ class AddExtentToManifestation < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :manifestations, :extent, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDimensionsToManifestation < ActiveRecord::Migration[4.2]
1
+ class AddDimensionsToManifestation < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :manifestations, :dimensions, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration[4.2]
1
+ class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  rename_column :manifestations, :periodical, :serial
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddFullNameTranscriptionToProfile < ActiveRecord::Migration[4.2]
1
+ class AddFullNameTranscriptionToProfile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :profiles, :full_name_transcription, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDateOfBirthToProfile < ActiveRecord::Migration[4.2]
1
+ class AddDateOfBirthToProfile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :profiles, :date_of_birth, :datetime
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[4.2]
1
+ class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_foreign_key :items, :manifestations
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddSettingsToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddSettingsToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :settings, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddErrorMessageToUserImportResult < ActiveRecord::Migration[4.2]
1
+ class AddErrorMessageToUserImportResult < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :user_import_results, :error_message, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateWithdraws < ActiveRecord::Migration[4.2]
1
+ class CreateWithdraws < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :withdraws do |t|
4
4
  t.references :basket, index: true
@@ -1,4 +1,4 @@
1
- class AddProfileIdToAgent < ActiveRecord::Migration[4.2]
1
+ class AddProfileIdToAgent < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :agents, :profile_id, :integer
4
4
  add_index :agents, :profile_id
@@ -0,0 +1,11 @@
1
+ class CreateIssnRecords < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :issn_records do |t|
4
+ t.string :body, index: {unique: true}, null: false
5
+ t.string :issn_type
6
+ t.string :source
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateIsbnRecords < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :isbn_records do |t|
4
+ t.string :body, index: {unique: true}, null: false
5
+ t.string :isbn_type
6
+ t.string :source
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -1,4 +1,4 @@
1
- class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[5.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[4.2]
1
+ class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration[5.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[4.2]
1
+ class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration[5.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 AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :import_request_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :resource_import_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :resource_export_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :agent_import_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddPictureWidthToPictureFile < ActiveRecord::Migration[4.2]
1
+ class AddPictureWidthToPictureFile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :picture_files, :picture_width, :integer
4
4
  add_column :picture_files, :picture_height, :integer
@@ -1,4 +1,4 @@
1
- class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[5.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[4.2]
1
+ class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration[5.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[4.2]
1
+ class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration[5.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[4.2]
1
+ class AddUserIdToLibraryGroup < ActiveRecord::Migration[5.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 AddAttachmentAttachmentToCarrierTypes < ActiveRecord::Migration[4.2]
1
+ class AddAttachmentAttachmentToCarrierTypes < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  change_table :carrier_types do |t|
4
4
  t.attachment :attachment
@@ -0,0 +1,11 @@
1
+ class CreateIssnRecordAndManifestations < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :issn_record_and_manifestations do |t|
4
+ t.references :issn_record, foreign_key: true, on_delete: :cascade, null: false
5
+ t.references :manifestation, foreign_key: true, on_delete: :cascade, null: false
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class CreateIsbnRecordAndManifestations < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :isbn_record_and_manifestations do |t|
4
+ t.references :isbn_record, foreign_key: true, on_delete: :cascade, null: false
5
+ t.references :manifestation, foreign_key: true, null: false, on_delete: :cascade
6
+ t.integer :position
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -1,4 +1,4 @@
1
- class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :csv_charset_conversion, :boolean, null: false, default: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_attachment :library_groups, :header_logo
4
4
  end
@@ -1,4 +1,4 @@
1
- class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[4.2]
1
+ class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  change_column_null :items, :manifestation_id, false
4
4
  end
@@ -1,4 +1,4 @@
1
- class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[4.2]
1
+ class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  rename_column :library_groups, :login_banner, :old_login_banner
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[4.2]
1
+ class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_foreign_key :libraries, :library_groups, null: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :header_logo_meta, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -0,0 +1,13 @@
1
+ class CreateDoiRecords < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :doi_records do |t|
4
+ t.string :body, index: {unique: true}, null: false
5
+ t.string :display_body, null: false
6
+ t.string :source
7
+ t.jsonb :response, default: {}, null: false
8
+ t.references :manifestation, foreign_key: true, null: false
9
+
10
+ t.timestamps
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,10 @@
1
+ class CreatePeriodicals < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :periodicals do |t|
4
+ t.text :original_title, null: false
5
+ t.references :frequency, foreign_key: true, null: false
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreatePeriodicalAndManifestations < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :periodical_and_manifestations do |t|
4
+ t.references :periodical, foreign_key: true, null: false
5
+ t.references :manifestation, foreign_key: true, null: false
6
+ t.boolean :periodical_master, default: false, null: false, index: {where: 'periodical_master IS true', unique: true}
7
+
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ class AddMemoToManifestation < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :manifestations, :memo, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddMemoToItem < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :items, :memo, :text
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddEmailToLibraryGroup < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :library_groups, :email, :string
4
+ add_index :library_groups, :email
5
+ end
6
+ end
@@ -0,0 +1,12 @@
1
+ class CreateCustomProperties < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :custom_properties do |t|
4
+ t.integer :resource_id, null: false
5
+ t.string :resource_type, null: false
6
+ t.text :label, null: false
7
+ t.text :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -10,18 +10,18 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2019_07_13_115451) do
13
+ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "pgcrypto"
17
17
  enable_extension "plpgsql"
18
18
 
19
- create_table "accepts", id: :serial, force: :cascade do |t|
20
- t.integer "basket_id"
21
- t.integer "item_id"
22
- t.integer "librarian_id"
23
- t.datetime "created_at"
24
- t.datetime "updated_at"
19
+ create_table "accepts", force: :cascade do |t|
20
+ t.bigint "basket_id"
21
+ t.bigint "item_id"
22
+ t.bigint "librarian_id"
23
+ t.datetime "created_at", null: false
24
+ t.datetime "updated_at", null: false
25
25
  t.index ["basket_id"], name: "index_accepts_on_basket_id"
26
26
  t.index ["item_id"], name: "index_accepts_on_item_id"
27
27
  t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
@@ -129,7 +129,6 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
129
129
  t.text "full_name_alternative"
130
130
  t.datetime "created_at"
131
131
  t.datetime "updated_at"
132
- t.datetime "deleted_at"
133
132
  t.string "zip_code_1"
134
133
  t.string "zip_code_2"
135
134
  t.text "address_1"
@@ -170,16 +169,16 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
170
169
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
171
170
  end
172
171
 
173
- create_table "baskets", id: :serial, force: :cascade do |t|
174
- t.integer "user_id"
172
+ create_table "baskets", force: :cascade do |t|
173
+ t.bigint "user_id"
175
174
  t.text "note"
176
175
  t.integer "lock_version", default: 0, null: false
177
- t.datetime "created_at"
178
- t.datetime "updated_at"
176
+ t.datetime "created_at", null: false
177
+ t.datetime "updated_at", null: false
179
178
  t.index ["user_id"], name: "index_baskets_on_user_id"
180
179
  end
181
180
 
182
- create_table "bookstores", id: :serial, force: :cascade do |t|
181
+ create_table "bookstores", force: :cascade do |t|
183
182
  t.text "name", null: false
184
183
  t.string "zip_code"
185
184
  t.text "address"
@@ -188,18 +187,17 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
188
187
  t.string "fax_number"
189
188
  t.string "url"
190
189
  t.integer "position"
191
- t.datetime "deleted_at"
192
- t.datetime "created_at"
193
- t.datetime "updated_at"
190
+ t.datetime "created_at", null: false
191
+ t.datetime "updated_at", null: false
194
192
  end
195
193
 
196
- create_table "budget_types", id: :serial, force: :cascade do |t|
194
+ create_table "budget_types", force: :cascade do |t|
197
195
  t.string "name"
198
196
  t.text "display_name"
199
197
  t.text "note"
200
198
  t.integer "position"
201
- t.datetime "created_at"
202
- t.datetime "updated_at"
199
+ t.datetime "created_at", null: false
200
+ t.datetime "updated_at", null: false
203
201
  t.jsonb "display_name_translations", default: {}, null: false
204
202
  end
205
203
 
@@ -217,22 +215,22 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
217
215
  t.jsonb "display_name_translations", default: {}, null: false
218
216
  end
219
217
 
220
- create_table "classification_types", id: :serial, force: :cascade do |t|
218
+ create_table "classification_types", force: :cascade do |t|
221
219
  t.string "name", null: false
222
220
  t.text "display_name"
223
221
  t.text "note"
224
222
  t.integer "position"
225
- t.datetime "created_at"
226
- t.datetime "updated_at"
223
+ t.datetime "created_at", null: false
224
+ t.datetime "updated_at", null: false
227
225
  end
228
226
 
229
- create_table "classifications", id: :serial, force: :cascade do |t|
227
+ create_table "classifications", force: :cascade do |t|
230
228
  t.integer "parent_id"
231
229
  t.string "category", null: false
232
230
  t.text "note"
233
231
  t.integer "classification_type_id", null: false
234
- t.datetime "created_at"
235
- t.datetime "updated_at"
232
+ t.datetime "created_at", null: false
233
+ t.datetime "updated_at", null: false
236
234
  t.integer "lft"
237
235
  t.integer "rgt"
238
236
  t.integer "manifestation_id"
@@ -244,13 +242,13 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
244
242
  t.index ["parent_id"], name: "index_classifications_on_parent_id"
245
243
  end
246
244
 
247
- create_table "colors", id: :serial, force: :cascade do |t|
248
- t.integer "library_group_id"
245
+ create_table "colors", force: :cascade do |t|
246
+ t.bigint "library_group_id"
249
247
  t.string "property"
250
248
  t.string "code"
251
249
  t.integer "position"
252
- t.datetime "created_at"
253
- t.datetime "updated_at"
250
+ t.datetime "created_at", null: false
251
+ t.datetime "updated_at", null: false
254
252
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
255
253
  end
256
254
 
@@ -299,6 +297,27 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
299
297
  t.index ["work_id"], name: "index_creates_on_work_id"
300
298
  end
301
299
 
300
+ create_table "custom_properties", force: :cascade do |t|
301
+ t.integer "resource_id", null: false
302
+ t.string "resource_type", null: false
303
+ t.text "label", null: false
304
+ t.text "value"
305
+ t.datetime "created_at", null: false
306
+ t.datetime "updated_at", null: false
307
+ end
308
+
309
+ create_table "doi_records", force: :cascade do |t|
310
+ t.string "body", null: false
311
+ t.string "display_body", null: false
312
+ t.string "source"
313
+ t.jsonb "response", default: {}, null: false
314
+ t.bigint "manifestation_id", null: false
315
+ t.datetime "created_at", null: false
316
+ t.datetime "updated_at", null: false
317
+ t.index ["body"], name: "index_doi_records_on_body", unique: true
318
+ t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id"
319
+ end
320
+
302
321
  create_table "donates", id: :serial, force: :cascade do |t|
303
322
  t.integer "agent_id", null: false
304
323
  t.integer "item_id", null: false
@@ -405,12 +424,49 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
405
424
  t.index ["user_id"], name: "index_import_requests_on_user_id"
406
425
  end
407
426
 
427
+ create_table "isbn_record_and_manifestations", force: :cascade do |t|
428
+ t.bigint "isbn_record_id", null: false
429
+ t.bigint "manifestation_id", null: false
430
+ t.integer "position"
431
+ t.datetime "created_at", null: false
432
+ t.datetime "updated_at", null: false
433
+ t.index ["isbn_record_id"], name: "index_isbn_record_and_manifestations_on_isbn_record_id"
434
+ t.index ["manifestation_id"], name: "index_isbn_record_and_manifestations_on_manifestation_id"
435
+ end
436
+
437
+ create_table "isbn_records", force: :cascade do |t|
438
+ t.string "body", null: false
439
+ t.string "isbn_type"
440
+ t.string "source"
441
+ t.datetime "created_at", null: false
442
+ t.datetime "updated_at", null: false
443
+ t.index ["body"], name: "index_isbn_records_on_body", unique: true
444
+ end
445
+
446
+ create_table "issn_record_and_manifestations", force: :cascade do |t|
447
+ t.bigint "issn_record_id", null: false
448
+ t.bigint "manifestation_id", null: false
449
+ t.integer "position"
450
+ t.datetime "created_at", null: false
451
+ t.datetime "updated_at", null: false
452
+ t.index ["issn_record_id"], name: "index_issn_record_and_manifestations_on_issn_record_id"
453
+ t.index ["manifestation_id"], name: "index_issn_record_and_manifestations_on_manifestation_id"
454
+ end
455
+
456
+ create_table "issn_records", force: :cascade do |t|
457
+ t.string "body", null: false
458
+ t.string "issn_type"
459
+ t.string "source"
460
+ t.datetime "created_at", null: false
461
+ t.datetime "updated_at", null: false
462
+ t.index ["body"], name: "index_issn_records_on_body", unique: true
463
+ end
464
+
408
465
  create_table "items", id: :serial, force: :cascade do |t|
409
466
  t.string "call_number"
410
467
  t.string "item_identifier"
411
468
  t.datetime "created_at"
412
469
  t.datetime "updated_at"
413
- t.datetime "deleted_at"
414
470
  t.integer "shelf_id", default: 1, null: false
415
471
  t.boolean "include_supplements", default: false, null: false
416
472
  t.text "note"
@@ -426,6 +482,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
426
482
  t.string "binding_call_number"
427
483
  t.datetime "binded_at"
428
484
  t.integer "manifestation_id", null: false
485
+ t.text "memo"
429
486
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
430
487
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
431
488
  t.index ["item_identifier"], name: "index_items_on_item_identifier"
@@ -450,7 +507,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
450
507
  t.index ["name"], name: "index_languages_on_name", unique: true
451
508
  end
452
509
 
453
- create_table "libraries", id: :serial, force: :cascade do |t|
510
+ create_table "libraries", force: :cascade do |t|
454
511
  t.string "name", null: false
455
512
  t.text "display_name"
456
513
  t.string "short_display_name", null: false
@@ -464,23 +521,23 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
464
521
  t.text "note"
465
522
  t.integer "call_number_rows", default: 1, null: false
466
523
  t.string "call_number_delimiter", default: "|", null: false
467
- t.integer "library_group_id", null: false
524
+ t.bigint "library_group_id", null: false
468
525
  t.integer "users_count", default: 0, null: false
469
526
  t.integer "position"
470
- t.integer "country_id"
471
- t.datetime "created_at"
472
- t.datetime "updated_at"
473
- t.datetime "deleted_at"
527
+ t.bigint "country_id"
528
+ t.datetime "created_at", null: false
529
+ t.datetime "updated_at", null: false
474
530
  t.text "opening_hour"
475
531
  t.string "isil"
476
532
  t.float "latitude"
477
533
  t.float "longitude"
478
534
  t.jsonb "display_name_translations", default: {}, null: false
535
+ t.index ["country_id"], name: "index_libraries_on_country_id"
479
536
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
480
537
  t.index ["name"], name: "index_libraries_on_name"
481
538
  end
482
539
 
483
- create_table "library_groups", id: :serial, force: :cascade do |t|
540
+ create_table "library_groups", force: :cascade do |t|
484
541
  t.string "name", null: false
485
542
  t.text "display_name"
486
543
  t.string "short_name", null: false
@@ -489,8 +546,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
489
546
  t.text "note"
490
547
  t.integer "country_id"
491
548
  t.integer "position"
492
- t.datetime "created_at"
493
- t.datetime "updated_at"
549
+ t.datetime "created_at", null: false
550
+ t.datetime "updated_at", null: false
494
551
  t.text "admin_networks"
495
552
  t.string "url", default: "http://localhost:3000/"
496
553
  t.text "settings"
@@ -498,7 +555,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
498
555
  t.integer "max_number_of_results", default: 500
499
556
  t.boolean "family_name_first", default: true
500
557
  t.integer "pub_year_facet_range_interval", default: 10
501
- t.integer "user_id"
558
+ t.bigint "user_id"
502
559
  t.boolean "csv_charset_conversion", default: false, null: false
503
560
  t.string "header_logo_file_name"
504
561
  t.string "header_logo_content_type"
@@ -508,6 +565,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
508
565
  t.jsonb "display_name_translations", default: {}, null: false
509
566
  t.jsonb "login_banner_translations", default: {}, null: false
510
567
  t.jsonb "footer_banner_translations", default: {}, null: false
568
+ t.string "email"
569
+ t.index ["email"], name: "index_library_groups_on_email"
511
570
  t.index ["short_name"], name: "index_library_groups_on_short_name"
512
571
  t.index ["user_id"], name: "index_library_groups_on_user_id"
513
572
  end
@@ -553,7 +612,6 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
553
612
  t.datetime "date_copyrighted"
554
613
  t.datetime "created_at"
555
614
  t.datetime "updated_at"
556
- t.datetime "deleted_at"
557
615
  t.string "access_address"
558
616
  t.integer "language_id", default: 1, null: false
559
617
  t.integer "carrier_type_id", default: 1, null: false
@@ -603,6 +661,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
603
661
  t.text "publication_place"
604
662
  t.text "extent"
605
663
  t.text "dimensions"
664
+ t.text "memo"
606
665
  t.index ["access_address"], name: "index_manifestations_on_access_address"
607
666
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
608
667
  t.index ["doi"], name: "index_manifestations_on_doi"
@@ -695,6 +754,25 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
695
754
  t.index ["item_id"], name: "index_owns_on_item_id"
696
755
  end
697
756
 
757
+ create_table "periodical_and_manifestations", force: :cascade do |t|
758
+ t.bigint "periodical_id", null: false
759
+ t.bigint "manifestation_id", null: false
760
+ t.boolean "periodical_master", default: false, null: false
761
+ t.datetime "created_at", null: false
762
+ t.datetime "updated_at", null: false
763
+ t.index ["manifestation_id"], name: "index_periodical_and_manifestations_on_manifestation_id"
764
+ t.index ["periodical_id"], name: "index_periodical_and_manifestations_on_periodical_id"
765
+ t.index ["periodical_master"], name: "index_periodical_and_manifestations_on_periodical_master", unique: true, where: "(periodical_master IS TRUE)"
766
+ end
767
+
768
+ create_table "periodicals", force: :cascade do |t|
769
+ t.text "original_title", null: false
770
+ t.bigint "frequency_id", null: false
771
+ t.datetime "created_at", null: false
772
+ t.datetime "updated_at", null: false
773
+ t.index ["frequency_id"], name: "index_periodicals_on_frequency_id"
774
+ end
775
+
698
776
  create_table "picture_files", id: :serial, force: :cascade do |t|
699
777
  t.integer "picture_attachable_id"
700
778
  t.string "picture_attachable_type"
@@ -736,18 +814,18 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
736
814
  t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
737
815
  end
738
816
 
739
- create_table "profiles", id: :serial, force: :cascade do |t|
740
- t.integer "user_id"
741
- t.integer "user_group_id"
742
- t.integer "library_id"
817
+ create_table "profiles", force: :cascade do |t|
818
+ t.bigint "user_id"
819
+ t.bigint "user_group_id"
820
+ t.bigint "library_id"
743
821
  t.string "locale"
744
822
  t.string "user_number"
745
823
  t.text "full_name"
746
824
  t.text "note"
747
825
  t.text "keyword_list"
748
- t.integer "required_role_id"
749
- t.datetime "created_at"
750
- t.datetime "updated_at"
826
+ t.bigint "required_role_id"
827
+ t.datetime "created_at", null: false
828
+ t.datetime "updated_at", null: false
751
829
  t.datetime "expired_at"
752
830
  t.text "full_name_transcription"
753
831
  t.datetime "date_of_birth"
@@ -779,23 +857,23 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
779
857
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
780
858
  end
781
859
 
782
- create_table "request_status_types", id: :serial, force: :cascade do |t|
860
+ create_table "request_status_types", force: :cascade do |t|
783
861
  t.string "name", null: false
784
862
  t.text "display_name"
785
863
  t.text "note"
786
864
  t.integer "position"
787
- t.datetime "created_at"
788
- t.datetime "updated_at"
865
+ t.datetime "created_at", null: false
866
+ t.datetime "updated_at", null: false
789
867
  t.jsonb "display_name_translations", default: {}, null: false
790
868
  end
791
869
 
792
- create_table "request_types", id: :serial, force: :cascade do |t|
870
+ create_table "request_types", force: :cascade do |t|
793
871
  t.string "name", null: false
794
872
  t.text "display_name"
795
873
  t.text "note"
796
874
  t.integer "position"
797
- t.datetime "created_at"
798
- t.datetime "updated_at"
875
+ t.datetime "created_at", null: false
876
+ t.datetime "updated_at", null: false
799
877
  t.jsonb "display_name_translations", default: {}, null: false
800
878
  end
801
879
 
@@ -871,7 +949,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
871
949
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
872
950
  end
873
951
 
874
- create_table "roles", id: :serial, force: :cascade do |t|
952
+ create_table "roles", force: :cascade do |t|
875
953
  t.string "name", null: false
876
954
  t.string "display_name"
877
955
  t.text "note"
@@ -882,7 +960,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
882
960
  t.jsonb "display_name_translations", default: {}, null: false
883
961
  end
884
962
 
885
- create_table "search_engines", id: :serial, force: :cascade do |t|
963
+ create_table "search_engines", force: :cascade do |t|
886
964
  t.string "name", null: false
887
965
  t.text "display_name"
888
966
  t.string "url", null: false
@@ -892,8 +970,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
892
970
  t.text "additional_param"
893
971
  t.text "note"
894
972
  t.integer "position"
895
- t.datetime "created_at"
896
- t.datetime "updated_at"
973
+ t.datetime "created_at", null: false
974
+ t.datetime "updated_at", null: false
897
975
  t.jsonb "display_name_translations", default: {}, null: false
898
976
  end
899
977
 
@@ -936,52 +1014,50 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
936
1014
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
937
1015
  end
938
1016
 
939
- create_table "shelves", id: :serial, force: :cascade do |t|
1017
+ create_table "shelves", force: :cascade do |t|
940
1018
  t.string "name", null: false
941
1019
  t.text "display_name"
942
1020
  t.text "note"
943
- t.integer "library_id", null: false
1021
+ t.bigint "library_id", null: false
944
1022
  t.integer "items_count", default: 0, null: false
945
1023
  t.integer "position"
946
- t.datetime "created_at"
947
- t.datetime "updated_at"
948
- t.datetime "deleted_at"
1024
+ t.datetime "created_at", null: false
1025
+ t.datetime "updated_at", null: false
949
1026
  t.boolean "closed", default: false, null: false
950
1027
  t.jsonb "display_name_translations", default: {}, null: false
951
1028
  t.index ["library_id"], name: "index_shelves_on_library_id"
952
1029
  end
953
1030
 
954
- create_table "subject_heading_types", id: :serial, force: :cascade do |t|
1031
+ create_table "subject_heading_types", force: :cascade do |t|
955
1032
  t.string "name", null: false
956
1033
  t.text "display_name"
957
1034
  t.text "note"
958
1035
  t.integer "position"
959
- t.datetime "created_at"
960
- t.datetime "updated_at"
1036
+ t.datetime "created_at", null: false
1037
+ t.datetime "updated_at", null: false
961
1038
  end
962
1039
 
963
- create_table "subject_types", id: :serial, force: :cascade do |t|
1040
+ create_table "subject_types", force: :cascade do |t|
964
1041
  t.string "name", null: false
965
1042
  t.text "display_name"
966
1043
  t.text "note"
967
1044
  t.integer "position"
968
- t.datetime "created_at"
969
- t.datetime "updated_at"
1045
+ t.datetime "created_at", null: false
1046
+ t.datetime "updated_at", null: false
970
1047
  end
971
1048
 
972
- create_table "subjects", id: :serial, force: :cascade do |t|
973
- t.integer "parent_id"
1049
+ create_table "subjects", force: :cascade do |t|
1050
+ t.bigint "parent_id"
974
1051
  t.integer "use_term_id"
975
1052
  t.string "term"
976
1053
  t.text "term_transcription"
977
- t.integer "subject_type_id", null: false
1054
+ t.bigint "subject_type_id", null: false
978
1055
  t.text "scope_note"
979
1056
  t.text "note"
980
- t.integer "required_role_id", default: 1, null: false
1057
+ t.bigint "required_role_id", default: 1, null: false
981
1058
  t.integer "lock_version", default: 0, null: false
982
1059
  t.datetime "created_at"
983
1060
  t.datetime "updated_at"
984
- t.datetime "deleted_at"
985
1061
  t.string "url"
986
1062
  t.integer "manifestation_id"
987
1063
  t.integer "subject_heading_type_id"
@@ -993,37 +1069,36 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
993
1069
  t.index ["use_term_id"], name: "index_subjects_on_use_term_id"
994
1070
  end
995
1071
 
996
- create_table "subscribes", id: :serial, force: :cascade do |t|
997
- t.integer "subscription_id", null: false
1072
+ create_table "subscribes", force: :cascade do |t|
1073
+ t.bigint "subscription_id", null: false
998
1074
  t.integer "work_id", null: false
999
1075
  t.datetime "start_at", null: false
1000
1076
  t.datetime "end_at", null: false
1001
- t.datetime "created_at"
1002
- t.datetime "updated_at"
1077
+ t.datetime "created_at", null: false
1078
+ t.datetime "updated_at", null: false
1003
1079
  t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
1004
1080
  t.index ["work_id"], name: "index_subscribes_on_work_id"
1005
1081
  end
1006
1082
 
1007
- create_table "subscriptions", id: :serial, force: :cascade do |t|
1083
+ create_table "subscriptions", force: :cascade do |t|
1008
1084
  t.text "title", null: false
1009
1085
  t.text "note"
1010
- t.integer "user_id"
1011
- t.integer "order_list_id"
1012
- t.datetime "deleted_at"
1086
+ t.bigint "user_id"
1087
+ t.bigint "order_list_id"
1013
1088
  t.integer "subscribes_count", default: 0, null: false
1014
- t.datetime "created_at"
1015
- t.datetime "updated_at"
1089
+ t.datetime "created_at", null: false
1090
+ t.datetime "updated_at", null: false
1016
1091
  t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
1017
1092
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1018
1093
  end
1019
1094
 
1020
- create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1095
+ create_table "user_export_file_transitions", force: :cascade do |t|
1021
1096
  t.string "to_state"
1022
1097
  t.text "metadata", default: "{}"
1023
1098
  t.integer "sort_key"
1024
- t.integer "user_export_file_id"
1025
- t.datetime "created_at"
1026
- t.datetime "updated_at"
1099
+ t.bigint "user_export_file_id"
1100
+ t.datetime "created_at", null: false
1101
+ t.datetime "updated_at", null: false
1027
1102
  t.boolean "most_recent", null: false
1028
1103
  t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1029
1104
  t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
@@ -1031,55 +1106,54 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1031
1106
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1032
1107
  end
1033
1108
 
1034
- create_table "user_export_files", id: :serial, force: :cascade do |t|
1035
- t.integer "user_id"
1109
+ create_table "user_export_files", force: :cascade do |t|
1110
+ t.bigint "user_id"
1036
1111
  t.string "user_export_file_name"
1037
1112
  t.string "user_export_content_type"
1038
1113
  t.bigint "user_export_file_size"
1039
1114
  t.datetime "user_export_updated_at"
1040
1115
  t.datetime "executed_at"
1041
- t.datetime "created_at"
1042
- t.datetime "updated_at"
1116
+ t.datetime "created_at", null: false
1117
+ t.datetime "updated_at", null: false
1043
1118
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1044
1119
  end
1045
1120
 
1046
- create_table "user_groups", id: :serial, force: :cascade do |t|
1121
+ create_table "user_groups", force: :cascade do |t|
1047
1122
  t.string "name"
1048
1123
  t.text "display_name"
1049
1124
  t.text "note"
1050
1125
  t.integer "position"
1051
- t.datetime "created_at"
1052
- t.datetime "updated_at"
1053
- t.datetime "deleted_at"
1126
+ t.datetime "created_at", null: false
1127
+ t.datetime "updated_at", null: false
1054
1128
  t.integer "valid_period_for_new_user", default: 0, null: false
1055
1129
  t.datetime "expired_at"
1056
1130
  t.jsonb "display_name_translations", default: {}, null: false
1057
1131
  end
1058
1132
 
1059
- create_table "user_has_roles", id: :serial, force: :cascade do |t|
1060
- t.integer "user_id", null: false
1061
- t.integer "role_id", null: false
1062
- t.datetime "created_at"
1063
- t.datetime "updated_at"
1133
+ create_table "user_has_roles", force: :cascade do |t|
1134
+ t.bigint "user_id", null: false
1135
+ t.bigint "role_id", null: false
1136
+ t.datetime "created_at", null: false
1137
+ t.datetime "updated_at", null: false
1064
1138
  t.index ["role_id"], name: "index_user_has_roles_on_role_id"
1065
1139
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1066
1140
  end
1067
1141
 
1068
- create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1142
+ create_table "user_import_file_transitions", force: :cascade do |t|
1069
1143
  t.string "to_state"
1070
1144
  t.text "metadata", default: "{}"
1071
1145
  t.integer "sort_key"
1072
- t.integer "user_import_file_id"
1073
- t.datetime "created_at"
1074
- t.datetime "updated_at"
1146
+ t.bigint "user_import_file_id"
1147
+ t.datetime "created_at", null: false
1148
+ t.datetime "updated_at", null: false
1075
1149
  t.boolean "most_recent", null: false
1076
1150
  t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1077
1151
  t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1078
1152
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1079
1153
  end
1080
1154
 
1081
- create_table "user_import_files", id: :serial, force: :cascade do |t|
1082
- t.integer "user_id"
1155
+ create_table "user_import_files", force: :cascade do |t|
1156
+ t.bigint "user_id"
1083
1157
  t.text "note"
1084
1158
  t.datetime "executed_at"
1085
1159
  t.string "user_import_file_name"
@@ -1089,20 +1163,22 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1089
1163
  t.string "user_import_fingerprint"
1090
1164
  t.string "edit_mode"
1091
1165
  t.text "error_message"
1092
- t.datetime "created_at"
1093
- t.datetime "updated_at"
1166
+ t.datetime "created_at", null: false
1167
+ t.datetime "updated_at", null: false
1094
1168
  t.string "user_encoding"
1095
- t.integer "default_library_id"
1096
- t.integer "default_user_group_id"
1169
+ t.bigint "default_library_id"
1170
+ t.bigint "default_user_group_id"
1171
+ t.index ["default_library_id"], name: "index_user_import_files_on_default_library_id"
1172
+ t.index ["default_user_group_id"], name: "index_user_import_files_on_default_user_group_id"
1097
1173
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1098
1174
  end
1099
1175
 
1100
- create_table "user_import_results", id: :serial, force: :cascade do |t|
1101
- t.integer "user_import_file_id"
1102
- t.integer "user_id"
1176
+ create_table "user_import_results", force: :cascade do |t|
1177
+ t.bigint "user_import_file_id"
1178
+ t.bigint "user_id"
1103
1179
  t.text "body"
1104
- t.datetime "created_at"
1105
- t.datetime "updated_at"
1180
+ t.datetime "created_at", null: false
1181
+ t.datetime "updated_at", null: false
1106
1182
  t.text "error_message"
1107
1183
  t.index ["user_id"], name: "index_user_import_results_on_user_id"
1108
1184
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
@@ -1122,7 +1198,6 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1122
1198
  t.datetime "created_at"
1123
1199
  t.datetime "updated_at"
1124
1200
  t.string "username"
1125
- t.datetime "deleted_at"
1126
1201
  t.datetime "expired_at"
1127
1202
  t.integer "failed_attempts", default: 0
1128
1203
  t.string "unlock_token"
@@ -1146,10 +1221,10 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1146
1221
  t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1147
1222
  end
1148
1223
 
1149
- create_table "withdraws", id: :serial, force: :cascade do |t|
1150
- t.integer "basket_id"
1151
- t.integer "item_id"
1152
- t.integer "librarian_id"
1224
+ create_table "withdraws", force: :cascade do |t|
1225
+ t.bigint "basket_id"
1226
+ t.bigint "item_id"
1227
+ t.bigint "librarian_id"
1153
1228
  t.datetime "created_at", null: false
1154
1229
  t.datetime "updated_at", null: false
1155
1230
  t.index ["basket_id"], name: "index_withdraws_on_basket_id"
@@ -1157,9 +1232,17 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1157
1232
  t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1158
1233
  end
1159
1234
 
1235
+ add_foreign_key "doi_records", "manifestations"
1236
+ add_foreign_key "isbn_record_and_manifestations", "isbn_records"
1237
+ add_foreign_key "isbn_record_and_manifestations", "manifestations"
1238
+ add_foreign_key "issn_record_and_manifestations", "issn_records"
1239
+ add_foreign_key "issn_record_and_manifestations", "manifestations"
1160
1240
  add_foreign_key "items", "manifestations"
1161
1241
  add_foreign_key "libraries", "library_groups"
1162
1242
  add_foreign_key "library_groups", "users"
1243
+ add_foreign_key "periodical_and_manifestations", "manifestations"
1244
+ add_foreign_key "periodical_and_manifestations", "periodicals"
1245
+ add_foreign_key "periodicals", "frequencies"
1163
1246
  add_foreign_key "profiles", "users"
1164
1247
  add_foreign_key "user_has_roles", "roles"
1165
1248
  add_foreign_key "user_has_roles", "users"