enju_leaf 1.2.2 → 1.3.0.beta.2

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