enju_event 0.2.3 → 0.3.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (295) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +4 -4
  3. data/app/assets/config/enju_event_manifest.js +0 -0
  4. data/app/controllers/concerns/enju_event/controller.rb +1 -1
  5. data/app/controllers/event_import_results_controller.rb +1 -1
  6. data/app/controllers/events_controller.rb +19 -19
  7. data/app/controllers/places_controller.rb +10 -10
  8. data/app/models/event.rb +3 -3
  9. data/app/models/event_export_file.rb +1 -1
  10. data/app/models/event_export_file_transition.rb +2 -2
  11. data/app/models/event_import_file.rb +3 -3
  12. data/app/models/event_import_file_transition.rb +2 -2
  13. data/app/models/event_import_result.rb +2 -2
  14. data/app/models/participate.rb +2 -2
  15. data/app/views/events/index.rss.builder +7 -7
  16. data/config/routes.rb +1 -1
  17. data/db/migrate/113_create_events.rb +1 -1
  18. data/db/migrate/114_create_event_categories.rb +2 -2
  19. data/db/migrate/20081028093607_create_event_import_files.rb +1 -1
  20. data/db/migrate/20090519203307_create_participates.rb +1 -1
  21. data/db/migrate/20100925074639_create_event_import_results.rb +1 -1
  22. data/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +1 -1
  23. data/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +1 -1
  24. data/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +1 -1
  25. data/db/migrate/20140523171309_create_event_import_file_transitions.rb +1 -1
  26. data/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +1 -1
  27. data/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
  28. data/db/migrate/20140812152348_create_event_export_files.rb +1 -1
  29. data/db/migrate/20140812153137_create_event_export_file_transitions.rb +1 -1
  30. data/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
  31. data/db/migrate/20151128142913_create_places.rb +1 -1
  32. data/db/migrate/20151201163718_add_place_id_to_event.rb +1 -1
  33. data/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +1 -1
  34. data/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +1 -1
  35. data/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +1 -1
  36. data/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +1 -1
  37. data/lib/enju_event/engine.rb +1 -0
  38. data/lib/enju_event/version.rb +1 -1
  39. data/lib/generators/enju_event/setup/setup_generator.rb +3 -3
  40. data/lib/tasks/enju_event_tasks.rake +3 -3
  41. data/spec/controllers/event_categories_controller_spec.rb +47 -47
  42. data/spec/controllers/event_export_files_controller_spec.rb +23 -23
  43. data/spec/controllers/event_import_files_controller_spec.rb +23 -24
  44. data/spec/controllers/event_import_results_controller_spec.rb +4 -5
  45. data/spec/controllers/events_controller_spec.rb +61 -54
  46. data/spec/controllers/participates_controller_spec.rb +48 -48
  47. data/spec/dummy/app/helpers/application_helper.rb +1 -1
  48. data/spec/dummy/bin/rails +1 -1
  49. data/spec/dummy/bin/setup +21 -12
  50. data/spec/dummy/bin/update +29 -0
  51. data/spec/dummy/bin/yarn +11 -0
  52. data/spec/dummy/config/application.rb +7 -18
  53. data/spec/dummy/config/boot.rb +4 -9
  54. data/spec/dummy/config/cable.yml +10 -0
  55. data/spec/dummy/config/database.yml +17 -22
  56. data/spec/dummy/config/environment.rb +4 -4
  57. data/spec/dummy/config/environments/development.rb +24 -11
  58. data/spec/dummy/config/environments/production.rb +28 -16
  59. data/spec/dummy/config/environments/test.rb +8 -7
  60. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  61. data/spec/dummy/config/initializers/assets.rb +14 -0
  62. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  63. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  64. data/spec/dummy/config/initializers/inflections.rb +9 -3
  65. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  66. data/spec/dummy/config/initializers/wrap_parameters.rb +5 -5
  67. data/spec/dummy/config/locales/en.yml +30 -2
  68. data/spec/dummy/config/puma.rb +56 -0
  69. data/spec/dummy/config/secrets.yml +32 -0
  70. data/spec/dummy/config/spring.rb +6 -0
  71. data/spec/dummy/config/sunspot.yml +23 -0
  72. data/spec/dummy/db/migrate/001_create_agents.rb +7 -7
  73. data/spec/dummy/db/migrate/002_devise_create_users.rb +6 -6
  74. data/spec/dummy/db/migrate/005_create_manifestations.rb +10 -10
  75. data/spec/dummy/db/migrate/006_create_items.rb +6 -6
  76. data/spec/dummy/db/migrate/012_create_owns.rb +3 -3
  77. data/spec/dummy/db/migrate/015_create_creates.rb +3 -3
  78. data/spec/dummy/db/migrate/032_create_checkins.rb +2 -2
  79. data/spec/dummy/db/migrate/033_create_checkouts.rb +5 -5
  80. data/spec/dummy/db/migrate/035_create_reserves.rb +6 -6
  81. data/spec/dummy/db/migrate/041_create_roles.rb +3 -3
  82. data/spec/dummy/db/migrate/047_create_produces.rb +3 -3
  83. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -1
  84. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -1
  85. data/spec/dummy/db/migrate/073_create_carrier_types.rb +2 -2
  86. data/spec/dummy/db/migrate/077_create_user_groups.rb +2 -2
  87. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  88. data/spec/dummy/db/migrate/112_create_frequencies.rb +2 -2
  89. data/spec/dummy/db/migrate/117_create_form_of_works.rb +2 -2
  90. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  91. data/spec/dummy/db/migrate/121_create_checked_items.rb +4 -4
  92. data/spec/dummy/db/migrate/124_create_bookstores.rb +2 -2
  93. data/spec/dummy/db/migrate/125_create_donates.rb +3 -3
  94. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +2 -2
  95. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +3 -3
  96. data/spec/dummy/db/migrate/130_create_request_status_types.rb +2 -2
  97. data/spec/dummy/db/migrate/131_create_request_types.rb +2 -2
  98. data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +2 -2
  99. data/spec/dummy/db/migrate/133_create_agent_merges.rb +2 -2
  100. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
  101. data/spec/dummy/db/migrate/149_create_message_templates.rb +6 -6
  102. data/spec/dummy/db/migrate/154_create_messages.rb +3 -3
  103. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +1 -1
  104. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +3 -3
  105. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +4 -4
  106. data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +2 -2
  107. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -1
  108. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  109. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +6 -6
  110. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +9 -9
  111. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +6 -6
  112. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -2
  113. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
  114. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
  115. data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +2 -2
  116. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +9 -9
  117. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +4 -4
  118. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +5 -5
  119. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +1 -1
  120. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +1 -1
  121. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +4 -4
  122. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +4 -4
  123. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +1 -1
  124. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +1 -1
  125. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +3 -3
  126. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +1 -1
  127. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +1 -1
  128. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +1 -1
  129. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +2 -2
  130. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +2 -2
  131. data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +2 -2
  132. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +7 -7
  133. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
  134. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +2 -2
  135. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +4 -4
  136. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
  137. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +1 -1
  138. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  139. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +1 -1
  140. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  141. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +1 -1
  142. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +1 -1
  143. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +1 -1
  144. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
  145. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +2 -2
  146. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
  147. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
  148. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
  149. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
  150. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +2 -2
  151. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
  152. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
  153. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +1 -1
  154. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +2 -2
  155. data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +1 -1
  156. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +1 -1
  157. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +1 -1
  158. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +1 -1
  159. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +1 -1
  160. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +1 -1
  161. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +3 -3
  162. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +4 -4
  163. data/spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +1 -1
  164. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +1 -1
  165. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +1 -1
  166. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +1 -1
  167. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +1 -1
  168. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +1 -1
  169. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +1 -1
  170. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +1 -1
  171. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +2 -2
  172. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +2 -2
  173. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  174. data/spec/dummy/db/migrate/20120125050502_add_depth_to_message.rb +1 -1
  175. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -1
  176. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  177. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -1
  178. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +2 -2
  179. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  180. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +1 -1
  181. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +1 -1
  182. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +1 -1
  183. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +1 -1
  184. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +1 -1
  185. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +1 -1
  186. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +1 -1
  187. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +1 -1
  188. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +1 -1
  189. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +1 -1
  190. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +2 -2
  191. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
  192. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
  193. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
  194. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +1 -1
  195. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +4 -4
  196. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +1 -1
  197. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +1 -1
  198. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  199. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +3 -3
  200. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +1 -1
  201. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +1 -1
  202. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +1 -1
  203. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +1 -1
  204. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +1 -1
  205. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +3 -3
  206. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +1 -1
  207. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +2 -2
  208. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +2 -2
  209. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  210. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  211. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +2 -2
  212. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +1 -1
  213. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +1 -1
  214. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
  215. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
  216. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
  217. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
  218. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
  219. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +1 -1
  220. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +1 -1
  221. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +1 -1
  222. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +1 -1
  223. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +1 -1
  224. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -1
  225. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
  226. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  227. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +1 -1
  228. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +1 -1
  229. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  230. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
  231. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +1 -1
  232. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  233. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  234. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +1 -1
  235. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +1 -1
  236. data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +1 -1
  237. data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +2 -2
  238. data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +2 -2
  239. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
  240. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +1 -1
  241. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  242. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +1 -1
  243. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +1 -1
  244. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +1 -1
  245. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +1 -1
  246. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
  247. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
  248. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +1 -1
  249. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +1 -1
  250. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  251. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  252. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  253. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
  254. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +1 -1
  255. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +1 -1
  256. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  257. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  258. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  259. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
  260. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +1 -1
  261. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +1 -1
  262. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +1 -1
  263. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +1 -1
  264. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +1 -1
  265. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  266. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  267. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  268. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  269. data/spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
  270. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +1 -1
  271. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  272. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  273. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +1 -1
  274. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  275. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  276. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  277. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  278. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  279. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
  280. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
  281. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
  282. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
  283. data/spec/dummy/db/schema.rb +856 -925
  284. data/spec/factories/agent.rb +1 -1
  285. data/spec/factories/library.rb +1 -1
  286. data/spec/factories/profile.rb +1 -1
  287. data/spec/factories/user.rb +4 -4
  288. data/spec/models/event_category_spec.rb +0 -1
  289. data/spec/models/event_export_file_spec.rb +2 -3
  290. data/spec/models/event_import_file_spec.rb +32 -18
  291. data/spec/models/event_import_result_spec.rb +0 -1
  292. data/spec/models/event_spec.rb +0 -1
  293. data/spec/models/participate_spec.rb +0 -1
  294. data/spec/rails_helper.rb +1 -15
  295. metadata +52 -29
@@ -1,4 +1,4 @@
1
- class AddFullNameTranscriptionToProfile < ActiveRecord::Migration
1
+ class AddFullNameTranscriptionToProfile < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :profiles, :full_name_transcription, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDateOfBirthToProfile < ActiveRecord::Migration
1
+ class AddDateOfBirthToProfile < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :profiles, :date_of_birth, :datetime
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddShelfIdToCheckout < ActiveRecord::Migration
1
+ class AddShelfIdToCheckout < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :checkouts, :shelf_id, :integer
4
4
  add_index :checkouts, :shelf_id
@@ -1,4 +1,4 @@
1
- class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration
1
+ class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_foreign_key :items, :manifestations
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddSettingsToLibraryGroup < ActiveRecord::Migration
1
+ class AddSettingsToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :settings, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddErrorMessageToUserImportResult < ActiveRecord::Migration
1
+ class AddErrorMessageToUserImportResult < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :user_import_results, :error_message, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateWithdraws < ActiveRecord::Migration
1
+ class CreateWithdraws < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :withdraws do |t|
4
4
  t.references :basket, index: true
@@ -1,4 +1,4 @@
1
- class AddProfileIdToAgent < ActiveRecord::Migration
1
+ class AddProfileIdToAgent < ActiveRecord::Migration[4.2]
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[4.2]
3
3
  def up
4
4
  if defined?(Globalize)
5
5
  LibraryGroup.create_translation_table!({
@@ -1,5 +1,5 @@
1
1
  # This migration comes from enju_library_engine (originally 20151213072705)
2
- class AddFooterBannerToLibraryGroup < ActiveRecord::Migration
2
+ class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[4.2]
3
3
  def up
4
4
  if defined?(Globalize)
5
5
  LibraryGroup.add_translation_fields! footer_banner: :text
@@ -1,4 +1,4 @@
1
- class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration
1
+ class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :html_snippet, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :user_import_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :user_export_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToMessageTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToMessageTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :message_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :import_request_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :resource_import_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :resource_export_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :agent_import_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddPictureWidthToPictureFile < ActiveRecord::Migration
1
+ class AddPictureWidthToPictureFile < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :picture_files, :picture_width, :integer
4
4
  add_column :picture_files, :picture_height, :integer
@@ -1,4 +1,4 @@
1
- class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration
1
+ class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :max_number_of_results, :integer, default: 500
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration
1
+ class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :family_name_first, :boolean, default: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration
1
+ class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :pub_year_facet_range_interval, :integer, default: 10
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddUserIdToLibraryGroup < ActiveRecord::Migration
1
+ class AddUserIdToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_reference :library_groups, :user, index: true, foreign_key: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration
1
+ class AddMostRecentToMessageRequestTransitions < ActiveRecord::Migration[4.2]
2
2
  def up
3
3
  add_column :message_request_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddAttachmentAttachmentToCarrierTypes < ActiveRecord::Migration
1
+ class AddAttachmentAttachmentToCarrierTypes < ActiveRecord::Migration[4.2]
2
2
  def self.up
3
3
  change_table :carrier_types do |t|
4
4
  t.attachment :attachment
@@ -1,4 +1,4 @@
1
- class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration
1
+ class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :csv_charset_conversion, :boolean, null: false, default: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration
1
+ class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_attachment :library_groups, :header_logo
4
4
  end
@@ -1,4 +1,4 @@
1
- class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration
1
+ class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  change_column_null :items, :manifestation_id, false
4
4
  end
@@ -1,4 +1,4 @@
1
- class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration
1
+ class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  rename_column :library_groups, :login_banner, :old_login_banner
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration
1
+ class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_foreign_key :libraries, :library_groups, null: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration
1
+ class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :library_groups, :header_logo_meta, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration
1
+ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration
1
+ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration
1
+ class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration
1
+ class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration
1
+ class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration
1
+ class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration[4.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -14,1141 +13,1086 @@
14
13
  ActiveRecord::Schema.define(version: 20180107164617) do
15
14
 
16
15
  create_table "accepts", force: :cascade do |t|
17
- t.integer "basket_id"
18
- t.integer "item_id"
19
- t.integer "librarian_id"
16
+ t.integer "basket_id"
17
+ t.integer "item_id"
18
+ t.integer "librarian_id"
20
19
  t.datetime "created_at"
21
20
  t.datetime "updated_at"
21
+ t.index ["basket_id"], name: "index_accepts_on_basket_id"
22
+ t.index ["item_id"], name: "index_accepts_on_item_id"
23
+ t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
22
24
  end
23
25
 
24
- add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
25
- add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
26
-
27
26
  create_table "agent_import_file_transitions", force: :cascade do |t|
28
- t.string "to_state"
29
- t.text "metadata", default: "{}"
30
- t.integer "sort_key"
31
- t.integer "agent_import_file_id"
27
+ t.string "to_state"
28
+ t.text "metadata", default: "{}"
29
+ t.integer "sort_key"
30
+ t.integer "agent_import_file_id"
32
31
  t.datetime "created_at"
33
32
  t.datetime "updated_at"
34
- t.boolean "most_recent", null: false
33
+ t.boolean "most_recent", null: false
34
+ t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
35
+ t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
36
+ t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
35
37
  end
36
38
 
37
- add_index "agent_import_file_transitions", ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true
38
- add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
39
- add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
40
-
41
39
  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"
40
+ t.integer "parent_id"
41
+ t.string "content_type"
42
+ t.integer "size"
43
+ t.integer "user_id"
44
+ t.text "note"
47
45
  t.datetime "executed_at"
48
- t.string "agent_import_file_name"
49
- t.string "agent_import_content_type"
50
- t.integer "agent_import_file_size"
46
+ t.string "agent_import_file_name"
47
+ t.string "agent_import_content_type"
48
+ t.integer "agent_import_file_size"
51
49
  t.datetime "agent_import_updated_at"
52
50
  t.datetime "created_at"
53
51
  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"
52
+ t.string "agent_import_fingerprint"
53
+ t.text "error_message"
54
+ t.string "edit_mode"
55
+ t.string "user_encoding"
56
+ t.index ["parent_id"], name: "index_agent_import_files_on_parent_id"
57
+ t.index ["user_id"], name: "index_agent_import_files_on_user_id"
58
58
  end
59
59
 
60
- add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
61
- add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
62
-
63
60
  create_table "agent_import_results", force: :cascade do |t|
64
- t.integer "agent_import_file_id"
65
- t.integer "agent_id"
66
- t.text "body"
61
+ t.integer "agent_import_file_id"
62
+ t.integer "agent_id"
63
+ t.text "body"
67
64
  t.datetime "created_at"
68
65
  t.datetime "updated_at"
69
66
  end
70
67
 
71
68
  create_table "agent_merge_lists", force: :cascade do |t|
72
- t.string "title"
69
+ t.string "title"
73
70
  t.datetime "created_at"
74
71
  t.datetime "updated_at"
75
72
  end
76
73
 
77
74
  create_table "agent_merges", force: :cascade do |t|
78
- t.integer "agent_id", null: false
79
- t.integer "agent_merge_list_id", null: false
75
+ t.integer "agent_id", null: false
76
+ t.integer "agent_merge_list_id", null: false
80
77
  t.datetime "created_at"
81
78
  t.datetime "updated_at"
79
+ t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
80
+ t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
82
81
  end
83
82
 
84
- add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
85
- add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
86
-
87
83
  create_table "agent_relationship_types", force: :cascade do |t|
88
- t.string "name", null: false
89
- t.text "display_name"
90
- t.text "note"
91
- t.integer "position"
84
+ t.string "name", null: false
85
+ t.text "display_name"
86
+ t.text "note"
87
+ t.integer "position"
92
88
  t.datetime "created_at"
93
89
  t.datetime "updated_at"
94
90
  end
95
91
 
96
92
  create_table "agent_relationships", force: :cascade do |t|
97
- t.integer "parent_id"
98
- t.integer "child_id"
99
- t.integer "agent_relationship_type_id"
93
+ t.integer "parent_id"
94
+ t.integer "child_id"
95
+ t.integer "agent_relationship_type_id"
100
96
  t.datetime "created_at"
101
97
  t.datetime "updated_at"
102
- t.integer "position"
98
+ t.integer "position"
99
+ t.index ["child_id"], name: "index_agent_relationships_on_child_id"
100
+ t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
103
101
  end
104
102
 
105
- add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
106
- add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
107
-
108
103
  create_table "agent_types", force: :cascade do |t|
109
- t.string "name", null: false
110
- t.text "display_name"
111
- t.text "note"
112
- t.integer "position"
104
+ t.string "name", null: false
105
+ t.text "display_name"
106
+ t.text "note"
107
+ t.integer "position"
113
108
  t.datetime "created_at"
114
109
  t.datetime "updated_at"
115
110
  end
116
111
 
117
112
  create_table "agents", force: :cascade do |t|
118
- t.string "last_name"
119
- t.string "middle_name"
120
- t.string "first_name"
121
- t.string "last_name_transcription"
122
- t.string "middle_name_transcription"
123
- t.string "first_name_transcription"
124
- t.string "corporate_name"
125
- t.string "corporate_name_transcription"
126
- t.string "full_name"
127
- t.text "full_name_transcription"
128
- t.text "full_name_alternative"
113
+ t.string "last_name"
114
+ t.string "middle_name"
115
+ t.string "first_name"
116
+ t.string "last_name_transcription"
117
+ t.string "middle_name_transcription"
118
+ t.string "first_name_transcription"
119
+ t.string "corporate_name"
120
+ t.string "corporate_name_transcription"
121
+ t.string "full_name"
122
+ t.text "full_name_transcription"
123
+ t.text "full_name_alternative"
129
124
  t.datetime "created_at"
130
125
  t.datetime "updated_at"
131
126
  t.datetime "deleted_at"
132
- t.string "zip_code_1"
133
- t.string "zip_code_2"
134
- t.text "address_1"
135
- t.text "address_2"
136
- t.text "address_1_note"
137
- t.text "address_2_note"
138
- t.string "telephone_number_1"
139
- t.string "telephone_number_2"
140
- t.string "fax_number_1"
141
- t.string "fax_number_2"
142
- t.text "other_designation"
143
- t.text "place"
144
- t.string "postal_code"
145
- t.text "street"
146
- t.text "locality"
147
- t.text "region"
127
+ t.string "zip_code_1"
128
+ t.string "zip_code_2"
129
+ t.text "address_1"
130
+ t.text "address_2"
131
+ t.text "address_1_note"
132
+ t.text "address_2_note"
133
+ t.string "telephone_number_1"
134
+ t.string "telephone_number_2"
135
+ t.string "fax_number_1"
136
+ t.string "fax_number_2"
137
+ t.text "other_designation"
138
+ t.text "place"
139
+ t.string "postal_code"
140
+ t.text "street"
141
+ t.text "locality"
142
+ t.text "region"
148
143
  t.datetime "date_of_birth"
149
144
  t.datetime "date_of_death"
150
- t.integer "language_id", default: 1, null: false
151
- t.integer "country_id", default: 1, null: false
152
- t.integer "agent_type_id", default: 1, null: false
153
- t.integer "lock_version", default: 0, null: false
154
- t.text "note"
155
- t.integer "required_role_id", default: 1, null: false
156
- t.integer "required_score", default: 0, null: false
157
- t.text "email"
158
- t.text "url"
159
- t.text "full_name_alternative_transcription"
160
- t.string "birth_date"
161
- t.string "death_date"
162
- t.string "agent_identifier"
163
- t.integer "profile_id"
164
- end
165
-
166
- add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
167
- add_index "agents", ["country_id"], name: "index_agents_on_country_id"
168
- add_index "agents", ["full_name"], name: "index_agents_on_full_name"
169
- add_index "agents", ["language_id"], name: "index_agents_on_language_id"
170
- add_index "agents", ["profile_id"], name: "index_agents_on_profile_id"
171
- add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
145
+ t.integer "language_id", default: 1, null: false
146
+ t.integer "country_id", default: 1, null: false
147
+ t.integer "agent_type_id", default: 1, null: false
148
+ t.integer "lock_version", default: 0, null: false
149
+ t.text "note"
150
+ t.integer "required_role_id", default: 1, null: false
151
+ t.integer "required_score", default: 0, null: false
152
+ t.text "email"
153
+ t.text "url"
154
+ t.text "full_name_alternative_transcription"
155
+ t.string "birth_date"
156
+ t.string "death_date"
157
+ t.string "agent_identifier"
158
+ t.integer "profile_id"
159
+ t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
160
+ t.index ["country_id"], name: "index_agents_on_country_id"
161
+ t.index ["full_name"], name: "index_agents_on_full_name"
162
+ t.index ["language_id"], name: "index_agents_on_language_id"
163
+ t.index ["profile_id"], name: "index_agents_on_profile_id"
164
+ t.index ["required_role_id"], name: "index_agents_on_required_role_id"
165
+ end
172
166
 
173
167
  create_table "baskets", force: :cascade do |t|
174
- t.integer "user_id"
175
- t.text "note"
176
- t.integer "lock_version", default: 0, null: false
168
+ t.integer "user_id"
169
+ t.text "note"
170
+ t.integer "lock_version", default: 0, null: false
177
171
  t.datetime "created_at"
178
172
  t.datetime "updated_at"
173
+ t.index ["user_id"], name: "index_baskets_on_user_id"
179
174
  end
180
175
 
181
- add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
182
-
183
176
  create_table "bookstores", force: :cascade do |t|
184
- t.text "name", null: false
185
- t.string "zip_code"
186
- t.text "address"
187
- t.text "note"
188
- t.string "telephone_number"
189
- t.string "fax_number"
190
- t.string "url"
191
- t.integer "position"
177
+ t.text "name", null: false
178
+ t.string "zip_code"
179
+ t.text "address"
180
+ t.text "note"
181
+ t.string "telephone_number"
182
+ t.string "fax_number"
183
+ t.string "url"
184
+ t.integer "position"
192
185
  t.datetime "deleted_at"
193
186
  t.datetime "created_at"
194
187
  t.datetime "updated_at"
195
188
  end
196
189
 
197
190
  create_table "budget_types", force: :cascade do |t|
198
- t.string "name"
199
- t.text "display_name"
200
- t.text "note"
201
- t.integer "position"
191
+ t.string "name"
192
+ t.text "display_name"
193
+ t.text "note"
194
+ t.integer "position"
202
195
  t.datetime "created_at"
203
196
  t.datetime "updated_at"
204
197
  end
205
198
 
206
199
  create_table "carrier_type_has_checkout_types", force: :cascade do |t|
207
- t.integer "carrier_type_id", null: false
208
- t.integer "checkout_type_id", null: false
209
- t.text "note"
210
- t.integer "position"
200
+ t.integer "carrier_type_id", null: false
201
+ t.integer "checkout_type_id", null: false
202
+ t.text "note"
203
+ t.integer "position"
211
204
  t.datetime "created_at"
212
205
  t.datetime "updated_at"
206
+ t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
207
+ t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
213
208
  end
214
209
 
215
- add_index "carrier_type_has_checkout_types", ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
216
- add_index "carrier_type_has_checkout_types", ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
217
-
218
210
  create_table "carrier_types", force: :cascade do |t|
219
- t.string "name", null: false
220
- t.text "display_name"
221
- t.text "note"
222
- t.integer "position"
211
+ t.string "name", null: false
212
+ t.text "display_name"
213
+ t.text "note"
214
+ t.integer "position"
223
215
  t.datetime "created_at"
224
216
  t.datetime "updated_at"
225
- t.string "attachment_file_name"
226
- t.string "attachment_content_type"
227
- t.integer "attachment_file_size"
217
+ t.string "attachment_file_name"
218
+ t.string "attachment_content_type"
219
+ t.integer "attachment_file_size"
228
220
  t.datetime "attachment_updated_at"
229
221
  end
230
222
 
231
223
  create_table "checked_items", force: :cascade do |t|
232
- t.integer "item_id", null: false
233
- t.integer "basket_id", null: false
234
- t.datetime "due_date", null: false
224
+ t.integer "item_id", null: false
225
+ t.integer "basket_id", null: false
226
+ t.datetime "due_date", null: false
235
227
  t.datetime "created_at"
236
228
  t.datetime "updated_at"
237
- t.integer "librarian_id"
229
+ t.integer "librarian_id"
230
+ t.index ["basket_id"], name: "index_checked_items_on_basket_id"
231
+ t.index ["item_id"], name: "index_checked_items_on_item_id"
238
232
  end
239
233
 
240
- add_index "checked_items", ["basket_id"], name: "index_checked_items_on_basket_id"
241
- add_index "checked_items", ["item_id"], name: "index_checked_items_on_item_id"
242
-
243
234
  create_table "checkins", force: :cascade do |t|
244
- t.integer "item_id", null: false
245
- t.integer "librarian_id"
246
- t.integer "basket_id"
235
+ t.integer "item_id", null: false
236
+ t.integer "librarian_id"
237
+ t.integer "basket_id"
247
238
  t.datetime "created_at"
248
239
  t.datetime "updated_at"
249
- t.integer "lock_version", default: 0, null: false
240
+ t.integer "lock_version", default: 0, null: false
241
+ t.index ["basket_id"], name: "index_checkins_on_basket_id"
242
+ t.index ["item_id"], name: "index_checkins_on_item_id"
243
+ t.index ["librarian_id"], name: "index_checkins_on_librarian_id"
250
244
  end
251
245
 
252
- add_index "checkins", ["basket_id"], name: "index_checkins_on_basket_id"
253
- add_index "checkins", ["item_id"], name: "index_checkins_on_item_id"
254
- add_index "checkins", ["librarian_id"], name: "index_checkins_on_librarian_id"
255
-
256
246
  create_table "checkout_stat_has_manifestations", force: :cascade do |t|
257
- t.integer "manifestation_checkout_stat_id", null: false
258
- t.integer "manifestation_id", null: false
259
- t.integer "checkouts_count"
247
+ t.integer "manifestation_checkout_stat_id", null: false
248
+ t.integer "manifestation_id", null: false
249
+ t.integer "checkouts_count"
260
250
  t.datetime "created_at"
261
251
  t.datetime "updated_at"
252
+ t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
253
+ t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
262
254
  end
263
255
 
264
- add_index "checkout_stat_has_manifestations", ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
265
- add_index "checkout_stat_has_manifestations", ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
266
-
267
256
  create_table "checkout_stat_has_users", force: :cascade do |t|
268
- t.integer "user_checkout_stat_id", null: false
269
- t.integer "user_id", null: false
270
- t.integer "checkouts_count", default: 0, null: false
257
+ t.integer "user_checkout_stat_id", null: false
258
+ t.integer "user_id", null: false
259
+ t.integer "checkouts_count", default: 0, null: false
271
260
  t.datetime "created_at"
272
261
  t.datetime "updated_at"
262
+ t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
263
+ t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
273
264
  end
274
265
 
275
- add_index "checkout_stat_has_users", ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
276
- add_index "checkout_stat_has_users", ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
277
-
278
266
  create_table "checkout_types", force: :cascade do |t|
279
- t.string "name", null: false
280
- t.text "display_name"
281
- t.text "note"
282
- t.integer "position"
267
+ t.string "name", null: false
268
+ t.text "display_name"
269
+ t.text "note"
270
+ t.integer "position"
283
271
  t.datetime "created_at"
284
272
  t.datetime "updated_at"
273
+ t.index ["name"], name: "index_checkout_types_on_name"
285
274
  end
286
275
 
287
- add_index "checkout_types", ["name"], name: "index_checkout_types_on_name"
288
-
289
276
  create_table "checkouts", force: :cascade do |t|
290
- t.integer "user_id"
291
- t.integer "item_id", null: false
292
- t.integer "checkin_id"
293
- t.integer "librarian_id"
294
- t.integer "basket_id"
277
+ t.integer "user_id"
278
+ t.integer "item_id", null: false
279
+ t.integer "checkin_id"
280
+ t.integer "librarian_id"
281
+ t.integer "basket_id"
295
282
  t.datetime "due_date"
296
- t.integer "checkout_renewal_count", default: 0, null: false
297
- t.integer "lock_version", default: 0, null: false
283
+ t.integer "checkout_renewal_count", default: 0, null: false
284
+ t.integer "lock_version", default: 0, null: false
298
285
  t.datetime "created_at"
299
286
  t.datetime "updated_at"
300
- t.integer "shelf_id"
287
+ t.integer "shelf_id"
288
+ t.index ["basket_id"], name: "index_checkouts_on_basket_id"
289
+ t.index ["checkin_id"], name: "index_checkouts_on_checkin_id"
290
+ t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
291
+ t.index ["item_id"], name: "index_checkouts_on_item_id"
292
+ t.index ["librarian_id"], name: "index_checkouts_on_librarian_id"
293
+ t.index ["shelf_id"], name: "index_checkouts_on_shelf_id"
294
+ t.index ["user_id"], name: "index_checkouts_on_user_id"
301
295
  end
302
296
 
303
- add_index "checkouts", ["basket_id"], name: "index_checkouts_on_basket_id"
304
- add_index "checkouts", ["checkin_id"], name: "index_checkouts_on_checkin_id"
305
- add_index "checkouts", ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
306
- add_index "checkouts", ["item_id"], name: "index_checkouts_on_item_id"
307
- add_index "checkouts", ["librarian_id"], name: "index_checkouts_on_librarian_id"
308
- add_index "checkouts", ["shelf_id"], name: "index_checkouts_on_shelf_id"
309
- add_index "checkouts", ["user_id"], name: "index_checkouts_on_user_id"
310
-
311
297
  create_table "circulation_statuses", force: :cascade do |t|
312
- t.string "name", null: false
313
- t.text "display_name"
314
- t.text "note"
315
- t.integer "position"
298
+ t.string "name", null: false
299
+ t.text "display_name"
300
+ t.text "note"
301
+ t.integer "position"
316
302
  t.datetime "created_at"
317
303
  t.datetime "updated_at"
318
304
  end
319
305
 
320
306
  create_table "colors", force: :cascade do |t|
321
- t.integer "library_group_id"
322
- t.string "property"
323
- t.string "code"
324
- t.integer "position"
307
+ t.integer "library_group_id"
308
+ t.string "property"
309
+ t.string "code"
310
+ t.integer "position"
325
311
  t.datetime "created_at"
326
312
  t.datetime "updated_at"
313
+ t.index ["library_group_id"], name: "index_colors_on_library_group_id"
327
314
  end
328
315
 
329
- add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
330
-
331
316
  create_table "content_types", force: :cascade do |t|
332
- t.string "name", null: false
333
- t.text "display_name"
334
- t.text "note"
335
- t.integer "position"
317
+ t.string "name", null: false
318
+ t.text "display_name"
319
+ t.text "note"
320
+ t.integer "position"
336
321
  t.datetime "created_at"
337
322
  t.datetime "updated_at"
338
323
  end
339
324
 
340
325
  create_table "countries", force: :cascade do |t|
341
- t.string "name", null: false
342
- t.text "display_name"
343
- t.string "alpha_2"
344
- t.string "alpha_3"
345
- t.string "numeric_3"
346
- t.text "note"
326
+ t.string "name", null: false
327
+ t.text "display_name"
328
+ t.string "alpha_2"
329
+ t.string "alpha_3"
330
+ t.string "numeric_3"
331
+ t.text "note"
347
332
  t.integer "position"
333
+ t.index ["alpha_2"], name: "index_countries_on_alpha_2"
334
+ t.index ["alpha_3"], name: "index_countries_on_alpha_3"
335
+ t.index ["name"], name: "index_countries_on_name"
336
+ t.index ["numeric_3"], name: "index_countries_on_numeric_3"
348
337
  end
349
338
 
350
- add_index "countries", ["alpha_2"], name: "index_countries_on_alpha_2"
351
- add_index "countries", ["alpha_3"], name: "index_countries_on_alpha_3"
352
- add_index "countries", ["name"], name: "index_countries_on_name"
353
- add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
354
-
355
339
  create_table "create_types", force: :cascade do |t|
356
- t.string "name"
357
- t.text "display_name"
358
- t.text "note"
359
- t.integer "position"
340
+ t.string "name"
341
+ t.text "display_name"
342
+ t.text "note"
343
+ t.integer "position"
360
344
  t.datetime "created_at"
361
345
  t.datetime "updated_at"
362
346
  end
363
347
 
364
348
  create_table "creates", force: :cascade do |t|
365
- t.integer "agent_id", null: false
366
- t.integer "work_id", null: false
367
- t.integer "position"
349
+ t.integer "agent_id", null: false
350
+ t.integer "work_id", null: false
351
+ t.integer "position"
368
352
  t.datetime "created_at"
369
353
  t.datetime "updated_at"
370
- t.integer "create_type_id"
354
+ t.integer "create_type_id"
355
+ t.index ["agent_id"], name: "index_creates_on_agent_id"
356
+ t.index ["work_id"], name: "index_creates_on_work_id"
371
357
  end
372
358
 
373
- add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
374
- add_index "creates", ["work_id"], name: "index_creates_on_work_id"
375
-
376
359
  create_table "donates", force: :cascade do |t|
377
- t.integer "agent_id", null: false
378
- t.integer "item_id", null: false
360
+ t.integer "agent_id", null: false
361
+ t.integer "item_id", null: false
379
362
  t.datetime "created_at"
380
363
  t.datetime "updated_at"
364
+ t.index ["agent_id"], name: "index_donates_on_agent_id"
365
+ t.index ["item_id"], name: "index_donates_on_item_id"
381
366
  end
382
367
 
383
- add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
384
- add_index "donates", ["item_id"], name: "index_donates_on_item_id"
385
-
386
368
  create_table "event_categories", force: :cascade do |t|
387
- t.string "name", null: false
388
- t.text "display_name"
389
- t.text "note"
390
- t.integer "position"
369
+ t.string "name", null: false
370
+ t.text "display_name"
371
+ t.text "note"
372
+ t.integer "position"
391
373
  t.datetime "created_at"
392
374
  t.datetime "updated_at"
393
375
  end
394
376
 
395
377
  create_table "event_export_file_transitions", force: :cascade do |t|
396
- t.string "to_state"
397
- t.text "metadata", default: "{}"
398
- t.integer "sort_key"
399
- t.integer "event_export_file_id"
378
+ t.string "to_state"
379
+ t.text "metadata", default: "{}"
380
+ t.integer "sort_key"
381
+ t.integer "event_export_file_id"
400
382
  t.datetime "created_at"
401
383
  t.datetime "updated_at"
402
- t.boolean "most_recent", null: false
384
+ t.boolean "most_recent", null: false
385
+ t.index ["event_export_file_id", "most_recent"], name: "index_event_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
386
+ t.index ["event_export_file_id"], name: "index_event_export_file_transitions_on_file_id"
387
+ t.index ["sort_key", "event_export_file_id"], name: "index_event_export_file_transitions_on_sort_key_and_file_id", unique: true
403
388
  end
404
389
 
405
- add_index "event_export_file_transitions", ["event_export_file_id", "most_recent"], name: "index_event_export_file_transitions_parent_most_recent", unique: true
406
- add_index "event_export_file_transitions", ["event_export_file_id"], name: "index_event_export_file_transitions_on_file_id"
407
- add_index "event_export_file_transitions", ["sort_key", "event_export_file_id"], name: "index_event_export_file_transitions_on_sort_key_and_file_id", unique: true
408
-
409
390
  create_table "event_export_files", force: :cascade do |t|
410
- t.integer "user_id"
411
- t.string "event_export_file_name"
412
- t.string "event_export_content_type"
413
- t.integer "event_export_file_size"
391
+ t.integer "user_id"
392
+ t.string "event_export_file_name"
393
+ t.string "event_export_content_type"
394
+ t.integer "event_export_file_size"
414
395
  t.datetime "event_export_updated_at"
415
396
  t.datetime "executed_at"
416
397
  t.datetime "created_at"
417
398
  t.datetime "updated_at"
399
+ t.index ["user_id"], name: "index_event_export_files_on_user_id"
418
400
  end
419
401
 
420
- add_index "event_export_files", ["user_id"], name: "index_event_export_files_on_user_id"
421
-
422
402
  create_table "event_import_file_transitions", force: :cascade do |t|
423
- t.string "to_state"
424
- t.text "metadata", default: "{}"
425
- t.integer "sort_key"
426
- t.integer "event_import_file_id"
403
+ t.string "to_state"
404
+ t.text "metadata", default: "{}"
405
+ t.integer "sort_key"
406
+ t.integer "event_import_file_id"
427
407
  t.datetime "created_at"
428
408
  t.datetime "updated_at"
429
- t.boolean "most_recent", null: false
409
+ t.boolean "most_recent", null: false
410
+ t.index ["event_import_file_id", "most_recent"], name: "index_event_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
411
+ t.index ["event_import_file_id"], name: "index_event_import_file_transitions_on_event_import_file_id"
412
+ t.index ["sort_key", "event_import_file_id"], name: "index_event_import_file_transitions_on_sort_key_and_file_id", unique: true
430
413
  end
431
414
 
432
- add_index "event_import_file_transitions", ["event_import_file_id", "most_recent"], name: "index_event_import_file_transitions_parent_most_recent", unique: true
433
- add_index "event_import_file_transitions", ["event_import_file_id"], name: "index_event_import_file_transitions_on_event_import_file_id"
434
- add_index "event_import_file_transitions", ["sort_key", "event_import_file_id"], name: "index_event_import_file_transitions_on_sort_key_and_file_id", unique: true
435
-
436
415
  create_table "event_import_files", force: :cascade do |t|
437
- t.integer "parent_id"
438
- t.string "content_type"
439
- t.integer "size"
440
- t.integer "user_id"
441
- t.text "note"
416
+ t.integer "parent_id"
417
+ t.string "content_type"
418
+ t.integer "size"
419
+ t.integer "user_id"
420
+ t.text "note"
442
421
  t.datetime "executed_at"
443
- t.string "event_import_file_name"
444
- t.string "event_import_content_type"
445
- t.integer "event_import_file_size"
422
+ t.string "event_import_file_name"
423
+ t.string "event_import_content_type"
424
+ t.integer "event_import_file_size"
446
425
  t.datetime "event_import_updated_at"
447
- t.string "edit_mode"
426
+ t.string "edit_mode"
448
427
  t.datetime "created_at"
449
428
  t.datetime "updated_at"
450
- t.string "event_import_fingerprint"
451
- t.text "error_message"
452
- t.string "user_encoding"
453
- t.integer "default_library_id"
454
- t.integer "default_event_category_id"
429
+ t.string "event_import_fingerprint"
430
+ t.text "error_message"
431
+ t.string "user_encoding"
432
+ t.integer "default_library_id"
433
+ t.integer "default_event_category_id"
434
+ t.index ["parent_id"], name: "index_event_import_files_on_parent_id"
435
+ t.index ["user_id"], name: "index_event_import_files_on_user_id"
455
436
  end
456
437
 
457
- add_index "event_import_files", ["parent_id"], name: "index_event_import_files_on_parent_id"
458
- add_index "event_import_files", ["user_id"], name: "index_event_import_files_on_user_id"
459
-
460
438
  create_table "event_import_results", force: :cascade do |t|
461
- t.integer "event_import_file_id"
462
- t.integer "event_id"
463
- t.text "body"
439
+ t.integer "event_import_file_id"
440
+ t.integer "event_id"
441
+ t.text "body"
464
442
  t.datetime "created_at"
465
443
  t.datetime "updated_at"
466
444
  end
467
445
 
468
446
  create_table "events", force: :cascade do |t|
469
- t.integer "library_id", null: false
470
- t.integer "event_category_id", null: false
471
- t.string "name"
472
- t.text "note"
447
+ t.integer "library_id", null: false
448
+ t.integer "event_category_id", null: false
449
+ t.string "name"
450
+ t.text "note"
473
451
  t.datetime "start_at"
474
452
  t.datetime "end_at"
475
- t.boolean "all_day", default: false, null: false
453
+ t.boolean "all_day", default: false, null: false
476
454
  t.datetime "deleted_at"
477
- t.text "display_name"
455
+ t.text "display_name"
478
456
  t.datetime "created_at"
479
457
  t.datetime "updated_at"
480
- t.integer "place_id"
458
+ t.integer "place_id"
459
+ t.index ["event_category_id"], name: "index_events_on_event_category_id"
460
+ t.index ["library_id"], name: "index_events_on_library_id"
461
+ t.index ["place_id"], name: "index_events_on_place_id"
481
462
  end
482
463
 
483
- add_index "events", ["event_category_id"], name: "index_events_on_event_category_id"
484
- add_index "events", ["library_id"], name: "index_events_on_library_id"
485
- add_index "events", ["place_id"], name: "index_events_on_place_id"
486
-
487
464
  create_table "exemplifies", force: :cascade do |t|
488
- t.integer "manifestation_id", null: false
489
- t.integer "item_id", null: false
490
- t.integer "position"
465
+ t.integer "manifestation_id", null: false
466
+ t.integer "item_id", null: false
467
+ t.integer "position"
491
468
  t.datetime "created_at"
492
469
  t.datetime "updated_at"
470
+ t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true
471
+ t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
493
472
  end
494
473
 
495
- add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
496
- add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
497
-
498
474
  create_table "form_of_works", force: :cascade do |t|
499
- t.string "name", null: false
500
- t.text "display_name"
501
- t.text "note"
502
- t.integer "position"
475
+ t.string "name", null: false
476
+ t.text "display_name"
477
+ t.text "note"
478
+ t.integer "position"
503
479
  t.datetime "created_at"
504
480
  t.datetime "updated_at"
505
481
  end
506
482
 
507
483
  create_table "frequencies", force: :cascade do |t|
508
- t.string "name", null: false
509
- t.text "display_name"
510
- t.text "note"
511
- t.integer "position"
484
+ t.string "name", null: false
485
+ t.text "display_name"
486
+ t.text "note"
487
+ t.integer "position"
512
488
  t.datetime "created_at"
513
489
  t.datetime "updated_at"
514
490
  end
515
491
 
516
492
  create_table "identifier_types", force: :cascade do |t|
517
- t.string "name"
518
- t.text "display_name"
519
- t.text "note"
520
- t.integer "position"
493
+ t.string "name"
494
+ t.text "display_name"
495
+ t.text "note"
496
+ t.integer "position"
521
497
  t.datetime "created_at"
522
498
  t.datetime "updated_at"
523
499
  end
524
500
 
525
501
  create_table "identifiers", force: :cascade do |t|
526
- t.string "body", null: false
527
- t.integer "identifier_type_id", null: false
528
- t.integer "manifestation_id"
529
- t.boolean "primary"
530
- t.integer "position"
502
+ t.string "body", null: false
503
+ t.integer "identifier_type_id", null: false
504
+ t.integer "manifestation_id"
505
+ t.boolean "primary"
506
+ t.integer "position"
531
507
  t.datetime "created_at"
532
508
  t.datetime "updated_at"
509
+ t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
510
+ t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
533
511
  end
534
512
 
535
- add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
536
- add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
537
-
538
513
  create_table "import_request_transitions", force: :cascade do |t|
539
- t.string "to_state"
540
- t.text "metadata", default: "{}"
541
- t.integer "sort_key"
542
- t.integer "import_request_id"
514
+ t.string "to_state"
515
+ t.text "metadata", default: "{}"
516
+ t.integer "sort_key"
517
+ t.integer "import_request_id"
543
518
  t.datetime "created_at"
544
519
  t.datetime "updated_at"
545
- t.boolean "most_recent", null: false
520
+ t.boolean "most_recent", null: false
521
+ t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
522
+ t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
523
+ t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
546
524
  end
547
525
 
548
- add_index "import_request_transitions", ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true
549
- add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
550
- add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
551
-
552
526
  create_table "import_requests", force: :cascade do |t|
553
- t.string "isbn"
554
- t.integer "manifestation_id"
555
- t.integer "user_id"
527
+ t.string "isbn"
528
+ t.integer "manifestation_id"
529
+ t.integer "user_id"
556
530
  t.datetime "created_at"
557
531
  t.datetime "updated_at"
532
+ t.index ["isbn"], name: "index_import_requests_on_isbn"
533
+ t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
534
+ t.index ["user_id"], name: "index_import_requests_on_user_id"
558
535
  end
559
536
 
560
- add_index "import_requests", ["isbn"], name: "index_import_requests_on_isbn"
561
- add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
562
- add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
563
-
564
537
  create_table "item_has_use_restrictions", force: :cascade do |t|
565
- t.integer "item_id", null: false
566
- t.integer "use_restriction_id", null: false
538
+ t.integer "item_id", null: false
539
+ t.integer "use_restriction_id", null: false
567
540
  t.datetime "created_at"
568
541
  t.datetime "updated_at"
542
+ t.index ["item_id"], name: "index_item_has_use_restrictions_on_item_id"
543
+ t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
569
544
  end
570
545
 
571
- add_index "item_has_use_restrictions", ["item_id"], name: "index_item_has_use_restrictions_on_item_id"
572
- add_index "item_has_use_restrictions", ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
573
-
574
546
  create_table "items", force: :cascade do |t|
575
- t.string "call_number"
576
- t.string "item_identifier"
547
+ t.string "call_number"
548
+ t.string "item_identifier"
577
549
  t.datetime "created_at"
578
550
  t.datetime "updated_at"
579
551
  t.datetime "deleted_at"
580
- t.integer "shelf_id", default: 1, null: false
581
- t.boolean "include_supplements", default: false, null: false
582
- t.text "note"
583
- t.string "url"
584
- t.integer "price"
585
- t.integer "lock_version", default: 0, null: false
586
- t.integer "required_role_id", default: 1, null: false
587
- t.integer "required_score", default: 0, null: false
552
+ t.integer "shelf_id", default: 1, null: false
553
+ t.boolean "include_supplements", default: false, null: false
554
+ t.text "note"
555
+ t.string "url"
556
+ t.integer "price"
557
+ t.integer "lock_version", default: 0, null: false
558
+ t.integer "required_role_id", default: 1, null: false
559
+ t.integer "required_score", default: 0, null: false
588
560
  t.datetime "acquired_at"
589
- t.integer "bookstore_id"
590
- t.integer "budget_type_id"
591
- t.integer "circulation_status_id", default: 5, null: false
592
- t.integer "checkout_type_id", default: 1, null: false
593
- t.string "binding_item_identifier"
594
- t.string "binding_call_number"
561
+ t.integer "bookstore_id"
562
+ t.integer "budget_type_id"
563
+ t.integer "circulation_status_id", default: 5, null: false
564
+ t.integer "checkout_type_id", default: 1, null: false
565
+ t.string "binding_item_identifier"
566
+ t.string "binding_call_number"
595
567
  t.datetime "binded_at"
596
- t.integer "manifestation_id", null: false
568
+ t.integer "manifestation_id", null: false
569
+ t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
570
+ t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
571
+ t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
572
+ t.index ["circulation_status_id"], name: "index_items_on_circulation_status_id"
573
+ t.index ["item_identifier"], name: "index_items_on_item_identifier"
574
+ t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
575
+ t.index ["required_role_id"], name: "index_items_on_required_role_id"
576
+ t.index ["shelf_id"], name: "index_items_on_shelf_id"
597
577
  end
598
578
 
599
- add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
600
- add_index "items", ["bookstore_id"], name: "index_items_on_bookstore_id"
601
- add_index "items", ["checkout_type_id"], name: "index_items_on_checkout_type_id"
602
- add_index "items", ["circulation_status_id"], name: "index_items_on_circulation_status_id"
603
- add_index "items", ["item_identifier"], name: "index_items_on_item_identifier"
604
- add_index "items", ["manifestation_id"], name: "index_items_on_manifestation_id"
605
- add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
606
- add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
607
-
608
579
  create_table "languages", force: :cascade do |t|
609
- t.string "name", null: false
610
- t.string "native_name"
611
- t.text "display_name"
612
- t.string "iso_639_1"
613
- t.string "iso_639_2"
614
- t.string "iso_639_3"
615
- t.text "note"
580
+ t.string "name", null: false
581
+ t.string "native_name"
582
+ t.text "display_name"
583
+ t.string "iso_639_1"
584
+ t.string "iso_639_2"
585
+ t.string "iso_639_3"
586
+ t.text "note"
616
587
  t.integer "position"
588
+ t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
589
+ t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
590
+ t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
591
+ t.index ["name"], name: "index_languages_on_name", unique: true
617
592
  end
618
593
 
619
- add_index "languages", ["iso_639_1"], name: "index_languages_on_iso_639_1"
620
- add_index "languages", ["iso_639_2"], name: "index_languages_on_iso_639_2"
621
- add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
622
- add_index "languages", ["name"], name: "index_languages_on_name", unique: true
623
-
624
594
  create_table "lending_policies", force: :cascade do |t|
625
- t.integer "item_id", null: false
626
- t.integer "user_group_id", null: false
627
- t.integer "loan_period", default: 0, null: false
595
+ t.integer "item_id", null: false
596
+ t.integer "user_group_id", null: false
597
+ t.integer "loan_period", default: 0, null: false
628
598
  t.datetime "fixed_due_date"
629
- t.integer "renewal", default: 0, null: false
630
- t.integer "fine", default: 0, null: false
631
- t.text "note"
632
- t.integer "position"
599
+ t.integer "renewal", default: 0, null: false
600
+ t.integer "fine", default: 0, null: false
601
+ t.text "note"
602
+ t.integer "position"
633
603
  t.datetime "created_at"
634
604
  t.datetime "updated_at"
605
+ t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
635
606
  end
636
607
 
637
- add_index "lending_policies", ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
638
-
639
608
  create_table "libraries", force: :cascade do |t|
640
- t.string "name", null: false
641
- t.text "display_name"
642
- t.string "short_display_name", null: false
643
- t.string "zip_code"
644
- t.text "street"
645
- t.text "locality"
646
- t.text "region"
647
- t.string "telephone_number_1"
648
- t.string "telephone_number_2"
649
- t.string "fax_number"
650
- t.text "note"
651
- t.integer "call_number_rows", default: 1, null: false
652
- t.string "call_number_delimiter", default: "|", null: false
653
- t.integer "library_group_id", default: 1, null: false
654
- t.integer "users_count", default: 0, null: false
655
- t.integer "position"
656
- t.integer "country_id"
609
+ t.string "name", null: false
610
+ t.text "display_name"
611
+ t.string "short_display_name", null: false
612
+ t.string "zip_code"
613
+ t.text "street"
614
+ t.text "locality"
615
+ t.text "region"
616
+ t.string "telephone_number_1"
617
+ t.string "telephone_number_2"
618
+ t.string "fax_number"
619
+ t.text "note"
620
+ t.integer "call_number_rows", default: 1, null: false
621
+ t.string "call_number_delimiter", default: "|", null: false
622
+ t.integer "library_group_id", null: false
623
+ t.integer "users_count", default: 0, null: false
624
+ t.integer "position"
625
+ t.integer "country_id"
657
626
  t.datetime "created_at"
658
627
  t.datetime "updated_at"
659
628
  t.datetime "deleted_at"
660
- t.text "opening_hour"
661
- t.string "isil"
662
- t.float "latitude"
663
- t.float "longitude"
629
+ t.text "opening_hour"
630
+ t.string "isil"
631
+ t.float "latitude"
632
+ t.float "longitude"
633
+ t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
634
+ t.index ["name"], name: "index_libraries_on_name"
664
635
  end
665
636
 
666
- add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
667
- add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
668
-
669
637
  create_table "library_group_translations", force: :cascade do |t|
670
- t.integer "library_group_id", null: false
671
- t.string "locale", null: false
672
- t.datetime "created_at", null: false
673
- t.datetime "updated_at", null: false
674
- t.text "login_banner"
675
- t.text "footer_banner"
638
+ t.integer "library_group_id", null: false
639
+ t.string "locale", null: false
640
+ t.datetime "created_at", null: false
641
+ t.datetime "updated_at", null: false
642
+ t.text "login_banner"
643
+ t.text "footer_banner"
644
+ t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
645
+ t.index ["locale"], name: "index_library_group_translations_on_locale"
676
646
  end
677
647
 
678
- add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
679
- add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
680
-
681
648
  create_table "library_groups", force: :cascade do |t|
682
- t.string "name", null: false
683
- t.text "display_name"
684
- t.string "short_name", null: false
685
- t.text "my_networks"
686
- t.text "old_login_banner"
687
- t.text "note"
688
- t.integer "country_id"
689
- t.integer "position"
690
- t.datetime "created_at"
691
- t.datetime "updated_at"
692
- t.text "admin_networks"
693
- t.string "url", default: "http://localhost:3000/"
694
- t.text "settings"
695
- t.text "html_snippet"
696
- t.integer "max_number_of_results", default: 500
697
- t.boolean "family_name_first", default: true
698
- t.integer "pub_year_facet_range_interval", default: 10
699
- t.integer "user_id"
700
- t.string "header_logo_file_name"
701
- t.string "header_logo_content_type"
702
- t.integer "header_logo_file_size"
649
+ t.string "name", null: false
650
+ t.text "display_name"
651
+ t.string "short_name", null: false
652
+ t.text "my_networks"
653
+ t.text "old_login_banner"
654
+ t.text "note"
655
+ t.integer "country_id"
656
+ t.integer "position"
657
+ t.datetime "created_at"
658
+ t.datetime "updated_at"
659
+ t.text "admin_networks"
660
+ t.string "url", default: "http://localhost:3000/"
661
+ t.text "settings"
662
+ t.text "html_snippet"
663
+ t.integer "max_number_of_results", default: 500
664
+ t.boolean "family_name_first", default: true
665
+ t.integer "pub_year_facet_range_interval", default: 10
666
+ t.integer "user_id"
667
+ t.boolean "csv_charset_conversion", default: false, null: false
668
+ t.string "header_logo_file_name"
669
+ t.string "header_logo_content_type"
670
+ t.integer "header_logo_file_size"
703
671
  t.datetime "header_logo_updated_at"
704
- t.boolean "csv_charset_conversion", default: false, null: false
705
- t.text "header_logo_meta"
672
+ t.text "header_logo_meta"
673
+ t.index ["short_name"], name: "index_library_groups_on_short_name"
674
+ t.index ["user_id"], name: "index_library_groups_on_user_id"
706
675
  end
707
676
 
708
- add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
709
- add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
710
-
711
677
  create_table "licenses", force: :cascade do |t|
712
- t.string "name", null: false
713
- t.string "display_name"
714
- t.text "note"
715
- t.integer "position"
678
+ t.string "name", null: false
679
+ t.string "display_name"
680
+ t.text "note"
681
+ t.integer "position"
716
682
  t.datetime "created_at"
717
683
  t.datetime "updated_at"
718
684
  end
719
685
 
720
686
  create_table "manifestation_checkout_stat_transitions", force: :cascade do |t|
721
- t.string "to_state"
722
- t.text "metadata", default: "{}"
723
- t.integer "sort_key"
724
- t.integer "manifestation_checkout_stat_id"
687
+ t.string "to_state"
688
+ t.text "metadata", default: "{}"
689
+ t.integer "sort_key"
690
+ t.integer "manifestation_checkout_stat_id"
725
691
  t.datetime "created_at"
726
692
  t.datetime "updated_at"
693
+ t.index ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
694
+ t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
727
695
  end
728
696
 
729
- add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
730
- add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
731
-
732
697
  create_table "manifestation_checkout_stats", force: :cascade do |t|
733
698
  t.datetime "start_date"
734
699
  t.datetime "end_date"
735
- t.text "note"
700
+ t.text "note"
736
701
  t.datetime "created_at"
737
702
  t.datetime "updated_at"
738
703
  t.datetime "started_at"
739
704
  t.datetime "completed_at"
740
- t.integer "user_id"
705
+ t.integer "user_id"
706
+ t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
741
707
  end
742
708
 
743
- add_index "manifestation_checkout_stats", ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
744
-
745
709
  create_table "manifestation_relationship_types", force: :cascade do |t|
746
- t.string "name", null: false
747
- t.text "display_name"
748
- t.text "note"
749
- t.integer "position"
710
+ t.string "name", null: false
711
+ t.text "display_name"
712
+ t.text "note"
713
+ t.integer "position"
750
714
  t.datetime "created_at"
751
715
  t.datetime "updated_at"
752
716
  end
753
717
 
754
718
  create_table "manifestation_relationships", force: :cascade do |t|
755
- t.integer "parent_id"
756
- t.integer "child_id"
757
- t.integer "manifestation_relationship_type_id"
719
+ t.integer "parent_id"
720
+ t.integer "child_id"
721
+ t.integer "manifestation_relationship_type_id"
758
722
  t.datetime "created_at"
759
723
  t.datetime "updated_at"
760
- t.integer "position"
724
+ t.integer "position"
725
+ t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
726
+ t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
761
727
  end
762
728
 
763
- add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
764
- add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
765
-
766
729
  create_table "manifestation_reserve_stat_transitions", force: :cascade do |t|
767
- t.string "to_state"
768
- t.text "metadata", default: "{}"
769
- t.integer "sort_key"
770
- t.integer "manifestation_reserve_stat_id"
730
+ t.string "to_state"
731
+ t.text "metadata", default: "{}"
732
+ t.integer "sort_key"
733
+ t.integer "manifestation_reserve_stat_id"
771
734
  t.datetime "created_at"
772
735
  t.datetime "updated_at"
736
+ t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
737
+ t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
773
738
  end
774
739
 
775
- add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
776
- add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
777
-
778
740
  create_table "manifestation_reserve_stats", force: :cascade do |t|
779
741
  t.datetime "start_date"
780
742
  t.datetime "end_date"
781
- t.text "note"
743
+ t.text "note"
782
744
  t.datetime "created_at"
783
745
  t.datetime "updated_at"
784
746
  t.datetime "started_at"
785
747
  t.datetime "completed_at"
786
- t.integer "user_id"
748
+ t.integer "user_id"
749
+ t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
787
750
  end
788
751
 
789
- add_index "manifestation_reserve_stats", ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
790
-
791
752
  create_table "manifestations", force: :cascade do |t|
792
- t.text "original_title", null: false
793
- t.text "title_alternative"
794
- t.text "title_transcription"
795
- t.string "classification_number"
796
- t.string "manifestation_identifier"
753
+ t.text "original_title", null: false
754
+ t.text "title_alternative"
755
+ t.text "title_transcription"
756
+ t.string "classification_number"
757
+ t.string "manifestation_identifier"
797
758
  t.datetime "date_of_publication"
798
759
  t.datetime "date_copyrighted"
799
760
  t.datetime "created_at"
800
761
  t.datetime "updated_at"
801
762
  t.datetime "deleted_at"
802
- t.string "access_address"
803
- t.integer "language_id", default: 1, null: false
804
- t.integer "carrier_type_id", default: 1, null: false
805
- t.integer "start_page"
806
- t.integer "end_page"
807
- t.integer "height"
808
- t.integer "width"
809
- t.integer "depth"
810
- t.integer "price"
811
- t.text "fulltext"
812
- t.string "volume_number_string"
813
- t.string "issue_number_string"
814
- t.string "serial_number_string"
815
- t.integer "edition"
816
- t.text "note"
817
- t.boolean "repository_content", default: false, null: false
818
- t.integer "lock_version", default: 0, null: false
819
- t.integer "required_role_id", default: 1, null: false
820
- t.integer "required_score", default: 0, null: false
821
- t.integer "frequency_id", default: 1, null: false
822
- t.boolean "subscription_master", default: false, null: false
823
- t.string "attachment_file_name"
824
- t.string "attachment_content_type"
825
- t.integer "attachment_file_size"
763
+ t.string "access_address"
764
+ t.integer "language_id", default: 1, null: false
765
+ t.integer "carrier_type_id", default: 1, null: false
766
+ t.integer "start_page"
767
+ t.integer "end_page"
768
+ t.integer "height"
769
+ t.integer "width"
770
+ t.integer "depth"
771
+ t.integer "price"
772
+ t.text "fulltext"
773
+ t.string "volume_number_string"
774
+ t.string "issue_number_string"
775
+ t.string "serial_number_string"
776
+ t.integer "edition"
777
+ t.text "note"
778
+ t.boolean "repository_content", default: false, null: false
779
+ t.integer "lock_version", default: 0, null: false
780
+ t.integer "required_role_id", default: 1, null: false
781
+ t.integer "required_score", default: 0, null: false
782
+ t.integer "frequency_id", default: 1, null: false
783
+ t.boolean "subscription_master", default: false, null: false
784
+ t.string "attachment_file_name"
785
+ t.string "attachment_content_type"
786
+ t.integer "attachment_file_size"
826
787
  t.datetime "attachment_updated_at"
827
- t.text "title_alternative_transcription"
828
- t.text "description"
829
- t.text "abstract"
788
+ t.text "title_alternative_transcription"
789
+ t.text "description"
790
+ t.text "abstract"
830
791
  t.datetime "available_at"
831
792
  t.datetime "valid_until"
832
793
  t.datetime "date_submitted"
833
794
  t.datetime "date_accepted"
834
- t.datetime "date_caputured"
835
- t.string "pub_date"
836
- t.string "edition_string"
837
- t.integer "volume_number"
838
- t.integer "issue_number"
839
- t.integer "serial_number"
840
- t.integer "content_type_id", default: 1
841
- t.integer "year_of_publication"
842
- t.text "attachment_meta"
843
- t.integer "month_of_publication"
844
- t.boolean "fulltext_content"
845
- t.string "doi"
846
- t.boolean "serial"
847
- t.text "statement_of_responsibility"
848
- t.text "publication_place"
849
- t.text "extent"
850
- t.text "dimensions"
851
- end
852
-
853
- add_index "manifestations", ["access_address"], name: "index_manifestations_on_access_address"
854
- add_index "manifestations", ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
855
- add_index "manifestations", ["doi"], name: "index_manifestations_on_doi"
856
- add_index "manifestations", ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
857
- add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
795
+ t.datetime "date_captured"
796
+ t.string "pub_date"
797
+ t.string "edition_string"
798
+ t.integer "volume_number"
799
+ t.integer "issue_number"
800
+ t.integer "serial_number"
801
+ t.integer "content_type_id", default: 1
802
+ t.integer "year_of_publication"
803
+ t.text "attachment_meta"
804
+ t.integer "month_of_publication"
805
+ t.boolean "fulltext_content"
806
+ t.string "doi"
807
+ t.boolean "serial"
808
+ t.text "statement_of_responsibility"
809
+ t.text "publication_place"
810
+ t.text "extent"
811
+ t.text "dimensions"
812
+ t.index ["access_address"], name: "index_manifestations_on_access_address"
813
+ t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
814
+ t.index ["doi"], name: "index_manifestations_on_doi"
815
+ t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
816
+ t.index ["updated_at"], name: "index_manifestations_on_updated_at"
817
+ end
858
818
 
859
819
  create_table "medium_of_performances", force: :cascade do |t|
860
- t.string "name", null: false
861
- t.text "display_name"
862
- t.text "note"
863
- t.integer "position"
820
+ t.string "name", null: false
821
+ t.text "display_name"
822
+ t.text "note"
823
+ t.integer "position"
864
824
  t.datetime "created_at"
865
825
  t.datetime "updated_at"
866
826
  end
867
827
 
868
828
  create_table "message_request_transitions", force: :cascade do |t|
869
- t.string "to_state"
870
- t.text "metadata", default: "{}"
871
- t.integer "sort_key"
872
- t.integer "message_request_id"
829
+ t.string "to_state"
830
+ t.text "metadata", default: "{}"
831
+ t.integer "sort_key"
832
+ t.integer "message_request_id"
873
833
  t.datetime "created_at"
874
834
  t.datetime "updated_at"
875
- t.boolean "most_recent"
835
+ t.boolean "most_recent"
836
+ t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
837
+ t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
876
838
  end
877
839
 
878
- add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
879
- add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
880
-
881
840
  create_table "message_requests", force: :cascade do |t|
882
- t.integer "sender_id"
883
- t.integer "receiver_id"
884
- t.integer "message_template_id"
841
+ t.integer "sender_id"
842
+ t.integer "receiver_id"
843
+ t.integer "message_template_id"
885
844
  t.datetime "sent_at"
886
845
  t.datetime "deleted_at"
887
- t.text "body"
846
+ t.text "body"
888
847
  t.datetime "created_at"
889
848
  t.datetime "updated_at"
890
849
  end
891
850
 
892
851
  create_table "message_templates", force: :cascade do |t|
893
- t.string "status", null: false
894
- t.text "title", null: false
895
- t.text "body", null: false
896
- t.integer "position"
897
- t.string "locale", default: "en"
852
+ t.string "status", null: false
853
+ t.text "title", null: false
854
+ t.text "body", null: false
855
+ t.integer "position"
856
+ t.string "locale", default: "en"
898
857
  t.datetime "created_at"
899
858
  t.datetime "updated_at"
859
+ t.index ["status"], name: "index_message_templates_on_status", unique: true
900
860
  end
901
861
 
902
- add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
903
-
904
862
  create_table "message_transitions", force: :cascade do |t|
905
- t.string "to_state"
906
- t.text "metadata", default: "{}"
907
- t.integer "sort_key"
908
- t.integer "message_id"
863
+ t.string "to_state"
864
+ t.text "metadata", default: "{}"
865
+ t.integer "sort_key"
866
+ t.integer "message_id"
909
867
  t.datetime "created_at"
910
868
  t.datetime "updated_at"
911
- t.boolean "most_recent"
869
+ t.boolean "most_recent"
870
+ t.index ["message_id"], name: "index_message_transitions_on_message_id"
871
+ t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
912
872
  end
913
873
 
914
- add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
915
- add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
916
-
917
874
  create_table "messages", force: :cascade do |t|
918
875
  t.datetime "read_at"
919
- t.integer "receiver_id"
920
- t.integer "sender_id"
921
- t.string "subject", null: false
922
- t.text "body"
923
- t.integer "message_request_id"
924
- t.integer "parent_id"
876
+ t.integer "receiver_id"
877
+ t.integer "sender_id"
878
+ t.string "subject", null: false
879
+ t.text "body"
880
+ t.integer "message_request_id"
881
+ t.integer "parent_id"
925
882
  t.datetime "created_at"
926
883
  t.datetime "updated_at"
927
- t.integer "lft"
928
- t.integer "rgt"
929
- t.integer "depth"
884
+ t.integer "lft"
885
+ t.integer "rgt"
886
+ t.integer "depth"
887
+ t.index ["message_request_id"], name: "index_messages_on_message_request_id"
888
+ t.index ["parent_id"], name: "index_messages_on_parent_id"
889
+ t.index ["receiver_id"], name: "index_messages_on_receiver_id"
890
+ t.index ["sender_id"], name: "index_messages_on_sender_id"
930
891
  end
931
892
 
932
- add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
933
- add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
934
- add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
935
- add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
936
-
937
893
  create_table "owns", force: :cascade do |t|
938
- t.integer "agent_id", null: false
939
- t.integer "item_id", null: false
940
- t.integer "position"
894
+ t.integer "agent_id", null: false
895
+ t.integer "item_id", null: false
896
+ t.integer "position"
941
897
  t.datetime "created_at"
942
898
  t.datetime "updated_at"
899
+ t.index ["agent_id"], name: "index_owns_on_agent_id"
900
+ t.index ["item_id"], name: "index_owns_on_item_id"
943
901
  end
944
902
 
945
- add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
946
- add_index "owns", ["item_id"], name: "index_owns_on_item_id"
947
-
948
903
  create_table "participates", force: :cascade do |t|
949
- t.integer "agent_id", null: false
950
- t.integer "event_id", null: false
951
- t.integer "position"
904
+ t.integer "agent_id", null: false
905
+ t.integer "event_id", null: false
906
+ t.integer "position"
952
907
  t.datetime "created_at"
953
908
  t.datetime "updated_at"
909
+ t.index ["agent_id"], name: "index_participates_on_agent_id"
910
+ t.index ["event_id"], name: "index_participates_on_event_id"
954
911
  end
955
912
 
956
- add_index "participates", ["agent_id"], name: "index_participates_on_agent_id"
957
- add_index "participates", ["event_id"], name: "index_participates_on_event_id"
958
-
959
913
  create_table "picture_files", force: :cascade do |t|
960
- t.integer "picture_attachable_id"
961
- t.string "picture_attachable_type"
962
- t.string "content_type"
963
- t.text "title"
964
- t.string "thumbnail"
965
- t.integer "position"
914
+ t.integer "picture_attachable_id"
915
+ t.string "picture_attachable_type"
916
+ t.string "content_type"
917
+ t.text "title"
918
+ t.string "thumbnail"
919
+ t.integer "position"
966
920
  t.datetime "created_at"
967
921
  t.datetime "updated_at"
968
- t.string "picture_file_name"
969
- t.string "picture_content_type"
970
- t.integer "picture_file_size"
922
+ t.string "picture_file_name"
923
+ t.string "picture_content_type"
924
+ t.integer "picture_file_size"
971
925
  t.datetime "picture_updated_at"
972
- t.text "picture_meta"
973
- t.string "picture_fingerprint"
974
- t.integer "picture_width"
975
- t.integer "picture_height"
926
+ t.text "picture_meta"
927
+ t.string "picture_fingerprint"
928
+ t.integer "picture_width"
929
+ t.integer "picture_height"
930
+ t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
976
931
  end
977
932
 
978
- add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
979
-
980
933
  create_table "places", force: :cascade do |t|
981
- t.string "term"
982
- t.text "city"
983
- t.integer "country_id"
984
- t.float "latitude"
985
- t.float "longitude"
934
+ t.string "term"
935
+ t.text "city"
936
+ t.integer "country_id"
937
+ t.float "latitude"
938
+ t.float "longitude"
986
939
  t.datetime "created_at", null: false
987
940
  t.datetime "updated_at", null: false
941
+ t.index ["country_id"], name: "index_places_on_country_id"
942
+ t.index ["term"], name: "index_places_on_term"
988
943
  end
989
944
 
990
- add_index "places", ["country_id"], name: "index_places_on_country_id"
991
- add_index "places", ["term"], name: "index_places_on_term"
992
-
993
945
  create_table "produce_types", force: :cascade do |t|
994
- t.string "name"
995
- t.text "display_name"
996
- t.text "note"
997
- t.integer "position"
946
+ t.string "name"
947
+ t.text "display_name"
948
+ t.text "note"
949
+ t.integer "position"
998
950
  t.datetime "created_at"
999
951
  t.datetime "updated_at"
1000
952
  end
1001
953
 
1002
954
  create_table "produces", force: :cascade do |t|
1003
- t.integer "agent_id", null: false
1004
- t.integer "manifestation_id", null: false
1005
- t.integer "position"
955
+ t.integer "agent_id", null: false
956
+ t.integer "manifestation_id", null: false
957
+ t.integer "position"
1006
958
  t.datetime "created_at"
1007
959
  t.datetime "updated_at"
1008
- t.integer "produce_type_id"
960
+ t.integer "produce_type_id"
961
+ t.index ["agent_id"], name: "index_produces_on_agent_id"
962
+ t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
1009
963
  end
1010
964
 
1011
- add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
1012
- add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
1013
-
1014
965
  create_table "profiles", force: :cascade do |t|
1015
- t.integer "user_id"
1016
- t.integer "user_group_id"
1017
- t.integer "library_id"
1018
- t.string "locale"
1019
- t.string "user_number"
1020
- t.text "full_name"
1021
- t.text "note"
1022
- t.text "keyword_list"
1023
- t.integer "required_role_id"
1024
- t.datetime "created_at"
1025
- t.datetime "updated_at"
1026
- t.string "checkout_icalendar_token"
1027
- t.boolean "save_checkout_history", default: false, null: false
966
+ t.integer "user_id"
967
+ t.integer "user_group_id"
968
+ t.integer "library_id"
969
+ t.string "locale"
970
+ t.string "user_number"
971
+ t.text "full_name"
972
+ t.text "note"
973
+ t.text "keyword_list"
974
+ t.integer "required_role_id"
975
+ t.datetime "created_at"
976
+ t.datetime "updated_at"
977
+ t.string "checkout_icalendar_token"
978
+ t.boolean "save_checkout_history", default: false, null: false
1028
979
  t.datetime "expired_at"
1029
- t.text "full_name_transcription"
980
+ t.text "full_name_transcription"
1030
981
  t.datetime "date_of_birth"
982
+ t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
983
+ t.index ["user_id"], name: "index_profiles_on_user_id"
984
+ t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
1031
985
  end
1032
986
 
1033
- add_index "profiles", ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
1034
- add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
1035
- add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
1036
-
1037
987
  create_table "realize_types", force: :cascade do |t|
1038
- t.string "name"
1039
- t.text "display_name"
1040
- t.text "note"
1041
- t.integer "position"
988
+ t.string "name"
989
+ t.text "display_name"
990
+ t.text "note"
991
+ t.integer "position"
1042
992
  t.datetime "created_at"
1043
993
  t.datetime "updated_at"
1044
994
  end
1045
995
 
1046
996
  create_table "realizes", force: :cascade do |t|
1047
- t.integer "agent_id", null: false
1048
- t.integer "expression_id", null: false
1049
- t.integer "position"
997
+ t.integer "agent_id", null: false
998
+ t.integer "expression_id", null: false
999
+ t.integer "position"
1050
1000
  t.datetime "created_at"
1051
1001
  t.datetime "updated_at"
1052
- t.integer "realize_type_id"
1002
+ t.integer "realize_type_id"
1003
+ t.index ["agent_id"], name: "index_realizes_on_agent_id"
1004
+ t.index ["expression_id"], name: "index_realizes_on_expression_id"
1053
1005
  end
1054
1006
 
1055
- add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
1056
- add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
1057
-
1058
1007
  create_table "request_status_types", force: :cascade do |t|
1059
- t.string "name", null: false
1060
- t.text "display_name"
1061
- t.text "note"
1062
- t.integer "position"
1008
+ t.string "name", null: false
1009
+ t.text "display_name"
1010
+ t.text "note"
1011
+ t.integer "position"
1063
1012
  t.datetime "created_at"
1064
1013
  t.datetime "updated_at"
1065
1014
  end
1066
1015
 
1067
1016
  create_table "request_types", force: :cascade do |t|
1068
- t.string "name", null: false
1069
- t.text "display_name"
1070
- t.text "note"
1071
- t.integer "position"
1017
+ t.string "name", null: false
1018
+ t.text "display_name"
1019
+ t.text "note"
1020
+ t.integer "position"
1072
1021
  t.datetime "created_at"
1073
1022
  t.datetime "updated_at"
1074
1023
  end
1075
1024
 
1076
1025
  create_table "reserve_stat_has_manifestations", force: :cascade do |t|
1077
- t.integer "manifestation_reserve_stat_id", null: false
1078
- t.integer "manifestation_id", null: false
1079
- t.integer "reserves_count"
1026
+ t.integer "manifestation_reserve_stat_id", null: false
1027
+ t.integer "manifestation_id", null: false
1028
+ t.integer "reserves_count"
1080
1029
  t.datetime "created_at"
1081
1030
  t.datetime "updated_at"
1031
+ t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
1032
+ t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
1082
1033
  end
1083
1034
 
1084
- add_index "reserve_stat_has_manifestations", ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
1085
- add_index "reserve_stat_has_manifestations", ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
1086
-
1087
1035
  create_table "reserve_stat_has_users", force: :cascade do |t|
1088
- t.integer "user_reserve_stat_id", null: false
1089
- t.integer "user_id", null: false
1090
- t.integer "reserves_count"
1036
+ t.integer "user_reserve_stat_id", null: false
1037
+ t.integer "user_id", null: false
1038
+ t.integer "reserves_count"
1091
1039
  t.datetime "created_at"
1092
1040
  t.datetime "updated_at"
1041
+ t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
1042
+ t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
1093
1043
  end
1094
1044
 
1095
- add_index "reserve_stat_has_users", ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
1096
- add_index "reserve_stat_has_users", ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
1097
-
1098
1045
  create_table "reserve_transitions", force: :cascade do |t|
1099
- t.string "to_state"
1100
- t.text "metadata", default: "{}"
1101
- t.integer "sort_key"
1102
- t.integer "reserve_id"
1046
+ t.string "to_state"
1047
+ t.text "metadata", default: "{}"
1048
+ t.integer "sort_key"
1049
+ t.integer "reserve_id"
1103
1050
  t.datetime "created_at"
1104
1051
  t.datetime "updated_at"
1052
+ t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
1053
+ t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
1105
1054
  end
1106
1055
 
1107
- add_index "reserve_transitions", ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
1108
- add_index "reserve_transitions", ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
1109
-
1110
1056
  create_table "reserves", force: :cascade do |t|
1111
- t.integer "user_id", null: false
1112
- t.integer "manifestation_id", null: false
1113
- t.integer "item_id"
1114
- t.integer "request_status_type_id", null: false
1057
+ t.integer "user_id", null: false
1058
+ t.integer "manifestation_id", null: false
1059
+ t.integer "item_id"
1060
+ t.integer "request_status_type_id", null: false
1115
1061
  t.datetime "checked_out_at"
1116
1062
  t.datetime "created_at"
1117
1063
  t.datetime "updated_at"
1118
1064
  t.datetime "canceled_at"
1119
1065
  t.datetime "expired_at"
1120
1066
  t.datetime "deleted_at"
1121
- t.boolean "expiration_notice_to_patron", default: false
1122
- t.boolean "expiration_notice_to_library", default: false
1067
+ t.boolean "expiration_notice_to_patron", default: false
1068
+ t.boolean "expiration_notice_to_library", default: false
1123
1069
  t.datetime "retained_at"
1124
1070
  t.datetime "postponed_at"
1125
- t.integer "lock_version", default: 0, null: false
1071
+ t.integer "lock_version", default: 0, null: false
1072
+ t.index ["item_id"], name: "index_reserves_on_item_id"
1073
+ t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id"
1074
+ t.index ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
1075
+ t.index ["user_id"], name: "index_reserves_on_user_id"
1126
1076
  end
1127
1077
 
1128
- add_index "reserves", ["item_id"], name: "index_reserves_on_item_id"
1129
- add_index "reserves", ["manifestation_id"], name: "index_reserves_on_manifestation_id"
1130
- add_index "reserves", ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
1131
- add_index "reserves", ["user_id"], name: "index_reserves_on_user_id"
1132
-
1133
1078
  create_table "resource_export_file_transitions", force: :cascade do |t|
1134
- t.string "to_state"
1135
- t.text "metadata", default: "{}"
1136
- t.integer "sort_key"
1137
- t.integer "resource_export_file_id"
1079
+ t.string "to_state"
1080
+ t.text "metadata", default: "{}"
1081
+ t.integer "sort_key"
1082
+ t.integer "resource_export_file_id"
1138
1083
  t.datetime "created_at"
1139
1084
  t.datetime "updated_at"
1140
- t.boolean "most_recent", null: false
1085
+ t.boolean "most_recent", null: false
1086
+ t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1087
+ t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
1088
+ t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
1141
1089
  end
1142
1090
 
1143
- add_index "resource_export_file_transitions", ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true
1144
- add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
1145
- add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
1146
-
1147
1091
  create_table "resource_export_files", force: :cascade do |t|
1148
- t.integer "user_id"
1149
- t.string "resource_export_file_name"
1150
- t.string "resource_export_content_type"
1151
- t.integer "resource_export_file_size"
1092
+ t.integer "user_id"
1093
+ t.string "resource_export_file_name"
1094
+ t.string "resource_export_content_type"
1095
+ t.integer "resource_export_file_size"
1152
1096
  t.datetime "resource_export_updated_at"
1153
1097
  t.datetime "executed_at"
1154
1098
  t.datetime "created_at"
@@ -1156,382 +1100,369 @@ ActiveRecord::Schema.define(version: 20180107164617) do
1156
1100
  end
1157
1101
 
1158
1102
  create_table "resource_import_file_transitions", force: :cascade do |t|
1159
- t.string "to_state"
1160
- t.text "metadata", default: "{}"
1161
- t.integer "sort_key"
1162
- t.integer "resource_import_file_id"
1103
+ t.string "to_state"
1104
+ t.text "metadata", default: "{}"
1105
+ t.integer "sort_key"
1106
+ t.integer "resource_import_file_id"
1163
1107
  t.datetime "created_at"
1164
1108
  t.datetime "updated_at"
1165
- t.boolean "most_recent", null: false
1109
+ t.boolean "most_recent", null: false
1110
+ t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1111
+ t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
1112
+ t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
1166
1113
  end
1167
1114
 
1168
- add_index "resource_import_file_transitions", ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true
1169
- add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
1170
- add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
1171
-
1172
1115
  create_table "resource_import_files", force: :cascade do |t|
1173
- t.integer "parent_id"
1174
- t.string "content_type"
1175
- t.integer "size"
1176
- t.integer "user_id"
1177
- t.text "note"
1116
+ t.integer "parent_id"
1117
+ t.string "content_type"
1118
+ t.integer "size"
1119
+ t.integer "user_id"
1120
+ t.text "note"
1178
1121
  t.datetime "executed_at"
1179
- t.string "resource_import_file_name"
1180
- t.string "resource_import_content_type"
1181
- t.integer "resource_import_file_size"
1122
+ t.string "resource_import_file_name"
1123
+ t.string "resource_import_content_type"
1124
+ t.integer "resource_import_file_size"
1182
1125
  t.datetime "resource_import_updated_at"
1183
1126
  t.datetime "created_at"
1184
1127
  t.datetime "updated_at"
1185
- t.string "edit_mode"
1186
- t.string "resource_import_fingerprint"
1187
- t.text "error_message"
1188
- t.string "user_encoding"
1189
- t.integer "default_shelf_id"
1128
+ t.string "edit_mode"
1129
+ t.string "resource_import_fingerprint"
1130
+ t.text "error_message"
1131
+ t.string "user_encoding"
1132
+ t.integer "default_shelf_id"
1133
+ t.index ["parent_id"], name: "index_resource_import_files_on_parent_id"
1134
+ t.index ["user_id"], name: "index_resource_import_files_on_user_id"
1190
1135
  end
1191
1136
 
1192
- add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
1193
- add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
1194
-
1195
1137
  create_table "resource_import_results", force: :cascade do |t|
1196
- t.integer "resource_import_file_id"
1197
- t.integer "manifestation_id"
1198
- t.integer "item_id"
1199
- t.text "body"
1138
+ t.integer "resource_import_file_id"
1139
+ t.integer "manifestation_id"
1140
+ t.integer "item_id"
1141
+ t.text "body"
1200
1142
  t.datetime "created_at"
1201
1143
  t.datetime "updated_at"
1202
- t.text "error_message"
1144
+ t.text "error_message"
1145
+ t.index ["item_id"], name: "index_resource_import_results_on_item_id"
1146
+ t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
1147
+ t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
1203
1148
  end
1204
1149
 
1205
- add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
1206
- add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
1207
- add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
1208
-
1209
1150
  create_table "roles", force: :cascade do |t|
1210
- t.string "name", null: false
1211
- t.string "display_name"
1212
- t.text "note"
1151
+ t.string "name", null: false
1152
+ t.string "display_name"
1153
+ t.text "note"
1213
1154
  t.datetime "created_at"
1214
1155
  t.datetime "updated_at"
1215
- t.integer "score", default: 0, null: false
1216
- t.integer "position"
1156
+ t.integer "score", default: 0, null: false
1157
+ t.integer "position"
1217
1158
  end
1218
1159
 
1219
1160
  create_table "search_engines", force: :cascade do |t|
1220
- t.string "name", null: false
1221
- t.text "display_name"
1222
- t.string "url", null: false
1223
- t.text "base_url", null: false
1224
- t.text "http_method", null: false
1225
- t.text "query_param", null: false
1226
- t.text "additional_param"
1227
- t.text "note"
1228
- t.integer "position"
1161
+ t.string "name", null: false
1162
+ t.text "display_name"
1163
+ t.string "url", null: false
1164
+ t.text "base_url", null: false
1165
+ t.text "http_method", null: false
1166
+ t.text "query_param", null: false
1167
+ t.text "additional_param"
1168
+ t.text "note"
1169
+ t.integer "position"
1229
1170
  t.datetime "created_at"
1230
1171
  t.datetime "updated_at"
1231
1172
  end
1232
1173
 
1233
1174
  create_table "series_statement_merge_lists", force: :cascade do |t|
1234
- t.string "title"
1175
+ t.string "title"
1235
1176
  t.datetime "created_at"
1236
1177
  t.datetime "updated_at"
1237
1178
  end
1238
1179
 
1239
1180
  create_table "series_statement_merges", force: :cascade do |t|
1240
- t.integer "series_statement_id", null: false
1241
- t.integer "series_statement_merge_list_id", null: false
1181
+ t.integer "series_statement_id", null: false
1182
+ t.integer "series_statement_merge_list_id", null: false
1242
1183
  t.datetime "created_at"
1243
1184
  t.datetime "updated_at"
1185
+ t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
1186
+ t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
1244
1187
  end
1245
1188
 
1246
- add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
1247
- add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
1248
-
1249
1189
  create_table "series_statements", force: :cascade do |t|
1250
- t.text "original_title"
1251
- t.text "numbering"
1252
- t.text "title_subseries"
1253
- t.text "numbering_subseries"
1254
- t.integer "position"
1255
- t.datetime "created_at"
1256
- t.datetime "updated_at"
1257
- t.text "title_transcription"
1258
- t.text "title_alternative"
1259
- t.string "series_statement_identifier"
1260
- t.integer "manifestation_id"
1261
- t.text "note"
1262
- t.text "title_subseries_transcription"
1263
- t.text "creator_string"
1264
- t.text "volume_number_string"
1265
- t.text "volume_number_transcription_string"
1266
- t.boolean "series_master"
1267
- t.integer "root_manifestation_id"
1268
- end
1269
-
1270
- add_index "series_statements", ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
1271
- add_index "series_statements", ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
1272
- add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
1190
+ t.text "original_title"
1191
+ t.text "numbering"
1192
+ t.text "title_subseries"
1193
+ t.text "numbering_subseries"
1194
+ t.integer "position"
1195
+ t.datetime "created_at"
1196
+ t.datetime "updated_at"
1197
+ t.text "title_transcription"
1198
+ t.text "title_alternative"
1199
+ t.string "series_statement_identifier"
1200
+ t.integer "manifestation_id"
1201
+ t.text "note"
1202
+ t.text "title_subseries_transcription"
1203
+ t.text "creator_string"
1204
+ t.text "volume_number_string"
1205
+ t.text "volume_number_transcription_string"
1206
+ t.boolean "series_master"
1207
+ t.integer "root_manifestation_id"
1208
+ t.index ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
1209
+ t.index ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
1210
+ t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
1211
+ end
1273
1212
 
1274
1213
  create_table "shelves", force: :cascade do |t|
1275
- t.string "name", null: false
1276
- t.text "display_name"
1277
- t.text "note"
1278
- t.integer "library_id", default: 1, null: false
1279
- t.integer "items_count", default: 0, null: false
1280
- t.integer "position"
1214
+ t.string "name", null: false
1215
+ t.text "display_name"
1216
+ t.text "note"
1217
+ t.integer "library_id", null: false
1218
+ t.integer "items_count", default: 0, null: false
1219
+ t.integer "position"
1281
1220
  t.datetime "created_at"
1282
1221
  t.datetime "updated_at"
1283
1222
  t.datetime "deleted_at"
1284
- t.boolean "closed", default: false, null: false
1223
+ t.boolean "closed", default: false, null: false
1224
+ t.index ["library_id"], name: "index_shelves_on_library_id"
1285
1225
  end
1286
1226
 
1287
- add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
1288
-
1289
1227
  create_table "subscribes", force: :cascade do |t|
1290
- t.integer "subscription_id", null: false
1291
- t.integer "work_id", null: false
1292
- t.datetime "start_at", null: false
1293
- t.datetime "end_at", null: false
1228
+ t.integer "subscription_id", null: false
1229
+ t.integer "work_id", null: false
1230
+ t.datetime "start_at", null: false
1231
+ t.datetime "end_at", null: false
1294
1232
  t.datetime "created_at"
1295
1233
  t.datetime "updated_at"
1234
+ t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
1235
+ t.index ["work_id"], name: "index_subscribes_on_work_id"
1296
1236
  end
1297
1237
 
1298
- add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
1299
- add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
1300
-
1301
1238
  create_table "subscriptions", force: :cascade do |t|
1302
- t.text "title", null: false
1303
- t.text "note"
1304
- t.integer "user_id"
1305
- t.integer "order_list_id"
1239
+ t.text "title", null: false
1240
+ t.text "note"
1241
+ t.integer "user_id"
1242
+ t.integer "order_list_id"
1306
1243
  t.datetime "deleted_at"
1307
- t.integer "subscribes_count", default: 0, null: false
1244
+ t.integer "subscribes_count", default: 0, null: false
1308
1245
  t.datetime "created_at"
1309
1246
  t.datetime "updated_at"
1247
+ t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
1248
+ t.index ["user_id"], name: "index_subscriptions_on_user_id"
1310
1249
  end
1311
1250
 
1312
- add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
1313
- add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
1314
-
1315
1251
  create_table "use_restrictions", force: :cascade do |t|
1316
- t.string "name", null: false
1317
- t.text "display_name"
1318
- t.text "note"
1319
- t.integer "position"
1252
+ t.string "name", null: false
1253
+ t.text "display_name"
1254
+ t.text "note"
1255
+ t.integer "position"
1320
1256
  t.datetime "created_at"
1321
1257
  t.datetime "updated_at"
1322
1258
  end
1323
1259
 
1324
1260
  create_table "user_checkout_stat_transitions", force: :cascade do |t|
1325
- t.string "to_state"
1326
- t.text "metadata", default: "{}"
1327
- t.integer "sort_key"
1328
- t.integer "user_checkout_stat_id"
1261
+ t.string "to_state"
1262
+ t.text "metadata", default: "{}"
1263
+ t.integer "sort_key"
1264
+ t.integer "user_checkout_stat_id"
1329
1265
  t.datetime "created_at"
1330
1266
  t.datetime "updated_at"
1267
+ t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
1268
+ t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
1331
1269
  end
1332
1270
 
1333
- add_index "user_checkout_stat_transitions", ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
1334
- add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
1335
-
1336
1271
  create_table "user_checkout_stats", force: :cascade do |t|
1337
1272
  t.datetime "start_date"
1338
1273
  t.datetime "end_date"
1339
- t.text "note"
1274
+ t.text "note"
1340
1275
  t.datetime "created_at"
1341
1276
  t.datetime "updated_at"
1342
1277
  t.datetime "started_at"
1343
1278
  t.datetime "completed_at"
1344
- t.integer "user_id"
1279
+ t.integer "user_id"
1280
+ t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
1345
1281
  end
1346
1282
 
1347
- add_index "user_checkout_stats", ["user_id"], name: "index_user_checkout_stats_on_user_id"
1348
-
1349
1283
  create_table "user_export_file_transitions", force: :cascade do |t|
1350
- t.string "to_state"
1351
- t.text "metadata", default: "{}"
1352
- t.integer "sort_key"
1353
- t.integer "user_export_file_id"
1284
+ t.string "to_state"
1285
+ t.text "metadata", default: "{}"
1286
+ t.integer "sort_key"
1287
+ t.integer "user_export_file_id"
1354
1288
  t.datetime "created_at"
1355
1289
  t.datetime "updated_at"
1356
- t.boolean "most_recent", null: false
1290
+ t.boolean "most_recent", null: false
1291
+ t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1292
+ t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1293
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
1294
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1357
1295
  end
1358
1296
 
1359
- add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1360
- add_index "user_export_file_transitions", ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true
1361
- add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
1362
-
1363
1297
  create_table "user_export_files", force: :cascade do |t|
1364
- t.integer "user_id"
1365
- t.string "user_export_file_name"
1366
- t.string "user_export_content_type"
1367
- t.integer "user_export_file_size"
1298
+ t.integer "user_id"
1299
+ t.string "user_export_file_name"
1300
+ t.string "user_export_content_type"
1301
+ t.integer "user_export_file_size"
1368
1302
  t.datetime "user_export_updated_at"
1369
1303
  t.datetime "executed_at"
1370
1304
  t.datetime "created_at"
1371
1305
  t.datetime "updated_at"
1306
+ t.index ["user_id"], name: "index_user_export_files_on_user_id"
1372
1307
  end
1373
1308
 
1374
1309
  create_table "user_group_has_checkout_types", force: :cascade do |t|
1375
- t.integer "user_group_id", null: false
1376
- t.integer "checkout_type_id", null: false
1377
- t.integer "checkout_limit", default: 0, null: false
1378
- t.integer "checkout_period", default: 0, null: false
1379
- t.integer "checkout_renewal_limit", default: 0, null: false
1380
- t.integer "reservation_limit", default: 0, null: false
1381
- t.integer "reservation_expired_period", default: 7, null: false
1382
- t.boolean "set_due_date_before_closing_day", default: false, null: false
1310
+ t.integer "user_group_id", null: false
1311
+ t.integer "checkout_type_id", null: false
1312
+ t.integer "checkout_limit", default: 0, null: false
1313
+ t.integer "checkout_period", default: 0, null: false
1314
+ t.integer "checkout_renewal_limit", default: 0, null: false
1315
+ t.integer "reservation_limit", default: 0, null: false
1316
+ t.integer "reservation_expired_period", default: 7, null: false
1317
+ t.boolean "set_due_date_before_closing_day", default: false, null: false
1383
1318
  t.datetime "fixed_due_date"
1384
- t.text "note"
1385
- t.integer "position"
1319
+ t.text "note"
1320
+ t.integer "position"
1386
1321
  t.datetime "created_at"
1387
1322
  t.datetime "updated_at"
1388
- t.integer "current_checkout_count"
1323
+ t.integer "current_checkout_count"
1324
+ t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
1325
+ t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
1389
1326
  end
1390
1327
 
1391
- add_index "user_group_has_checkout_types", ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
1392
- add_index "user_group_has_checkout_types", ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
1393
-
1394
1328
  create_table "user_groups", force: :cascade do |t|
1395
- t.string "name"
1396
- t.text "display_name"
1397
- t.text "note"
1398
- t.integer "position"
1329
+ t.string "name"
1330
+ t.text "display_name"
1331
+ t.text "note"
1332
+ t.integer "position"
1399
1333
  t.datetime "created_at"
1400
1334
  t.datetime "updated_at"
1401
1335
  t.datetime "deleted_at"
1402
- t.integer "valid_period_for_new_user", default: 0, null: false
1336
+ t.integer "valid_period_for_new_user", default: 0, null: false
1403
1337
  t.datetime "expired_at"
1404
- t.integer "number_of_day_to_notify_overdue", default: 1, null: false
1405
- t.integer "number_of_day_to_notify_due_date", default: 7, null: false
1406
- t.integer "number_of_time_to_notify_overdue", default: 3, null: false
1338
+ t.integer "number_of_day_to_notify_overdue", default: 1, null: false
1339
+ t.integer "number_of_day_to_notify_due_date", default: 7, null: false
1340
+ t.integer "number_of_time_to_notify_overdue", default: 3, null: false
1407
1341
  end
1408
1342
 
1409
1343
  create_table "user_has_roles", force: :cascade do |t|
1410
- t.integer "user_id"
1411
- t.integer "role_id"
1344
+ t.integer "user_id"
1345
+ t.integer "role_id"
1412
1346
  t.datetime "created_at"
1413
1347
  t.datetime "updated_at"
1348
+ t.index ["role_id"], name: "index_user_has_roles_on_role_id"
1349
+ t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1414
1350
  end
1415
1351
 
1416
- add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
1417
- add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
1418
-
1419
1352
  create_table "user_import_file_transitions", force: :cascade do |t|
1420
- t.string "to_state"
1421
- t.text "metadata", default: "{}"
1422
- t.integer "sort_key"
1423
- t.integer "user_import_file_id"
1353
+ t.string "to_state"
1354
+ t.text "metadata", default: "{}"
1355
+ t.integer "sort_key"
1356
+ t.integer "user_import_file_id"
1424
1357
  t.datetime "created_at"
1425
1358
  t.datetime "updated_at"
1426
- t.boolean "most_recent", null: false
1359
+ t.boolean "most_recent", null: false
1360
+ t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1361
+ t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1362
+ t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1427
1363
  end
1428
1364
 
1429
- add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1430
- add_index "user_import_file_transitions", ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true
1431
- add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1432
-
1433
1365
  create_table "user_import_files", force: :cascade do |t|
1434
- t.integer "user_id"
1435
- t.text "note"
1366
+ t.integer "user_id"
1367
+ t.text "note"
1436
1368
  t.datetime "executed_at"
1437
- t.string "user_import_file_name"
1438
- t.string "user_import_content_type"
1439
- t.integer "user_import_file_size"
1369
+ t.string "user_import_file_name"
1370
+ t.string "user_import_content_type"
1371
+ t.integer "user_import_file_size"
1440
1372
  t.datetime "user_import_updated_at"
1441
- t.string "user_import_fingerprint"
1442
- t.string "edit_mode"
1443
- t.text "error_message"
1373
+ t.string "user_import_fingerprint"
1374
+ t.string "edit_mode"
1375
+ t.text "error_message"
1444
1376
  t.datetime "created_at"
1445
1377
  t.datetime "updated_at"
1446
- t.string "user_encoding"
1447
- t.integer "default_library_id"
1448
- t.integer "default_user_group_id"
1378
+ t.string "user_encoding"
1379
+ t.integer "default_library_id"
1380
+ t.integer "default_user_group_id"
1381
+ t.index ["user_id"], name: "index_user_import_files_on_user_id"
1449
1382
  end
1450
1383
 
1451
1384
  create_table "user_import_results", force: :cascade do |t|
1452
- t.integer "user_import_file_id"
1453
- t.integer "user_id"
1454
- t.text "body"
1385
+ t.integer "user_import_file_id"
1386
+ t.integer "user_id"
1387
+ t.text "body"
1455
1388
  t.datetime "created_at"
1456
1389
  t.datetime "updated_at"
1457
- t.text "error_message"
1390
+ t.text "error_message"
1391
+ t.index ["user_id"], name: "index_user_import_results_on_user_id"
1392
+ t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1458
1393
  end
1459
1394
 
1460
1395
  create_table "user_reserve_stat_transitions", force: :cascade do |t|
1461
- t.string "to_state"
1462
- t.text "metadata", default: "{}"
1463
- t.integer "sort_key"
1464
- t.integer "user_reserve_stat_id"
1396
+ t.string "to_state"
1397
+ t.text "metadata", default: "{}"
1398
+ t.integer "sort_key"
1399
+ t.integer "user_reserve_stat_id"
1465
1400
  t.datetime "created_at"
1466
1401
  t.datetime "updated_at"
1402
+ t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
1403
+ t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
1467
1404
  end
1468
1405
 
1469
- add_index "user_reserve_stat_transitions", ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
1470
- add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
1471
-
1472
1406
  create_table "user_reserve_stats", force: :cascade do |t|
1473
1407
  t.datetime "start_date"
1474
1408
  t.datetime "end_date"
1475
- t.text "note"
1409
+ t.text "note"
1476
1410
  t.datetime "created_at"
1477
1411
  t.datetime "updated_at"
1478
1412
  t.datetime "started_at"
1479
1413
  t.datetime "completed_at"
1480
- t.integer "user_id"
1414
+ t.integer "user_id"
1415
+ t.index ["user_id"], name: "index_user_reserve_stats_on_user_id"
1481
1416
  end
1482
1417
 
1483
- add_index "user_reserve_stats", ["user_id"], name: "index_user_reserve_stats_on_user_id"
1484
-
1485
1418
  create_table "users", force: :cascade do |t|
1486
- t.string "email", default: "", null: false
1487
- t.string "encrypted_password", default: "", null: false
1488
- t.string "reset_password_token"
1419
+ t.string "email", default: "", null: false
1420
+ t.string "encrypted_password", default: "", null: false
1421
+ t.string "reset_password_token"
1489
1422
  t.datetime "reset_password_sent_at"
1490
1423
  t.datetime "remember_created_at"
1491
- t.integer "sign_in_count", default: 0
1424
+ t.integer "sign_in_count", default: 0
1492
1425
  t.datetime "current_sign_in_at"
1493
1426
  t.datetime "last_sign_in_at"
1494
- t.string "current_sign_in_ip"
1495
- t.string "last_sign_in_ip"
1427
+ t.string "current_sign_in_ip"
1428
+ t.string "last_sign_in_ip"
1496
1429
  t.datetime "created_at"
1497
1430
  t.datetime "updated_at"
1498
- t.boolean "save_checkout_history", default: false, null: false
1499
- t.string "checkout_icalendar_token"
1500
- t.string "username"
1431
+ t.boolean "save_checkout_history", default: false, null: false
1432
+ t.string "checkout_icalendar_token"
1433
+ t.string "username"
1501
1434
  t.datetime "deleted_at"
1502
1435
  t.datetime "expired_at"
1503
- t.integer "failed_attempts", default: 0
1504
- t.string "unlock_token"
1436
+ t.integer "failed_attempts", default: 0
1437
+ t.string "unlock_token"
1505
1438
  t.datetime "locked_at"
1506
1439
  t.datetime "confirmed_at"
1440
+ t.index ["checkout_icalendar_token"], name: "index_users_on_checkout_icalendar_token", unique: true
1441
+ t.index ["email"], name: "index_users_on_email"
1442
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1443
+ t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1444
+ t.index ["username"], name: "index_users_on_username", unique: true
1507
1445
  end
1508
1446
 
1509
- add_index "users", ["checkout_icalendar_token"], name: "index_users_on_checkout_icalendar_token", unique: true
1510
- add_index "users", ["email"], name: "index_users_on_email"
1511
- add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1512
- add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1513
- add_index "users", ["username"], name: "index_users_on_username", unique: true
1514
-
1515
1447
  create_table "versions", force: :cascade do |t|
1516
- t.string "item_type", null: false
1517
- t.integer "item_id", null: false
1518
- t.string "event", null: false
1519
- t.string "whodunnit"
1520
- t.text "object"
1448
+ t.string "item_type", null: false
1449
+ t.integer "item_id", null: false
1450
+ t.string "event", null: false
1451
+ t.string "whodunnit"
1452
+ t.text "object"
1521
1453
  t.datetime "created_at"
1454
+ t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1522
1455
  end
1523
1456
 
1524
- add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1525
-
1526
1457
  create_table "withdraws", force: :cascade do |t|
1527
- t.integer "basket_id"
1528
- t.integer "item_id"
1529
- t.integer "librarian_id"
1530
- t.datetime "created_at", null: false
1531
- t.datetime "updated_at", null: false
1458
+ t.integer "basket_id"
1459
+ t.integer "item_id"
1460
+ t.integer "librarian_id"
1461
+ t.datetime "created_at", null: false
1462
+ t.datetime "updated_at", null: false
1463
+ t.index ["basket_id"], name: "index_withdraws_on_basket_id"
1464
+ t.index ["item_id"], name: "index_withdraws_on_item_id"
1465
+ t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1532
1466
  end
1533
1467
 
1534
- add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
1535
- add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
1536
-
1537
1468
  end