enju_library 0.2.5 → 0.3.0.beta.2

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