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