enju_event 0.4.0.beta.2 → 0.4.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (245) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/controllers/event_import_files_controller.rb +1 -0
  4. data/app/controllers/event_import_results_controller.rb +2 -2
  5. data/app/mailers/event_export_mailer.rb +2 -2
  6. data/app/mailers/event_import_mailer.rb +2 -2
  7. data/app/models/event.rb +48 -30
  8. data/app/models/event_category.rb +3 -3
  9. data/app/models/event_export_file.rb +15 -21
  10. data/app/models/event_export_file_transition.rb +3 -3
  11. data/app/models/event_import_file.rb +7 -14
  12. data/app/models/event_import_file_transition.rb +1 -1
  13. data/app/models/event_import_result.rb +5 -6
  14. data/app/models/participate.rb +5 -5
  15. data/app/models/place.rb +2 -2
  16. data/app/views/event_import_files/_results.html.erb +26 -0
  17. data/app/views/event_import_files/show.html.erb +70 -74
  18. data/app/views/event_import_results/index.html.erb +15 -26
  19. data/app/views/events/index.txt.ruby +7 -0
  20. data/config/locales/translation_en.yml +1 -0
  21. data/config/locales/translation_ja.yml +1 -0
  22. data/db/migrate/113_create_events.rb +2 -7
  23. data/db/migrate/114_create_event_categories.rb +1 -1
  24. data/db/migrate/20081028093607_create_event_import_files.rb +1 -1
  25. data/db/migrate/20090519203307_create_participates.rb +1 -1
  26. data/db/migrate/20100925074639_create_event_import_results.rb +1 -1
  27. data/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +1 -1
  28. data/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +1 -1
  29. data/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +1 -1
  30. data/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
  31. data/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +1 -1
  32. data/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
  33. data/db/migrate/20140812152348_create_event_export_files.rb +1 -1
  34. data/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
  35. data/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
  36. data/db/migrate/20151128142913_create_places.rb +1 -1
  37. data/db/migrate/20151201163718_add_place_id_to_event.rb +1 -1
  38. data/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +1 -1
  39. data/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +1 -1
  40. data/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +1 -1
  41. data/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +1 -1
  42. data/lib/enju_event/engine.rb +0 -1
  43. data/lib/enju_event/version.rb +1 -1
  44. data/lib/generators/enju_event/setup/setup_generator.rb +3 -3
  45. data/spec/controllers/event_import_results_controller_spec.rb +2 -2
  46. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  47. data/spec/dummy/db/migrate/001_create_agents.rb +1 -2
  48. data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -2
  49. data/spec/dummy/db/migrate/006_create_items.rb +1 -2
  50. data/spec/dummy/db/migrate/012_create_owns.rb +1 -3
  51. data/spec/dummy/db/migrate/015_create_creates.rb +1 -3
  52. data/spec/dummy/db/migrate/041_create_roles.rb +1 -1
  53. data/spec/dummy/db/migrate/047_create_produces.rb +1 -3
  54. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -2
  55. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  56. data/spec/dummy/db/migrate/073_create_carrier_types.rb +1 -1
  57. data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -2
  58. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  59. data/spec/dummy/db/migrate/112_create_frequencies.rb +1 -1
  60. data/spec/dummy/db/migrate/117_create_form_of_works.rb +1 -1
  61. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  62. data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -2
  63. data/spec/dummy/db/migrate/125_create_donates.rb +1 -1
  64. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
  65. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
  66. data/spec/dummy/db/migrate/133_create_agent_merges.rb +1 -1
  67. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
  68. data/spec/dummy/db/migrate/149_create_message_templates.rb +1 -1
  69. data/spec/dummy/db/migrate/154_create_messages.rb +1 -1
  70. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +2 -7
  71. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +1 -3
  72. data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +1 -1
  73. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -2
  74. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  75. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
  76. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +1 -1
  77. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -1
  78. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -1
  79. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
  80. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
  81. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +1 -1
  82. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +1 -1
  83. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +1 -1
  84. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +1 -1
  85. data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +1 -1
  86. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
  87. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +1 -1
  88. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
  89. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +1 -1
  90. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  91. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +1 -1
  92. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  93. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +1 -1
  94. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +1 -1
  95. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +1 -1
  96. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
  97. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +1 -1
  98. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
  99. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
  100. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
  101. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
  102. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
  103. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
  104. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
  105. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
  106. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +1 -1
  107. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +1 -1
  108. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +1 -1
  109. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +1 -1
  110. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +1 -1
  111. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +1 -1
  112. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +1 -1
  113. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +1 -1
  114. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +1 -1
  115. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +1 -1
  116. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +1 -1
  117. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +1 -1
  118. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +1 -1
  119. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  120. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +1 -1
  121. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -1
  122. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  123. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -1
  124. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +1 -1
  125. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  126. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +1 -1
  127. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +1 -1
  128. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +1 -1
  129. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +1 -1
  130. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +1 -1
  131. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +1 -1
  132. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +1 -1
  133. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +1 -1
  134. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +1 -1
  135. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
  136. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
  137. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
  138. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
  139. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -2
  140. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  141. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +1 -1
  142. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +1 -1
  143. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +1 -1
  144. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +1 -1
  145. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +1 -1
  146. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +1 -1
  147. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +1 -1
  148. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  149. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  150. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +1 -1
  151. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +2 -6
  152. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +2 -6
  153. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
  154. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
  155. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
  156. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +2 -6
  157. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +1 -1
  158. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -1
  159. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
  160. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  161. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +1 -1
  162. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +1 -1
  163. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  164. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -6
  165. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +1 -1
  166. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  167. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  168. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +1 -1
  169. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +1 -1
  170. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
  171. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +1 -1
  172. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  173. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +1 -1
  174. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +1 -1
  175. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +1 -1
  176. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +1 -1
  177. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
  178. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
  179. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +1 -1
  180. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  181. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  182. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  183. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
  184. data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +11 -0
  185. data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
  186. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  187. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  188. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  189. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
  190. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +1 -1
  191. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +1 -1
  192. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +1 -1
  193. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +1 -1
  194. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +1 -1
  195. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  196. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  197. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  198. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  199. data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
  200. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +1 -1
  201. data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
  202. data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
  203. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  204. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  205. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +1 -1
  206. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  207. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  208. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  209. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  210. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  211. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
  212. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
  213. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
  214. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
  215. data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
  216. data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
  217. data/spec/dummy/db/migrate/20190102034126_create_doi_records.rb +13 -0
  218. data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +10 -0
  219. data/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
  220. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
  221. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
  222. data/spec/dummy/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
  223. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
  224. data/spec/dummy/db/schema.rb +386 -296
  225. data/spec/fixtures/event_categories.yml +3 -3
  226. data/spec/fixtures/event_export_files.yml +4 -4
  227. data/spec/fixtures/event_import_files.yml +7 -7
  228. data/spec/fixtures/event_import_results.yml +5 -5
  229. data/spec/fixtures/events.yml +6 -7
  230. data/spec/fixtures/library_groups.yml +1 -1
  231. data/spec/fixtures/participates.yml +5 -5
  232. data/spec/models/event_category_spec.rb +3 -3
  233. data/spec/models/event_export_file_spec.rb +4 -4
  234. data/spec/models/event_import_file_spec.rb +7 -7
  235. data/spec/models/event_import_result_spec.rb +5 -5
  236. data/spec/models/event_spec.rb +6 -7
  237. data/spec/models/participate_spec.rb +5 -5
  238. data/spec/system/event_export_files_spec.rb +16 -0
  239. data/spec/system/event_import_files_spec.rb +16 -0
  240. data/spec/system/event_import_results_spec.rb +17 -0
  241. data/spec/system/events_spec.rb +5 -0
  242. data/spec/system/participates_spec.rb +16 -0
  243. data/spec/system/places_spec.rb +16 -0
  244. metadata +46 -13
  245. data/app/views/events/index.txt.erb +0 -4
@@ -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 AddMostRecentToMessageTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToMessageTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :message_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 AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :message_request_transitions, :most_recent, :boolean, null: 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
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForMessageTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForMessageTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForMessageRequestTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForMessageRequestTransitions < 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,36 +10,37 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 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
+ enable_extension "pgcrypto"
16
17
  enable_extension "plpgsql"
17
18
 
18
- create_table "accepts", id: :serial, force: :cascade do |t|
19
- t.integer "basket_id"
20
- t.integer "item_id"
21
- t.integer "librarian_id"
22
- t.datetime "created_at"
23
- t.datetime "updated_at"
19
+ create_table "accepts", force: :cascade do |t|
20
+ t.bigint "basket_id"
21
+ t.bigint "item_id"
22
+ t.bigint "librarian_id"
23
+ t.datetime "created_at", null: false
24
+ t.datetime "updated_at", null: false
24
25
  t.index ["basket_id"], name: "index_accepts_on_basket_id"
25
26
  t.index ["item_id"], name: "index_accepts_on_item_id"
26
27
  t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
27
28
  end
28
29
 
29
- create_table "agent_import_file_transitions", id: :serial, force: :cascade do |t|
30
+ create_table "agent_import_file_transitions", force: :cascade do |t|
30
31
  t.string "to_state"
31
32
  t.text "metadata", default: "{}"
32
33
  t.integer "sort_key"
33
34
  t.integer "agent_import_file_id"
34
- t.datetime "created_at"
35
- t.datetime "updated_at"
35
+ t.datetime "created_at", null: false
36
+ t.datetime "updated_at", null: false
36
37
  t.boolean "most_recent", null: false
37
38
  t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
38
39
  t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
39
40
  t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
40
41
  end
41
42
 
42
- create_table "agent_import_files", id: :serial, force: :cascade do |t|
43
+ create_table "agent_import_files", force: :cascade do |t|
43
44
  t.integer "parent_id"
44
45
  t.string "content_type"
45
46
  t.integer "size"
@@ -50,8 +51,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
50
51
  t.string "agent_import_content_type"
51
52
  t.integer "agent_import_file_size"
52
53
  t.datetime "agent_import_updated_at"
53
- t.datetime "created_at"
54
- t.datetime "updated_at"
54
+ t.datetime "created_at", null: false
55
+ t.datetime "updated_at", null: false
55
56
  t.string "agent_import_fingerprint"
56
57
  t.text "error_message"
57
58
  t.string "edit_mode"
@@ -60,61 +61,61 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
60
61
  t.index ["user_id"], name: "index_agent_import_files_on_user_id"
61
62
  end
62
63
 
63
- create_table "agent_import_results", id: :serial, force: :cascade do |t|
64
+ create_table "agent_import_results", force: :cascade do |t|
64
65
  t.integer "agent_import_file_id"
65
66
  t.integer "agent_id"
66
67
  t.text "body"
67
- t.datetime "created_at"
68
- t.datetime "updated_at"
68
+ t.datetime "created_at", null: false
69
+ t.datetime "updated_at", null: false
69
70
  end
70
71
 
71
- create_table "agent_merge_lists", id: :serial, force: :cascade do |t|
72
+ create_table "agent_merge_lists", force: :cascade do |t|
72
73
  t.string "title"
73
- t.datetime "created_at"
74
- t.datetime "updated_at"
74
+ t.datetime "created_at", null: false
75
+ t.datetime "updated_at", null: false
75
76
  end
76
77
 
77
- create_table "agent_merges", id: :serial, force: :cascade do |t|
78
+ create_table "agent_merges", force: :cascade do |t|
78
79
  t.integer "agent_id", null: false
79
80
  t.integer "agent_merge_list_id", null: false
80
- t.datetime "created_at"
81
- t.datetime "updated_at"
81
+ t.datetime "created_at", null: false
82
+ t.datetime "updated_at", null: false
82
83
  t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
83
84
  t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
84
85
  end
85
86
 
86
- create_table "agent_relationship_types", id: :serial, force: :cascade do |t|
87
+ create_table "agent_relationship_types", force: :cascade do |t|
87
88
  t.string "name", null: false
88
89
  t.text "display_name"
89
90
  t.text "note"
90
91
  t.integer "position"
91
- t.datetime "created_at"
92
- t.datetime "updated_at"
92
+ t.datetime "created_at", null: false
93
+ t.datetime "updated_at", null: false
93
94
  t.jsonb "display_name_translations", default: {}, null: false
94
95
  end
95
96
 
96
- create_table "agent_relationships", id: :serial, force: :cascade do |t|
97
+ create_table "agent_relationships", force: :cascade do |t|
97
98
  t.integer "parent_id"
98
99
  t.integer "child_id"
99
100
  t.integer "agent_relationship_type_id"
100
- t.datetime "created_at"
101
- t.datetime "updated_at"
101
+ t.datetime "created_at", null: false
102
+ t.datetime "updated_at", null: false
102
103
  t.integer "position"
103
104
  t.index ["child_id"], name: "index_agent_relationships_on_child_id"
104
105
  t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
105
106
  end
106
107
 
107
- create_table "agent_types", id: :serial, force: :cascade do |t|
108
+ create_table "agent_types", force: :cascade do |t|
108
109
  t.string "name", null: false
109
110
  t.text "display_name"
110
111
  t.text "note"
111
112
  t.integer "position"
112
- t.datetime "created_at"
113
- t.datetime "updated_at"
113
+ t.datetime "created_at", null: false
114
+ t.datetime "updated_at", null: false
114
115
  t.jsonb "display_name_translations", default: {}, null: false
115
116
  end
116
117
 
117
- create_table "agents", id: :serial, force: :cascade do |t|
118
+ create_table "agents", force: :cascade do |t|
118
119
  t.string "last_name"
119
120
  t.string "middle_name"
120
121
  t.string "first_name"
@@ -126,9 +127,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
126
127
  t.string "full_name"
127
128
  t.text "full_name_transcription"
128
129
  t.text "full_name_alternative"
129
- t.datetime "created_at"
130
- t.datetime "updated_at"
131
- t.datetime "deleted_at"
130
+ t.datetime "created_at", null: false
131
+ t.datetime "updated_at", null: false
132
132
  t.string "zip_code_1"
133
133
  t.string "zip_code_2"
134
134
  t.text "address_1"
@@ -169,16 +169,16 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
169
169
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
170
170
  end
171
171
 
172
- create_table "baskets", id: :serial, force: :cascade do |t|
173
- t.integer "user_id"
172
+ create_table "baskets", force: :cascade do |t|
173
+ t.bigint "user_id"
174
174
  t.text "note"
175
175
  t.integer "lock_version", default: 0, null: false
176
- t.datetime "created_at"
177
- t.datetime "updated_at"
176
+ t.datetime "created_at", null: false
177
+ t.datetime "updated_at", null: false
178
178
  t.index ["user_id"], name: "index_baskets_on_user_id"
179
179
  end
180
180
 
181
- create_table "bookstores", id: :serial, force: :cascade do |t|
181
+ create_table "bookstores", force: :cascade do |t|
182
182
  t.text "name", null: false
183
183
  t.string "zip_code"
184
184
  t.text "address"
@@ -187,28 +187,27 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
187
187
  t.string "fax_number"
188
188
  t.string "url"
189
189
  t.integer "position"
190
- t.datetime "deleted_at"
191
- t.datetime "created_at"
192
- t.datetime "updated_at"
190
+ t.datetime "created_at", null: false
191
+ t.datetime "updated_at", null: false
193
192
  end
194
193
 
195
- create_table "budget_types", id: :serial, force: :cascade do |t|
194
+ create_table "budget_types", force: :cascade do |t|
196
195
  t.string "name"
197
196
  t.text "display_name"
198
197
  t.text "note"
199
198
  t.integer "position"
200
- t.datetime "created_at"
201
- t.datetime "updated_at"
199
+ t.datetime "created_at", null: false
200
+ t.datetime "updated_at", null: false
202
201
  t.jsonb "display_name_translations", default: {}, null: false
203
202
  end
204
203
 
205
- create_table "carrier_types", id: :serial, force: :cascade do |t|
204
+ create_table "carrier_types", force: :cascade do |t|
206
205
  t.string "name", null: false
207
206
  t.text "display_name"
208
207
  t.text "note"
209
208
  t.integer "position"
210
- t.datetime "created_at"
211
- t.datetime "updated_at"
209
+ t.datetime "created_at", null: false
210
+ t.datetime "updated_at", null: false
212
211
  t.string "attachment_file_name"
213
212
  t.string "attachment_content_type"
214
213
  t.bigint "attachment_file_size"
@@ -216,27 +215,27 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
216
215
  t.jsonb "display_name_translations", default: {}, null: false
217
216
  end
218
217
 
219
- create_table "colors", id: :serial, force: :cascade do |t|
220
- t.integer "library_group_id"
218
+ create_table "colors", force: :cascade do |t|
219
+ t.bigint "library_group_id"
221
220
  t.string "property"
222
221
  t.string "code"
223
222
  t.integer "position"
224
- t.datetime "created_at"
225
- t.datetime "updated_at"
223
+ t.datetime "created_at", null: false
224
+ t.datetime "updated_at", null: false
226
225
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
227
226
  end
228
227
 
229
- create_table "content_types", id: :serial, force: :cascade do |t|
228
+ create_table "content_types", force: :cascade do |t|
230
229
  t.string "name", null: false
231
230
  t.text "display_name"
232
231
  t.text "note"
233
232
  t.integer "position"
234
- t.datetime "created_at"
235
- t.datetime "updated_at"
233
+ t.datetime "created_at", null: false
234
+ t.datetime "updated_at", null: false
236
235
  t.jsonb "display_name_translations", default: {}, null: false
237
236
  end
238
237
 
239
- create_table "countries", id: :serial, force: :cascade do |t|
238
+ create_table "countries", force: :cascade do |t|
240
239
  t.string "name", null: false
241
240
  t.text "display_name"
242
241
  t.string "alpha_2"
@@ -250,89 +249,110 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
250
249
  t.index ["numeric_3"], name: "index_countries_on_numeric_3"
251
250
  end
252
251
 
253
- create_table "create_types", id: :serial, force: :cascade do |t|
252
+ create_table "create_types", force: :cascade do |t|
254
253
  t.string "name"
255
254
  t.text "display_name"
256
255
  t.text "note"
257
256
  t.integer "position"
258
- t.datetime "created_at"
259
- t.datetime "updated_at"
257
+ t.datetime "created_at", null: false
258
+ t.datetime "updated_at", null: false
260
259
  t.jsonb "display_name_translations", default: {}, null: false
261
260
  end
262
261
 
263
- create_table "creates", id: :serial, force: :cascade do |t|
264
- t.integer "agent_id", null: false
265
- t.integer "work_id", null: false
262
+ create_table "creates", force: :cascade do |t|
263
+ t.bigint "agent_id", null: false
264
+ t.bigint "work_id", null: false
266
265
  t.integer "position"
267
- t.datetime "created_at"
268
- t.datetime "updated_at"
266
+ t.datetime "created_at", null: false
267
+ t.datetime "updated_at", null: false
269
268
  t.integer "create_type_id"
270
269
  t.index ["agent_id"], name: "index_creates_on_agent_id"
271
270
  t.index ["work_id"], name: "index_creates_on_work_id"
272
271
  end
273
272
 
274
- create_table "donates", id: :serial, force: :cascade do |t|
273
+ create_table "custom_properties", force: :cascade do |t|
274
+ t.integer "resource_id", null: false
275
+ t.string "resource_type", null: false
276
+ t.text "label", null: false
277
+ t.text "value"
278
+ t.datetime "created_at", null: false
279
+ t.datetime "updated_at", null: false
280
+ end
281
+
282
+ create_table "doi_records", force: :cascade do |t|
283
+ t.string "body", null: false
284
+ t.string "display_body", null: false
285
+ t.string "source"
286
+ t.jsonb "response", default: {}, null: false
287
+ t.bigint "manifestation_id", null: false
288
+ t.datetime "created_at", null: false
289
+ t.datetime "updated_at", null: false
290
+ t.index ["body"], name: "index_doi_records_on_body", unique: true
291
+ t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id"
292
+ end
293
+
294
+ create_table "donates", force: :cascade do |t|
275
295
  t.integer "agent_id", null: false
276
296
  t.integer "item_id", null: false
277
- t.datetime "created_at"
278
- t.datetime "updated_at"
297
+ t.datetime "created_at", null: false
298
+ t.datetime "updated_at", null: false
279
299
  t.index ["agent_id"], name: "index_donates_on_agent_id"
280
300
  t.index ["item_id"], name: "index_donates_on_item_id"
281
301
  end
282
302
 
283
- create_table "event_categories", id: :serial, force: :cascade do |t|
303
+ create_table "event_categories", force: :cascade do |t|
284
304
  t.string "name", null: false
285
305
  t.text "display_name"
286
306
  t.text "note"
287
307
  t.integer "position"
288
- t.datetime "created_at"
289
- t.datetime "updated_at"
308
+ t.datetime "created_at", null: false
309
+ t.datetime "updated_at", null: false
290
310
  t.jsonb "display_name_translations", default: {}, null: false
291
311
  end
292
312
 
293
- create_table "event_export_file_transitions", id: :serial, force: :cascade do |t|
313
+ create_table "event_export_file_transitions", force: :cascade do |t|
294
314
  t.string "to_state"
295
315
  t.text "metadata", default: "{}"
296
316
  t.integer "sort_key"
297
317
  t.integer "event_export_file_id"
298
- t.datetime "created_at"
299
- t.datetime "updated_at"
318
+ t.datetime "created_at", null: false
319
+ t.datetime "updated_at", null: false
300
320
  t.boolean "most_recent", null: false
301
321
  t.index ["event_export_file_id", "most_recent"], name: "index_event_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
302
322
  t.index ["event_export_file_id"], name: "index_event_export_file_transitions_on_file_id"
303
323
  t.index ["sort_key", "event_export_file_id"], name: "index_event_export_file_transitions_on_sort_key_and_file_id", unique: true
304
324
  end
305
325
 
306
- create_table "event_export_files", id: :serial, force: :cascade do |t|
307
- t.integer "user_id"
326
+ create_table "event_export_files", force: :cascade do |t|
327
+ t.bigint "user_id"
308
328
  t.string "event_export_file_name"
309
329
  t.string "event_export_content_type"
310
330
  t.bigint "event_export_file_size"
311
331
  t.datetime "event_export_updated_at"
312
332
  t.datetime "executed_at"
313
- t.datetime "created_at"
314
- t.datetime "updated_at"
333
+ t.datetime "created_at", null: false
334
+ t.datetime "updated_at", null: false
315
335
  t.index ["user_id"], name: "index_event_export_files_on_user_id"
316
336
  end
317
337
 
318
- create_table "event_import_file_transitions", id: :serial, force: :cascade do |t|
338
+ create_table "event_import_file_transitions", force: :cascade do |t|
319
339
  t.string "to_state"
320
340
  t.text "metadata", default: "{}"
321
341
  t.integer "sort_key"
322
342
  t.integer "event_import_file_id"
323
- t.datetime "created_at"
324
- t.datetime "updated_at"
343
+ t.datetime "created_at", null: false
344
+ t.datetime "updated_at", null: false
325
345
  t.boolean "most_recent", null: false
326
346
  t.index ["event_import_file_id", "most_recent"], name: "index_event_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
327
347
  t.index ["event_import_file_id"], name: "index_event_import_file_transitions_on_event_import_file_id"
328
348
  t.index ["sort_key", "event_import_file_id"], name: "index_event_import_file_transitions_on_sort_key_and_file_id", unique: true
329
349
  end
330
350
 
331
- create_table "event_import_files", id: :serial, force: :cascade do |t|
332
- t.integer "parent_id"
351
+ create_table "event_import_files", force: :cascade do |t|
352
+ t.bigint "parent_id"
333
353
  t.string "content_type"
334
354
  t.integer "size"
335
- t.integer "user_id"
355
+ t.bigint "user_id"
336
356
  t.text "note"
337
357
  t.datetime "executed_at"
338
358
  t.string "event_import_file_name"
@@ -340,115 +360,155 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
340
360
  t.integer "event_import_file_size"
341
361
  t.datetime "event_import_updated_at"
342
362
  t.string "edit_mode"
343
- t.datetime "created_at"
344
- t.datetime "updated_at"
363
+ t.datetime "created_at", null: false
364
+ t.datetime "updated_at", null: false
345
365
  t.string "event_import_fingerprint"
346
366
  t.text "error_message"
347
367
  t.string "user_encoding"
348
- t.integer "default_library_id"
349
- t.integer "default_event_category_id"
368
+ t.bigint "default_library_id"
369
+ t.bigint "default_event_category_id"
370
+ t.index ["default_event_category_id"], name: "index_event_import_files_on_default_event_category_id"
371
+ t.index ["default_library_id"], name: "index_event_import_files_on_default_library_id"
350
372
  t.index ["parent_id"], name: "index_event_import_files_on_parent_id"
351
373
  t.index ["user_id"], name: "index_event_import_files_on_user_id"
352
374
  end
353
375
 
354
- create_table "event_import_results", id: :serial, force: :cascade do |t|
355
- t.integer "event_import_file_id"
356
- t.integer "event_id"
376
+ create_table "event_import_results", force: :cascade do |t|
377
+ t.bigint "event_import_file_id"
378
+ t.bigint "event_id"
357
379
  t.text "body"
358
- t.datetime "created_at"
359
- t.datetime "updated_at"
380
+ t.datetime "created_at", null: false
381
+ t.datetime "updated_at", null: false
382
+ t.index ["event_id"], name: "index_event_import_results_on_event_id"
383
+ t.index ["event_import_file_id"], name: "index_event_import_results_on_event_import_file_id"
360
384
  end
361
385
 
362
- create_table "events", id: :serial, force: :cascade do |t|
363
- t.integer "library_id", null: false
364
- t.integer "event_category_id", null: false
386
+ create_table "events", force: :cascade do |t|
387
+ t.bigint "library_id", null: false
388
+ t.bigint "event_category_id", null: false
365
389
  t.string "name"
366
390
  t.text "note"
367
391
  t.datetime "start_at"
368
392
  t.datetime "end_at"
369
393
  t.boolean "all_day", default: false, null: false
370
- t.datetime "deleted_at"
371
394
  t.text "display_name"
372
- t.datetime "created_at"
373
- t.datetime "updated_at"
374
- t.integer "place_id"
395
+ t.datetime "created_at", null: false
396
+ t.datetime "updated_at", null: false
397
+ t.bigint "place_id"
375
398
  t.jsonb "display_name_translations", default: {}, null: false
376
399
  t.index ["event_category_id"], name: "index_events_on_event_category_id"
377
400
  t.index ["library_id"], name: "index_events_on_library_id"
378
401
  t.index ["place_id"], name: "index_events_on_place_id"
379
402
  end
380
403
 
381
- create_table "form_of_works", id: :serial, force: :cascade do |t|
404
+ create_table "form_of_works", force: :cascade do |t|
382
405
  t.string "name", null: false
383
406
  t.text "display_name"
384
407
  t.text "note"
385
408
  t.integer "position"
386
- t.datetime "created_at"
387
- t.datetime "updated_at"
409
+ t.datetime "created_at", null: false
410
+ t.datetime "updated_at", null: false
388
411
  t.jsonb "display_name_translations", default: {}, null: false
389
412
  end
390
413
 
391
- create_table "frequencies", id: :serial, force: :cascade do |t|
414
+ create_table "frequencies", force: :cascade do |t|
392
415
  t.string "name", null: false
393
416
  t.text "display_name"
394
417
  t.text "note"
395
418
  t.integer "position"
396
- t.datetime "created_at"
397
- t.datetime "updated_at"
419
+ t.datetime "created_at", null: false
420
+ t.datetime "updated_at", null: false
398
421
  t.jsonb "display_name_translations", default: {}, null: false
399
422
  end
400
423
 
401
- create_table "identifier_types", id: :serial, force: :cascade do |t|
424
+ create_table "identifier_types", force: :cascade do |t|
402
425
  t.string "name"
403
426
  t.text "display_name"
404
427
  t.text "note"
405
428
  t.integer "position"
406
- t.datetime "created_at"
407
- t.datetime "updated_at"
429
+ t.datetime "created_at", null: false
430
+ t.datetime "updated_at", null: false
408
431
  end
409
432
 
410
- create_table "identifiers", id: :serial, force: :cascade do |t|
433
+ create_table "identifiers", force: :cascade do |t|
411
434
  t.string "body", null: false
412
435
  t.integer "identifier_type_id", null: false
413
436
  t.integer "manifestation_id"
414
437
  t.boolean "primary"
415
438
  t.integer "position"
416
- t.datetime "created_at"
417
- t.datetime "updated_at"
439
+ t.datetime "created_at", null: false
440
+ t.datetime "updated_at", null: false
418
441
  t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
419
442
  t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
420
443
  end
421
444
 
422
- create_table "import_request_transitions", id: :serial, force: :cascade do |t|
445
+ create_table "import_request_transitions", force: :cascade do |t|
423
446
  t.string "to_state"
424
447
  t.text "metadata", default: "{}"
425
448
  t.integer "sort_key"
426
449
  t.integer "import_request_id"
427
- t.datetime "created_at"
428
- t.datetime "updated_at"
450
+ t.datetime "created_at", null: false
451
+ t.datetime "updated_at", null: false
429
452
  t.boolean "most_recent", null: false
430
453
  t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
431
454
  t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
432
455
  t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
433
456
  end
434
457
 
435
- create_table "import_requests", id: :serial, force: :cascade do |t|
458
+ create_table "import_requests", force: :cascade do |t|
436
459
  t.string "isbn"
437
460
  t.integer "manifestation_id"
438
461
  t.integer "user_id"
439
- t.datetime "created_at"
440
- t.datetime "updated_at"
462
+ t.datetime "created_at", null: false
463
+ t.datetime "updated_at", null: false
441
464
  t.index ["isbn"], name: "index_import_requests_on_isbn"
442
465
  t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
443
466
  t.index ["user_id"], name: "index_import_requests_on_user_id"
444
467
  end
445
468
 
446
- create_table "items", id: :serial, force: :cascade do |t|
469
+ create_table "isbn_record_and_manifestations", force: :cascade do |t|
470
+ t.bigint "isbn_record_id", null: false
471
+ t.bigint "manifestation_id", null: false
472
+ t.integer "position"
473
+ t.datetime "created_at", null: false
474
+ t.datetime "updated_at", null: false
475
+ t.index ["isbn_record_id"], name: "index_isbn_record_and_manifestations_on_isbn_record_id"
476
+ t.index ["manifestation_id"], name: "index_isbn_record_and_manifestations_on_manifestation_id"
477
+ end
478
+
479
+ create_table "isbn_records", force: :cascade do |t|
480
+ t.string "body", null: false
481
+ t.string "isbn_type"
482
+ t.string "source"
483
+ t.datetime "created_at", null: false
484
+ t.datetime "updated_at", null: false
485
+ t.index ["body"], name: "index_isbn_records_on_body", unique: true
486
+ end
487
+
488
+ create_table "issn_record_and_manifestations", force: :cascade do |t|
489
+ t.bigint "issn_record_id", null: false
490
+ t.bigint "manifestation_id", null: false
491
+ t.integer "position"
492
+ t.datetime "created_at", null: false
493
+ t.datetime "updated_at", null: false
494
+ t.index ["issn_record_id"], name: "index_issn_record_and_manifestations_on_issn_record_id"
495
+ t.index ["manifestation_id"], name: "index_issn_record_and_manifestations_on_manifestation_id"
496
+ end
497
+
498
+ create_table "issn_records", force: :cascade do |t|
499
+ t.string "body", null: false
500
+ t.string "issn_type"
501
+ t.string "source"
502
+ t.datetime "created_at", null: false
503
+ t.datetime "updated_at", null: false
504
+ t.index ["body"], name: "index_issn_records_on_body", unique: true
505
+ end
506
+
507
+ create_table "items", force: :cascade do |t|
447
508
  t.string "call_number"
448
509
  t.string "item_identifier"
449
- t.datetime "created_at"
450
- t.datetime "updated_at"
451
- t.datetime "deleted_at"
510
+ t.datetime "created_at", null: false
511
+ t.datetime "updated_at", null: false
452
512
  t.integer "shelf_id", default: 1, null: false
453
513
  t.boolean "include_supplements", default: false, null: false
454
514
  t.text "note"
@@ -464,6 +524,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
464
524
  t.string "binding_call_number"
465
525
  t.datetime "binded_at"
466
526
  t.integer "manifestation_id", null: false
527
+ t.text "memo"
467
528
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
468
529
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
469
530
  t.index ["item_identifier"], name: "index_items_on_item_identifier"
@@ -472,7 +533,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
472
533
  t.index ["shelf_id"], name: "index_items_on_shelf_id"
473
534
  end
474
535
 
475
- create_table "languages", id: :serial, force: :cascade do |t|
536
+ create_table "languages", force: :cascade do |t|
476
537
  t.string "name", null: false
477
538
  t.string "native_name"
478
539
  t.text "display_name"
@@ -488,7 +549,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
488
549
  t.index ["name"], name: "index_languages_on_name", unique: true
489
550
  end
490
551
 
491
- create_table "libraries", id: :serial, force: :cascade do |t|
552
+ create_table "libraries", force: :cascade do |t|
492
553
  t.string "name", null: false
493
554
  t.text "display_name"
494
555
  t.string "short_display_name", null: false
@@ -502,23 +563,23 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
502
563
  t.text "note"
503
564
  t.integer "call_number_rows", default: 1, null: false
504
565
  t.string "call_number_delimiter", default: "|", null: false
505
- t.integer "library_group_id", null: false
566
+ t.bigint "library_group_id", null: false
506
567
  t.integer "users_count", default: 0, null: false
507
568
  t.integer "position"
508
- t.integer "country_id"
509
- t.datetime "created_at"
510
- t.datetime "updated_at"
511
- t.datetime "deleted_at"
569
+ t.bigint "country_id"
570
+ t.datetime "created_at", null: false
571
+ t.datetime "updated_at", null: false
512
572
  t.text "opening_hour"
513
573
  t.string "isil"
514
574
  t.float "latitude"
515
575
  t.float "longitude"
516
576
  t.jsonb "display_name_translations", default: {}, null: false
577
+ t.index ["country_id"], name: "index_libraries_on_country_id"
517
578
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
518
579
  t.index ["name"], name: "index_libraries_on_name"
519
580
  end
520
581
 
521
- create_table "library_groups", id: :serial, force: :cascade do |t|
582
+ create_table "library_groups", force: :cascade do |t|
522
583
  t.string "name", null: false
523
584
  t.text "display_name"
524
585
  t.string "short_name", null: false
@@ -527,8 +588,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
527
588
  t.text "note"
528
589
  t.integer "country_id"
529
590
  t.integer "position"
530
- t.datetime "created_at"
531
- t.datetime "updated_at"
591
+ t.datetime "created_at", null: false
592
+ t.datetime "updated_at", null: false
532
593
  t.text "admin_networks"
533
594
  t.string "url", default: "http://localhost:3000/"
534
595
  t.text "settings"
@@ -536,7 +597,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
536
597
  t.integer "max_number_of_results", default: 500
537
598
  t.boolean "family_name_first", default: true
538
599
  t.integer "pub_year_facet_range_interval", default: 10
539
- t.integer "user_id"
600
+ t.bigint "user_id"
540
601
  t.boolean "csv_charset_conversion", default: false, null: false
541
602
  t.string "header_logo_file_name"
542
603
  t.string "header_logo_content_type"
@@ -546,42 +607,44 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
546
607
  t.jsonb "display_name_translations", default: {}, null: false
547
608
  t.jsonb "login_banner_translations", default: {}, null: false
548
609
  t.jsonb "footer_banner_translations", default: {}, null: false
610
+ t.string "email"
611
+ t.index ["email"], name: "index_library_groups_on_email"
549
612
  t.index ["short_name"], name: "index_library_groups_on_short_name"
550
613
  t.index ["user_id"], name: "index_library_groups_on_user_id"
551
614
  end
552
615
 
553
- create_table "licenses", id: :serial, force: :cascade do |t|
616
+ create_table "licenses", force: :cascade do |t|
554
617
  t.string "name", null: false
555
618
  t.string "display_name"
556
619
  t.text "note"
557
620
  t.integer "position"
558
- t.datetime "created_at"
559
- t.datetime "updated_at"
621
+ t.datetime "created_at", null: false
622
+ t.datetime "updated_at", null: false
560
623
  t.jsonb "display_name_translations", default: {}, null: false
561
624
  end
562
625
 
563
- create_table "manifestation_relationship_types", id: :serial, force: :cascade do |t|
626
+ create_table "manifestation_relationship_types", force: :cascade do |t|
564
627
  t.string "name", null: false
565
628
  t.text "display_name"
566
629
  t.text "note"
567
630
  t.integer "position"
568
- t.datetime "created_at"
569
- t.datetime "updated_at"
631
+ t.datetime "created_at", null: false
632
+ t.datetime "updated_at", null: false
570
633
  t.jsonb "display_name_translations", default: {}, null: false
571
634
  end
572
635
 
573
- create_table "manifestation_relationships", id: :serial, force: :cascade do |t|
636
+ create_table "manifestation_relationships", force: :cascade do |t|
574
637
  t.integer "parent_id"
575
638
  t.integer "child_id"
576
639
  t.integer "manifestation_relationship_type_id"
577
- t.datetime "created_at"
578
- t.datetime "updated_at"
640
+ t.datetime "created_at", null: false
641
+ t.datetime "updated_at", null: false
579
642
  t.integer "position"
580
643
  t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
581
644
  t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
582
645
  end
583
646
 
584
- create_table "manifestations", id: :serial, force: :cascade do |t|
647
+ create_table "manifestations", force: :cascade do |t|
585
648
  t.text "original_title", null: false
586
649
  t.text "title_alternative"
587
650
  t.text "title_transcription"
@@ -589,9 +652,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
589
652
  t.string "manifestation_identifier"
590
653
  t.datetime "date_of_publication"
591
654
  t.datetime "date_copyrighted"
592
- t.datetime "created_at"
593
- t.datetime "updated_at"
594
- t.datetime "deleted_at"
655
+ t.datetime "created_at", null: false
656
+ t.datetime "updated_at", null: false
595
657
  t.string "access_address"
596
658
  t.integer "language_id", default: 1, null: false
597
659
  t.integer "carrier_type_id", default: 1, null: false
@@ -640,80 +702,83 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
640
702
  t.text "publication_place"
641
703
  t.text "extent"
642
704
  t.text "dimensions"
705
+ t.text "memo"
643
706
  t.index ["access_address"], name: "index_manifestations_on_access_address"
644
707
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
645
708
  t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
646
709
  t.index ["updated_at"], name: "index_manifestations_on_updated_at"
647
710
  end
648
711
 
649
- create_table "medium_of_performances", id: :serial, force: :cascade do |t|
712
+ create_table "medium_of_performances", force: :cascade do |t|
650
713
  t.string "name", null: false
651
714
  t.text "display_name"
652
715
  t.text "note"
653
716
  t.integer "position"
654
- t.datetime "created_at"
655
- t.datetime "updated_at"
717
+ t.datetime "created_at", null: false
718
+ t.datetime "updated_at", null: false
656
719
  t.jsonb "display_name_translations", default: {}, null: false
657
720
  end
658
721
 
659
- create_table "message_request_transitions", id: :serial, force: :cascade do |t|
722
+ create_table "message_request_transitions", force: :cascade do |t|
660
723
  t.string "to_state"
661
724
  t.text "metadata", default: "{}"
662
725
  t.integer "sort_key"
663
726
  t.integer "message_request_id"
664
- t.datetime "created_at"
665
- t.datetime "updated_at"
727
+ t.datetime "created_at", null: false
728
+ t.datetime "updated_at", null: false
666
729
  t.boolean "most_recent", null: false
667
730
  t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
668
731
  t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
669
732
  t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
670
733
  end
671
734
 
672
- create_table "message_requests", id: :serial, force: :cascade do |t|
673
- t.integer "sender_id"
674
- t.integer "receiver_id"
675
- t.integer "message_template_id"
735
+ create_table "message_requests", force: :cascade do |t|
736
+ t.bigint "sender_id"
737
+ t.bigint "receiver_id"
738
+ t.bigint "message_template_id"
676
739
  t.datetime "sent_at"
677
- t.datetime "deleted_at"
678
740
  t.text "body"
679
- t.datetime "created_at"
680
- t.datetime "updated_at"
741
+ t.datetime "created_at", null: false
742
+ t.datetime "updated_at", null: false
743
+ t.index ["message_template_id"], name: "index_message_requests_on_message_template_id"
744
+ t.index ["receiver_id"], name: "index_message_requests_on_receiver_id"
745
+ t.index ["sender_id"], name: "index_message_requests_on_sender_id"
681
746
  end
682
747
 
683
- create_table "message_templates", id: :serial, force: :cascade do |t|
748
+ create_table "message_templates", force: :cascade do |t|
684
749
  t.string "status", null: false
685
750
  t.text "title", null: false
686
751
  t.text "body", null: false
687
752
  t.integer "position"
688
753
  t.string "locale", default: "en"
689
- t.datetime "created_at"
690
- t.datetime "updated_at"
754
+ t.datetime "created_at", null: false
755
+ t.datetime "updated_at", null: false
691
756
  t.index ["status"], name: "index_message_templates_on_status", unique: true
692
757
  end
693
758
 
694
- create_table "message_transitions", id: :serial, force: :cascade do |t|
759
+ create_table "message_transitions", force: :cascade do |t|
695
760
  t.string "to_state"
696
761
  t.text "metadata", default: "{}"
697
762
  t.integer "sort_key"
698
763
  t.integer "message_id"
699
- t.datetime "created_at"
700
- t.datetime "updated_at"
764
+ t.datetime "created_at", null: false
765
+ t.datetime "updated_at", null: false
701
766
  t.boolean "most_recent", null: false
702
767
  t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
703
768
  t.index ["message_id"], name: "index_message_transitions_on_message_id"
704
769
  t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
705
770
  end
706
771
 
707
- create_table "messages", id: :serial, force: :cascade do |t|
772
+ create_table "messages", force: :cascade do |t|
708
773
  t.datetime "read_at"
709
- t.integer "sender_id"
710
- t.integer "receiver_id"
774
+ t.bigint "sender_id"
775
+ t.bigint "receiver_id"
711
776
  t.string "subject", null: false
712
777
  t.text "body"
713
- t.integer "message_request_id"
714
- t.integer "parent_id"
715
- t.datetime "created_at"
716
- t.datetime "updated_at"
778
+ t.bigint "message_request_id"
779
+ t.bigint "parent_id"
780
+ t.datetime "created_at", null: false
781
+ t.datetime "updated_at", null: false
717
782
  t.integer "lft"
718
783
  t.integer "rgt"
719
784
  t.integer "depth"
@@ -723,35 +788,54 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
723
788
  t.index ["sender_id"], name: "index_messages_on_sender_id"
724
789
  end
725
790
 
726
- create_table "owns", id: :serial, force: :cascade do |t|
727
- t.integer "agent_id", null: false
728
- t.integer "item_id", null: false
791
+ create_table "owns", force: :cascade do |t|
792
+ t.bigint "agent_id", null: false
793
+ t.bigint "item_id", null: false
729
794
  t.integer "position"
730
- t.datetime "created_at"
731
- t.datetime "updated_at"
795
+ t.datetime "created_at", null: false
796
+ t.datetime "updated_at", null: false
732
797
  t.index ["agent_id"], name: "index_owns_on_agent_id"
733
798
  t.index ["item_id"], name: "index_owns_on_item_id"
734
799
  end
735
800
 
736
- create_table "participates", id: :serial, force: :cascade do |t|
737
- t.integer "agent_id", null: false
738
- t.integer "event_id", null: false
801
+ create_table "participates", force: :cascade do |t|
802
+ t.bigint "agent_id", null: false
803
+ t.bigint "event_id", null: false
739
804
  t.integer "position"
740
- t.datetime "created_at"
741
- t.datetime "updated_at"
805
+ t.datetime "created_at", null: false
806
+ t.datetime "updated_at", null: false
742
807
  t.index ["agent_id"], name: "index_participates_on_agent_id"
743
808
  t.index ["event_id"], name: "index_participates_on_event_id"
744
809
  end
745
810
 
746
- create_table "picture_files", id: :serial, force: :cascade do |t|
811
+ create_table "periodical_and_manifestations", force: :cascade do |t|
812
+ t.bigint "periodical_id", null: false
813
+ t.bigint "manifestation_id", null: false
814
+ t.boolean "periodical_master", default: false, null: false
815
+ t.datetime "created_at", null: false
816
+ t.datetime "updated_at", null: false
817
+ t.index ["manifestation_id"], name: "index_periodical_and_manifestations_on_manifestation_id"
818
+ t.index ["periodical_id"], name: "index_periodical_and_manifestations_on_periodical_id"
819
+ t.index ["periodical_master"], name: "index_periodical_and_manifestations_on_periodical_master", unique: true, where: "(periodical_master IS TRUE)"
820
+ end
821
+
822
+ create_table "periodicals", force: :cascade do |t|
823
+ t.text "original_title", null: false
824
+ t.bigint "frequency_id", null: false
825
+ t.datetime "created_at", null: false
826
+ t.datetime "updated_at", null: false
827
+ t.index ["frequency_id"], name: "index_periodicals_on_frequency_id"
828
+ end
829
+
830
+ create_table "picture_files", force: :cascade do |t|
747
831
  t.integer "picture_attachable_id"
748
832
  t.string "picture_attachable_type"
749
833
  t.string "content_type"
750
834
  t.text "title"
751
835
  t.string "thumbnail"
752
836
  t.integer "position"
753
- t.datetime "created_at"
754
- t.datetime "updated_at"
837
+ t.datetime "created_at", null: false
838
+ t.datetime "updated_at", null: false
755
839
  t.string "picture_file_name"
756
840
  t.string "picture_content_type"
757
841
  t.integer "picture_file_size"
@@ -763,10 +847,10 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
763
847
  t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
764
848
  end
765
849
 
766
- create_table "places", id: :serial, force: :cascade do |t|
850
+ create_table "places", force: :cascade do |t|
767
851
  t.string "term"
768
852
  t.text "city"
769
- t.integer "country_id"
853
+ t.bigint "country_id"
770
854
  t.float "latitude"
771
855
  t.float "longitude"
772
856
  t.datetime "created_at", null: false
@@ -775,39 +859,39 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
775
859
  t.index ["term"], name: "index_places_on_term"
776
860
  end
777
861
 
778
- create_table "produce_types", id: :serial, force: :cascade do |t|
862
+ create_table "produce_types", force: :cascade do |t|
779
863
  t.string "name"
780
864
  t.text "display_name"
781
865
  t.text "note"
782
866
  t.integer "position"
783
- t.datetime "created_at"
784
- t.datetime "updated_at"
867
+ t.datetime "created_at", null: false
868
+ t.datetime "updated_at", null: false
785
869
  t.jsonb "display_name_translations", default: {}, null: false
786
870
  end
787
871
 
788
- create_table "produces", id: :serial, force: :cascade do |t|
789
- t.integer "agent_id", null: false
790
- t.integer "manifestation_id", null: false
872
+ create_table "produces", force: :cascade do |t|
873
+ t.bigint "agent_id", null: false
874
+ t.bigint "manifestation_id", null: false
791
875
  t.integer "position"
792
- t.datetime "created_at"
793
- t.datetime "updated_at"
876
+ t.datetime "created_at", null: false
877
+ t.datetime "updated_at", null: false
794
878
  t.integer "produce_type_id"
795
879
  t.index ["agent_id"], name: "index_produces_on_agent_id"
796
880
  t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
797
881
  end
798
882
 
799
- create_table "profiles", id: :serial, force: :cascade do |t|
800
- t.integer "user_id"
801
- t.integer "user_group_id"
802
- t.integer "library_id"
883
+ create_table "profiles", force: :cascade do |t|
884
+ t.bigint "user_id"
885
+ t.bigint "user_group_id"
886
+ t.bigint "library_id"
803
887
  t.string "locale"
804
888
  t.string "user_number"
805
889
  t.text "full_name"
806
890
  t.text "note"
807
891
  t.text "keyword_list"
808
- t.integer "required_role_id"
809
- t.datetime "created_at"
810
- t.datetime "updated_at"
892
+ t.bigint "required_role_id"
893
+ t.datetime "created_at", null: false
894
+ t.datetime "updated_at", null: false
811
895
  t.datetime "expired_at"
812
896
  t.text "full_name_transcription"
813
897
  t.datetime "date_of_birth"
@@ -818,85 +902,85 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
818
902
  t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
819
903
  end
820
904
 
821
- create_table "realize_types", id: :serial, force: :cascade do |t|
905
+ create_table "realize_types", force: :cascade do |t|
822
906
  t.string "name"
823
907
  t.text "display_name"
824
908
  t.text "note"
825
909
  t.integer "position"
826
- t.datetime "created_at"
827
- t.datetime "updated_at"
910
+ t.datetime "created_at", null: false
911
+ t.datetime "updated_at", null: false
828
912
  t.jsonb "display_name_translations", default: {}, null: false
829
913
  end
830
914
 
831
- create_table "realizes", id: :serial, force: :cascade do |t|
832
- t.integer "agent_id", null: false
833
- t.integer "expression_id", null: false
915
+ create_table "realizes", force: :cascade do |t|
916
+ t.bigint "agent_id", null: false
917
+ t.bigint "expression_id", null: false
834
918
  t.integer "position"
835
- t.datetime "created_at"
836
- t.datetime "updated_at"
919
+ t.datetime "created_at", null: false
920
+ t.datetime "updated_at", null: false
837
921
  t.integer "realize_type_id"
838
922
  t.index ["agent_id"], name: "index_realizes_on_agent_id"
839
923
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
840
924
  end
841
925
 
842
- create_table "request_status_types", id: :serial, force: :cascade do |t|
926
+ create_table "request_status_types", force: :cascade do |t|
843
927
  t.string "name", null: false
844
928
  t.text "display_name"
845
929
  t.text "note"
846
930
  t.integer "position"
847
- t.datetime "created_at"
848
- t.datetime "updated_at"
931
+ t.datetime "created_at", null: false
932
+ t.datetime "updated_at", null: false
849
933
  t.jsonb "display_name_translations", default: {}, null: false
850
934
  end
851
935
 
852
- create_table "request_types", id: :serial, force: :cascade do |t|
936
+ create_table "request_types", force: :cascade do |t|
853
937
  t.string "name", null: false
854
938
  t.text "display_name"
855
939
  t.text "note"
856
940
  t.integer "position"
857
- t.datetime "created_at"
858
- t.datetime "updated_at"
941
+ t.datetime "created_at", null: false
942
+ t.datetime "updated_at", null: false
859
943
  t.jsonb "display_name_translations", default: {}, null: false
860
944
  end
861
945
 
862
- create_table "resource_export_file_transitions", id: :serial, force: :cascade do |t|
946
+ create_table "resource_export_file_transitions", force: :cascade do |t|
863
947
  t.string "to_state"
864
948
  t.text "metadata", default: "{}"
865
949
  t.integer "sort_key"
866
950
  t.integer "resource_export_file_id"
867
- t.datetime "created_at"
868
- t.datetime "updated_at"
951
+ t.datetime "created_at", null: false
952
+ t.datetime "updated_at", null: false
869
953
  t.boolean "most_recent", null: false
870
954
  t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
871
955
  t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
872
956
  t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
873
957
  end
874
958
 
875
- create_table "resource_export_files", id: :serial, force: :cascade do |t|
959
+ create_table "resource_export_files", force: :cascade do |t|
876
960
  t.integer "user_id"
877
961
  t.string "resource_export_file_name"
878
962
  t.string "resource_export_content_type"
879
963
  t.bigint "resource_export_file_size"
880
964
  t.datetime "resource_export_updated_at"
881
965
  t.datetime "executed_at"
882
- t.datetime "created_at"
883
- t.datetime "updated_at"
966
+ t.datetime "created_at", null: false
967
+ t.datetime "updated_at", null: false
884
968
  end
885
969
 
886
- create_table "resource_import_file_transitions", id: :serial, force: :cascade do |t|
970
+ create_table "resource_import_file_transitions", force: :cascade do |t|
887
971
  t.string "to_state"
888
972
  t.text "metadata", default: "{}"
889
973
  t.integer "sort_key"
890
974
  t.integer "resource_import_file_id"
891
- t.datetime "created_at"
892
- t.datetime "updated_at"
975
+ t.datetime "created_at", null: false
976
+ t.datetime "updated_at", null: false
893
977
  t.boolean "most_recent", null: false
894
978
  t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
895
979
  t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
896
980
  t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
897
981
  end
898
982
 
899
- create_table "resource_import_files", id: :serial, force: :cascade do |t|
983
+ create_table "resource_import_files", force: :cascade do |t|
900
984
  t.integer "parent_id"
901
985
  t.string "content_type"
902
986
  t.integer "size"
@@ -907,8 +991,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
907
991
  t.string "resource_import_content_type"
908
992
  t.integer "resource_import_file_size"
909
993
  t.datetime "resource_import_updated_at"
910
- t.datetime "created_at"
911
- t.datetime "updated_at"
994
+ t.datetime "created_at", null: false
995
+ t.datetime "updated_at", null: false
912
996
  t.string "edit_mode"
913
997
  t.string "resource_import_fingerprint"
914
998
  t.text "error_message"
@@ -918,20 +1002,20 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
918
1002
  t.index ["user_id"], name: "index_resource_import_files_on_user_id"
919
1003
  end
920
1004
 
921
- create_table "resource_import_results", id: :serial, force: :cascade do |t|
1005
+ create_table "resource_import_results", force: :cascade do |t|
922
1006
  t.integer "resource_import_file_id"
923
1007
  t.integer "manifestation_id"
924
1008
  t.integer "item_id"
925
1009
  t.text "body"
926
- t.datetime "created_at"
927
- t.datetime "updated_at"
1010
+ t.datetime "created_at", null: false
1011
+ t.datetime "updated_at", null: false
928
1012
  t.text "error_message"
929
1013
  t.index ["item_id"], name: "index_resource_import_results_on_item_id"
930
1014
  t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
931
1015
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
932
1016
  end
933
1017
 
934
- create_table "roles", id: :serial, force: :cascade do |t|
1018
+ create_table "roles", force: :cascade do |t|
935
1019
  t.string "name", null: false
936
1020
  t.string "display_name"
937
1021
  t.text "note"
@@ -942,7 +1026,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
942
1026
  t.jsonb "display_name_translations", default: {}, null: false
943
1027
  end
944
1028
 
945
- create_table "search_engines", id: :serial, force: :cascade do |t|
1029
+ create_table "search_engines", force: :cascade do |t|
946
1030
  t.string "name", null: false
947
1031
  t.text "display_name"
948
1032
  t.string "url", null: false
@@ -952,34 +1036,34 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
952
1036
  t.text "additional_param"
953
1037
  t.text "note"
954
1038
  t.integer "position"
955
- t.datetime "created_at"
956
- t.datetime "updated_at"
1039
+ t.datetime "created_at", null: false
1040
+ t.datetime "updated_at", null: false
957
1041
  t.jsonb "display_name_translations", default: {}, null: false
958
1042
  end
959
1043
 
960
- create_table "series_statement_merge_lists", id: :serial, force: :cascade do |t|
1044
+ create_table "series_statement_merge_lists", force: :cascade do |t|
961
1045
  t.string "title"
962
- t.datetime "created_at"
963
- t.datetime "updated_at"
1046
+ t.datetime "created_at", null: false
1047
+ t.datetime "updated_at", null: false
964
1048
  end
965
1049
 
966
- create_table "series_statement_merges", id: :serial, force: :cascade do |t|
1050
+ create_table "series_statement_merges", force: :cascade do |t|
967
1051
  t.integer "series_statement_id", null: false
968
1052
  t.integer "series_statement_merge_list_id", null: false
969
- t.datetime "created_at"
970
- t.datetime "updated_at"
1053
+ t.datetime "created_at", null: false
1054
+ t.datetime "updated_at", null: false
971
1055
  t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
972
1056
  t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
973
1057
  end
974
1058
 
975
- create_table "series_statements", id: :serial, force: :cascade do |t|
1059
+ create_table "series_statements", force: :cascade do |t|
976
1060
  t.text "original_title"
977
1061
  t.text "numbering"
978
1062
  t.text "title_subseries"
979
1063
  t.text "numbering_subseries"
980
1064
  t.integer "position"
981
- t.datetime "created_at"
982
- t.datetime "updated_at"
1065
+ t.datetime "created_at", null: false
1066
+ t.datetime "updated_at", null: false
983
1067
  t.text "title_transcription"
984
1068
  t.text "title_alternative"
985
1069
  t.string "series_statement_identifier"
@@ -996,52 +1080,50 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
996
1080
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
997
1081
  end
998
1082
 
999
- create_table "shelves", id: :serial, force: :cascade do |t|
1083
+ create_table "shelves", force: :cascade do |t|
1000
1084
  t.string "name", null: false
1001
1085
  t.text "display_name"
1002
1086
  t.text "note"
1003
- t.integer "library_id", null: false
1087
+ t.bigint "library_id", null: false
1004
1088
  t.integer "items_count", default: 0, null: false
1005
1089
  t.integer "position"
1006
- t.datetime "created_at"
1007
- t.datetime "updated_at"
1008
- t.datetime "deleted_at"
1090
+ t.datetime "created_at", null: false
1091
+ t.datetime "updated_at", null: false
1009
1092
  t.boolean "closed", default: false, null: false
1010
1093
  t.jsonb "display_name_translations", default: {}, null: false
1011
1094
  t.index ["library_id"], name: "index_shelves_on_library_id"
1012
1095
  end
1013
1096
 
1014
- create_table "subscribes", id: :serial, force: :cascade do |t|
1015
- t.integer "subscription_id", null: false
1097
+ create_table "subscribes", force: :cascade do |t|
1098
+ t.bigint "subscription_id", null: false
1016
1099
  t.integer "work_id", null: false
1017
1100
  t.datetime "start_at", null: false
1018
1101
  t.datetime "end_at", null: false
1019
- t.datetime "created_at"
1020
- t.datetime "updated_at"
1102
+ t.datetime "created_at", null: false
1103
+ t.datetime "updated_at", null: false
1021
1104
  t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
1022
1105
  t.index ["work_id"], name: "index_subscribes_on_work_id"
1023
1106
  end
1024
1107
 
1025
- create_table "subscriptions", id: :serial, force: :cascade do |t|
1108
+ create_table "subscriptions", force: :cascade do |t|
1026
1109
  t.text "title", null: false
1027
1110
  t.text "note"
1028
- t.integer "user_id"
1029
- t.integer "order_list_id"
1030
- t.datetime "deleted_at"
1111
+ t.bigint "user_id"
1112
+ t.bigint "order_list_id"
1031
1113
  t.integer "subscribes_count", default: 0, null: false
1032
- t.datetime "created_at"
1033
- t.datetime "updated_at"
1114
+ t.datetime "created_at", null: false
1115
+ t.datetime "updated_at", null: false
1034
1116
  t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
1035
1117
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1036
1118
  end
1037
1119
 
1038
- create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1120
+ create_table "user_export_file_transitions", force: :cascade do |t|
1039
1121
  t.string "to_state"
1040
1122
  t.text "metadata", default: "{}"
1041
1123
  t.integer "sort_key"
1042
- t.integer "user_export_file_id"
1043
- t.datetime "created_at"
1044
- t.datetime "updated_at"
1124
+ t.bigint "user_export_file_id"
1125
+ t.datetime "created_at", null: false
1126
+ t.datetime "updated_at", null: false
1045
1127
  t.boolean "most_recent", null: false
1046
1128
  t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1047
1129
  t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
@@ -1049,55 +1131,54 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1049
1131
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1050
1132
  end
1051
1133
 
1052
- create_table "user_export_files", id: :serial, force: :cascade do |t|
1053
- t.integer "user_id"
1134
+ create_table "user_export_files", force: :cascade do |t|
1135
+ t.bigint "user_id"
1054
1136
  t.string "user_export_file_name"
1055
1137
  t.string "user_export_content_type"
1056
1138
  t.bigint "user_export_file_size"
1057
1139
  t.datetime "user_export_updated_at"
1058
1140
  t.datetime "executed_at"
1059
- t.datetime "created_at"
1060
- t.datetime "updated_at"
1141
+ t.datetime "created_at", null: false
1142
+ t.datetime "updated_at", null: false
1061
1143
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1062
1144
  end
1063
1145
 
1064
- create_table "user_groups", id: :serial, force: :cascade do |t|
1146
+ create_table "user_groups", force: :cascade do |t|
1065
1147
  t.string "name"
1066
1148
  t.text "display_name"
1067
1149
  t.text "note"
1068
1150
  t.integer "position"
1069
- t.datetime "created_at"
1070
- t.datetime "updated_at"
1071
- t.datetime "deleted_at"
1151
+ t.datetime "created_at", null: false
1152
+ t.datetime "updated_at", null: false
1072
1153
  t.integer "valid_period_for_new_user", default: 0, null: false
1073
1154
  t.datetime "expired_at"
1074
1155
  t.jsonb "display_name_translations", default: {}, null: false
1075
1156
  end
1076
1157
 
1077
- create_table "user_has_roles", id: :serial, force: :cascade do |t|
1078
- t.integer "user_id", null: false
1079
- t.integer "role_id", null: false
1080
- t.datetime "created_at"
1081
- t.datetime "updated_at"
1158
+ create_table "user_has_roles", force: :cascade do |t|
1159
+ t.bigint "user_id", null: false
1160
+ t.bigint "role_id", null: false
1161
+ t.datetime "created_at", null: false
1162
+ t.datetime "updated_at", null: false
1082
1163
  t.index ["role_id"], name: "index_user_has_roles_on_role_id"
1083
1164
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1084
1165
  end
1085
1166
 
1086
- create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1167
+ create_table "user_import_file_transitions", force: :cascade do |t|
1087
1168
  t.string "to_state"
1088
1169
  t.text "metadata", default: "{}"
1089
1170
  t.integer "sort_key"
1090
- t.integer "user_import_file_id"
1091
- t.datetime "created_at"
1092
- t.datetime "updated_at"
1171
+ t.bigint "user_import_file_id"
1172
+ t.datetime "created_at", null: false
1173
+ t.datetime "updated_at", null: false
1093
1174
  t.boolean "most_recent", null: false
1094
1175
  t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1095
1176
  t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1096
1177
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1097
1178
  end
1098
1179
 
1099
- create_table "user_import_files", id: :serial, force: :cascade do |t|
1100
- t.integer "user_id"
1180
+ create_table "user_import_files", force: :cascade do |t|
1181
+ t.bigint "user_id"
1101
1182
  t.text "note"
1102
1183
  t.datetime "executed_at"
1103
1184
  t.string "user_import_file_name"
@@ -1107,20 +1188,22 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1107
1188
  t.string "user_import_fingerprint"
1108
1189
  t.string "edit_mode"
1109
1190
  t.text "error_message"
1110
- t.datetime "created_at"
1111
- t.datetime "updated_at"
1191
+ t.datetime "created_at", null: false
1192
+ t.datetime "updated_at", null: false
1112
1193
  t.string "user_encoding"
1113
- t.integer "default_library_id"
1114
- t.integer "default_user_group_id"
1194
+ t.bigint "default_library_id"
1195
+ t.bigint "default_user_group_id"
1196
+ t.index ["default_library_id"], name: "index_user_import_files_on_default_library_id"
1197
+ t.index ["default_user_group_id"], name: "index_user_import_files_on_default_user_group_id"
1115
1198
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1116
1199
  end
1117
1200
 
1118
- create_table "user_import_results", id: :serial, force: :cascade do |t|
1119
- t.integer "user_import_file_id"
1120
- t.integer "user_id"
1201
+ create_table "user_import_results", force: :cascade do |t|
1202
+ t.bigint "user_import_file_id"
1203
+ t.bigint "user_id"
1121
1204
  t.text "body"
1122
- t.datetime "created_at"
1123
- t.datetime "updated_at"
1205
+ t.datetime "created_at", null: false
1206
+ t.datetime "updated_at", null: false
1124
1207
  t.text "error_message"
1125
1208
  t.index ["user_id"], name: "index_user_import_results_on_user_id"
1126
1209
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
@@ -1140,7 +1223,6 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1140
1223
  t.datetime "created_at"
1141
1224
  t.datetime "updated_at"
1142
1225
  t.string "username"
1143
- t.datetime "deleted_at"
1144
1226
  t.datetime "expired_at"
1145
1227
  t.integer "failed_attempts", default: 0
1146
1228
  t.string "unlock_token"
@@ -1154,10 +1236,10 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1154
1236
  t.index ["username"], name: "index_users_on_username", unique: true
1155
1237
  end
1156
1238
 
1157
- create_table "withdraws", id: :serial, force: :cascade do |t|
1158
- t.integer "basket_id"
1159
- t.integer "item_id"
1160
- t.integer "librarian_id"
1239
+ create_table "withdraws", force: :cascade do |t|
1240
+ t.bigint "basket_id"
1241
+ t.bigint "item_id"
1242
+ t.bigint "librarian_id"
1161
1243
  t.datetime "created_at", null: false
1162
1244
  t.datetime "updated_at", null: false
1163
1245
  t.index ["basket_id"], name: "index_withdraws_on_basket_id"
@@ -1165,10 +1247,18 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1165
1247
  t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1166
1248
  end
1167
1249
 
1250
+ add_foreign_key "doi_records", "manifestations"
1168
1251
  add_foreign_key "events", "event_categories"
1252
+ add_foreign_key "isbn_record_and_manifestations", "isbn_records"
1253
+ add_foreign_key "isbn_record_and_manifestations", "manifestations"
1254
+ add_foreign_key "issn_record_and_manifestations", "issn_records"
1255
+ add_foreign_key "issn_record_and_manifestations", "manifestations"
1169
1256
  add_foreign_key "items", "manifestations"
1170
1257
  add_foreign_key "libraries", "library_groups"
1171
1258
  add_foreign_key "library_groups", "users"
1259
+ add_foreign_key "periodical_and_manifestations", "manifestations"
1260
+ add_foreign_key "periodical_and_manifestations", "periodicals"
1261
+ add_foreign_key "periodicals", "frequencies"
1172
1262
  add_foreign_key "profiles", "users"
1173
1263
  add_foreign_key "user_has_roles", "roles"
1174
1264
  add_foreign_key "user_has_roles", "users"