enju_seed 0.3.0.beta.3 → 0.3.0.beta.4

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