enju_message 0.2.4 → 0.3.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +4 -4
  3. data/Rakefile +2 -2
  4. data/app/assets/config/enju_message_manifest.js +0 -0
  5. data/app/controllers/message_requests_controller.rb +3 -2
  6. data/app/controllers/message_templates_controller.rb +4 -3
  7. data/app/controllers/messages_controller.rb +3 -2
  8. data/app/models/concerns/enju_message/enju_user.rb +2 -2
  9. data/app/models/message.rb +4 -4
  10. data/app/models/message_request.rb +12 -13
  11. data/app/models/message_request_transition.rb +1 -1
  12. data/app/models/message_template.rb +2 -2
  13. data/app/models/message_transition.rb +1 -1
  14. data/app/views/messages/index.atom.builder +1 -1
  15. data/app/views/messages/index.rss.builder +7 -12
  16. data/config/routes.rb +1 -1
  17. data/db/migrate/149_create_message_templates.rb +6 -6
  18. data/db/migrate/154_create_messages.rb +1 -1
  19. data/db/migrate/20080819181903_create_message_requests.rb +1 -1
  20. data/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +1 -1
  21. data/db/migrate/20120125050502_add_depth_to_message.rb +1 -1
  22. data/db/migrate/20140518111006_create_message_transitions.rb +1 -1
  23. data/db/migrate/20140518135713_create_message_request_transitions.rb +1 -1
  24. data/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
  25. data/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
  26. data/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +2 -2
  27. data/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +2 -2
  28. data/lib/enju_message/engine.rb +1 -0
  29. data/lib/enju_message/version.rb +1 -1
  30. data/lib/generators/enju_message/setup/setup_generator.rb +1 -1
  31. data/lib/tasks/enju_message_tasks.rake +3 -3
  32. data/lib/tasks/message_template.rb +1 -1
  33. data/spec/controllers/message_requests_controller_spec.rb +28 -28
  34. data/spec/controllers/message_templates_controller_spec.rb +45 -45
  35. data/spec/controllers/messages_controller_spec.rb +49 -49
  36. data/spec/dummy/app/models/user.rb +1 -1
  37. data/spec/dummy/bin/rails +1 -1
  38. data/spec/dummy/bin/setup +21 -12
  39. data/spec/dummy/bin/update +29 -0
  40. data/spec/dummy/bin/yarn +11 -0
  41. data/spec/dummy/config/application.rb +6 -16
  42. data/spec/dummy/config/boot.rb +4 -9
  43. data/spec/dummy/config/cable.yml +10 -0
  44. data/spec/dummy/config/database.yml +17 -22
  45. data/spec/dummy/config/environment.rb +4 -4
  46. data/spec/dummy/config/environments/development.rb +24 -11
  47. data/spec/dummy/config/environments/production.rb +28 -16
  48. data/spec/dummy/config/environments/test.rb +6 -8
  49. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  50. data/spec/dummy/config/initializers/assets.rb +14 -0
  51. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  52. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  53. data/spec/dummy/config/initializers/inflections.rb +9 -3
  54. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  55. data/spec/dummy/config/initializers/wrap_parameters.rb +5 -5
  56. data/spec/dummy/config/puma.rb +56 -0
  57. data/spec/dummy/config/secrets.yml +32 -0
  58. data/spec/dummy/config/spring.rb +6 -0
  59. data/spec/dummy/config/sunspot.yml +23 -0
  60. data/spec/dummy/db/migrate/001_create_agents.rb +7 -7
  61. data/spec/dummy/db/migrate/002_devise_create_users.rb +6 -6
  62. data/spec/dummy/db/migrate/005_create_manifestations.rb +13 -13
  63. data/spec/dummy/db/migrate/006_create_items.rb +6 -6
  64. data/spec/dummy/db/migrate/012_create_owns.rb +3 -3
  65. data/spec/dummy/db/migrate/015_create_creates.rb +3 -3
  66. data/spec/dummy/db/migrate/041_create_roles.rb +3 -3
  67. data/spec/dummy/db/migrate/047_create_produces.rb +3 -3
  68. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -1
  69. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -1
  70. data/spec/dummy/db/migrate/073_create_carrier_types.rb +2 -2
  71. data/spec/dummy/db/migrate/077_create_user_groups.rb +2 -2
  72. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  73. data/spec/dummy/db/migrate/112_create_frequencies.rb +2 -2
  74. data/spec/dummy/db/migrate/117_create_form_of_works.rb +2 -2
  75. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  76. data/spec/dummy/db/migrate/124_create_bookstores.rb +2 -2
  77. data/spec/dummy/db/migrate/125_create_donates.rb +3 -3
  78. data/spec/dummy/db/migrate/130_create_request_status_types.rb +2 -2
  79. data/spec/dummy/db/migrate/131_create_request_types.rb +2 -2
  80. data/spec/dummy/db/migrate/133_create_agent_merges.rb +2 -2
  81. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +1 -1
  82. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +3 -3
  83. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +4 -4
  84. data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +2 -2
  85. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -1
  86. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  87. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +6 -6
  88. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +5 -5
  89. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +6 -6
  90. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +2 -2
  91. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +1 -1
  92. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +1 -1
  93. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +1 -1
  94. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +1 -1
  95. data/spec/dummy/db/migrate/20090719201843_create_extents.rb +2 -2
  96. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +2 -2
  97. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +2 -2
  98. data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +2 -2
  99. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +1 -1
  100. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +2 -2
  101. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +4 -4
  102. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +1 -1
  103. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +1 -1
  104. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  105. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +1 -1
  106. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  107. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +1 -1
  108. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +1 -1
  109. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +1 -1
  110. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +1 -1
  111. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +2 -2
  112. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +1 -1
  113. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +1 -1
  114. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +1 -1
  115. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +1 -1
  116. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +2 -2
  117. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +1 -1
  118. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +1 -1
  119. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +2 -2
  120. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +1 -1
  121. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +1 -1
  122. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +1 -1
  123. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +1 -1
  124. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +3 -3
  125. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +1 -1
  126. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +1 -1
  127. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +1 -1
  128. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +1 -1
  129. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +1 -1
  130. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +1 -1
  131. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +1 -1
  132. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  133. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -1
  134. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  135. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -1
  136. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +2 -2
  137. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  138. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +1 -1
  139. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +1 -1
  140. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +1 -1
  141. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +1 -1
  142. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +1 -1
  143. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +1 -1
  144. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +1 -1
  145. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +1 -1
  146. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +1 -1
  147. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +2 -2
  148. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +1 -1
  149. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +1 -1
  150. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +1 -1
  151. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +4 -4
  152. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  153. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +1 -1
  154. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +1 -1
  155. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +1 -1
  156. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +1 -1
  157. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +1 -1
  158. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +3 -3
  159. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +1 -1
  160. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  161. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  162. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +2 -2
  163. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +1 -1
  164. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +1 -1
  165. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +1 -1
  166. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -1
  167. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +1 -1
  168. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +1 -1
  169. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +1 -1
  170. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  171. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +1 -1
  172. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +1 -1
  173. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  174. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
  175. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +1 -1
  176. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  177. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  178. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +1 -1
  179. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +1 -1
  180. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
  181. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +1 -1
  182. data/spec/dummy/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +1 -1
  183. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  184. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +1 -1
  185. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +1 -1
  186. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +1 -1
  187. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +1 -1
  188. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
  189. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
  190. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +1 -1
  191. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  192. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  193. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  194. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +1 -1
  195. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +1 -1
  196. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +1 -1
  197. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  198. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  199. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  200. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +1 -1
  201. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +1 -1
  202. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +1 -1
  203. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +1 -1
  204. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +1 -1
  205. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  206. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  207. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  208. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  209. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +1 -1
  210. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  211. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  212. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +1 -1
  213. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  214. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  215. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  216. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +2 -2
  217. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +2 -2
  218. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +2 -2
  219. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +2 -2
  220. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +2 -2
  221. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +2 -2
  222. data/spec/dummy/db/schema.rb +634 -684
  223. data/spec/dummy/package.json +5 -0
  224. data/spec/factories/library.rb +1 -1
  225. data/spec/factories/message.rb +6 -5
  226. data/spec/factories/message_request.rb +5 -5
  227. data/spec/rails_helper.rb +1 -14
  228. data/spec/views/messages/index.html.erb_spec.rb +5 -5
  229. metadata +77 -52
@@ -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,787 +13,755 @@
14
13
  ActiveRecord::Schema.define(version: 20180107162711) 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", null: false
33
+ t.boolean "most_recent", null: false
34
+ t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
35
+ t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
36
+ t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
36
37
  end
37
38
 
38
- add_index "agent_import_file_transitions", ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true
39
- add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
40
- 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
41
-
42
39
  create_table "agent_import_files", force: :cascade do |t|
43
- t.integer "parent_id"
44
- t.string "content_type"
45
- t.integer "size"
46
- t.integer "user_id"
47
- t.text "note"
40
+ t.integer "parent_id"
41
+ t.string "content_type"
42
+ t.integer "size"
43
+ t.integer "user_id"
44
+ t.text "note"
48
45
  t.datetime "executed_at"
49
- t.string "agent_import_file_name"
50
- t.string "agent_import_content_type"
51
- t.integer "agent_import_file_size"
46
+ t.string "agent_import_file_name"
47
+ t.string "agent_import_content_type"
48
+ t.integer "agent_import_file_size"
52
49
  t.datetime "agent_import_updated_at"
53
50
  t.datetime "created_at"
54
51
  t.datetime "updated_at"
55
- t.string "agent_import_fingerprint"
56
- t.text "error_message"
57
- t.string "edit_mode"
58
- t.string "user_encoding"
52
+ t.string "agent_import_fingerprint"
53
+ t.text "error_message"
54
+ t.string "edit_mode"
55
+ t.string "user_encoding"
56
+ t.index ["parent_id"], name: "index_agent_import_files_on_parent_id"
57
+ t.index ["user_id"], name: "index_agent_import_files_on_user_id"
59
58
  end
60
59
 
61
- add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
62
- add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
63
-
64
60
  create_table "agent_import_results", force: :cascade do |t|
65
- t.integer "agent_import_file_id"
66
- t.integer "agent_id"
67
- t.text "body"
61
+ t.integer "agent_import_file_id"
62
+ t.integer "agent_id"
63
+ t.text "body"
68
64
  t.datetime "created_at"
69
65
  t.datetime "updated_at"
70
66
  end
71
67
 
72
68
  create_table "agent_merge_lists", force: :cascade do |t|
73
- t.string "title"
69
+ t.string "title"
74
70
  t.datetime "created_at"
75
71
  t.datetime "updated_at"
76
72
  end
77
73
 
78
74
  create_table "agent_merges", force: :cascade do |t|
79
- t.integer "agent_id", null: false
80
- t.integer "agent_merge_list_id", null: false
75
+ t.integer "agent_id", null: false
76
+ t.integer "agent_merge_list_id", null: false
81
77
  t.datetime "created_at"
82
78
  t.datetime "updated_at"
79
+ t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
80
+ t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
83
81
  end
84
82
 
85
- add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
86
- add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
87
-
88
83
  create_table "agent_relationship_types", force: :cascade do |t|
89
- t.string "name", null: false
90
- t.text "display_name"
91
- t.text "note"
92
- t.integer "position"
84
+ t.string "name", null: false
85
+ t.text "display_name"
86
+ t.text "note"
87
+ t.integer "position"
93
88
  t.datetime "created_at"
94
89
  t.datetime "updated_at"
95
90
  end
96
91
 
97
92
  create_table "agent_relationships", force: :cascade do |t|
98
- t.integer "parent_id"
99
- t.integer "child_id"
100
- t.integer "agent_relationship_type_id"
93
+ t.integer "parent_id"
94
+ t.integer "child_id"
95
+ t.integer "agent_relationship_type_id"
101
96
  t.datetime "created_at"
102
97
  t.datetime "updated_at"
103
- t.integer "position"
98
+ t.integer "position"
99
+ t.index ["child_id"], name: "index_agent_relationships_on_child_id"
100
+ t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
104
101
  end
105
102
 
106
- add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
107
- add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
108
-
109
103
  create_table "agent_types", force: :cascade do |t|
110
- t.string "name", null: false
111
- t.text "display_name"
112
- t.text "note"
113
- t.integer "position"
104
+ t.string "name", null: false
105
+ t.text "display_name"
106
+ t.text "note"
107
+ t.integer "position"
114
108
  t.datetime "created_at"
115
109
  t.datetime "updated_at"
116
110
  end
117
111
 
118
112
  create_table "agents", force: :cascade do |t|
119
- t.string "last_name"
120
- t.string "middle_name"
121
- t.string "first_name"
122
- t.string "last_name_transcription"
123
- t.string "middle_name_transcription"
124
- t.string "first_name_transcription"
125
- t.string "corporate_name"
126
- t.string "corporate_name_transcription"
127
- t.string "full_name"
128
- t.text "full_name_transcription"
129
- t.text "full_name_alternative"
113
+ t.string "last_name"
114
+ t.string "middle_name"
115
+ t.string "first_name"
116
+ t.string "last_name_transcription"
117
+ t.string "middle_name_transcription"
118
+ t.string "first_name_transcription"
119
+ t.string "corporate_name"
120
+ t.string "corporate_name_transcription"
121
+ t.string "full_name"
122
+ t.text "full_name_transcription"
123
+ t.text "full_name_alternative"
130
124
  t.datetime "created_at"
131
125
  t.datetime "updated_at"
132
126
  t.datetime "deleted_at"
133
- t.string "zip_code_1"
134
- t.string "zip_code_2"
135
- t.text "address_1"
136
- t.text "address_2"
137
- t.text "address_1_note"
138
- t.text "address_2_note"
139
- t.string "telephone_number_1"
140
- t.string "telephone_number_2"
141
- t.string "fax_number_1"
142
- t.string "fax_number_2"
143
- t.text "other_designation"
144
- t.text "place"
145
- t.string "postal_code"
146
- t.text "street"
147
- t.text "locality"
148
- t.text "region"
127
+ t.string "zip_code_1"
128
+ t.string "zip_code_2"
129
+ t.text "address_1"
130
+ t.text "address_2"
131
+ t.text "address_1_note"
132
+ t.text "address_2_note"
133
+ t.string "telephone_number_1"
134
+ t.string "telephone_number_2"
135
+ t.string "fax_number_1"
136
+ t.string "fax_number_2"
137
+ t.text "other_designation"
138
+ t.text "place"
139
+ t.string "postal_code"
140
+ t.text "street"
141
+ t.text "locality"
142
+ t.text "region"
149
143
  t.datetime "date_of_birth"
150
144
  t.datetime "date_of_death"
151
- t.integer "language_id", default: 1, null: false
152
- t.integer "country_id", default: 1, null: false
153
- t.integer "agent_type_id", default: 1, null: false
154
- t.integer "lock_version", default: 0, null: false
155
- t.text "note"
156
- t.integer "required_role_id", default: 1, null: false
157
- t.integer "required_score", default: 0, null: false
158
- t.text "email"
159
- t.text "url"
160
- t.text "full_name_alternative_transcription"
161
- t.string "birth_date"
162
- t.string "death_date"
163
- t.string "agent_identifier"
164
- t.integer "profile_id"
165
- end
166
-
167
- add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
168
- add_index "agents", ["country_id"], name: "index_agents_on_country_id"
169
- add_index "agents", ["full_name"], name: "index_agents_on_full_name"
170
- add_index "agents", ["language_id"], name: "index_agents_on_language_id"
171
- add_index "agents", ["profile_id"], name: "index_agents_on_profile_id"
172
- add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
145
+ t.integer "language_id", default: 1, null: false
146
+ t.integer "country_id", default: 1, null: false
147
+ t.integer "agent_type_id", default: 1, null: false
148
+ t.integer "lock_version", default: 0, null: false
149
+ t.text "note"
150
+ t.integer "required_role_id", default: 1, null: false
151
+ t.integer "required_score", default: 0, null: false
152
+ t.text "email"
153
+ t.text "url"
154
+ t.text "full_name_alternative_transcription"
155
+ t.string "birth_date"
156
+ t.string "death_date"
157
+ t.string "agent_identifier"
158
+ t.integer "profile_id"
159
+ t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
160
+ t.index ["country_id"], name: "index_agents_on_country_id"
161
+ t.index ["full_name"], name: "index_agents_on_full_name"
162
+ t.index ["language_id"], name: "index_agents_on_language_id"
163
+ t.index ["profile_id"], name: "index_agents_on_profile_id"
164
+ t.index ["required_role_id"], name: "index_agents_on_required_role_id"
165
+ end
173
166
 
174
167
  create_table "baskets", force: :cascade do |t|
175
- t.integer "user_id"
176
- t.text "note"
177
- t.integer "lock_version", default: 0, null: false
168
+ t.integer "user_id"
169
+ t.text "note"
170
+ t.integer "lock_version", default: 0, null: false
178
171
  t.datetime "created_at"
179
172
  t.datetime "updated_at"
173
+ t.index ["user_id"], name: "index_baskets_on_user_id"
180
174
  end
181
175
 
182
- add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
183
-
184
176
  create_table "bookstores", force: :cascade do |t|
185
- t.text "name", null: false
186
- t.string "zip_code"
187
- t.text "address"
188
- t.text "note"
189
- t.string "telephone_number"
190
- t.string "fax_number"
191
- t.string "url"
192
- t.integer "position"
177
+ t.text "name", null: false
178
+ t.string "zip_code"
179
+ t.text "address"
180
+ t.text "note"
181
+ t.string "telephone_number"
182
+ t.string "fax_number"
183
+ t.string "url"
184
+ t.integer "position"
193
185
  t.datetime "deleted_at"
194
186
  t.datetime "created_at"
195
187
  t.datetime "updated_at"
196
188
  end
197
189
 
198
190
  create_table "budget_types", force: :cascade do |t|
199
- t.string "name"
200
- t.text "display_name"
201
- t.text "note"
202
- t.integer "position"
191
+ t.string "name"
192
+ t.text "display_name"
193
+ t.text "note"
194
+ t.integer "position"
203
195
  t.datetime "created_at"
204
196
  t.datetime "updated_at"
205
197
  end
206
198
 
207
199
  create_table "carrier_types", force: :cascade do |t|
208
- t.string "name", null: false
209
- t.text "display_name"
210
- t.text "note"
211
- t.integer "position"
200
+ t.string "name", null: false
201
+ t.text "display_name"
202
+ t.text "note"
203
+ t.integer "position"
212
204
  t.datetime "created_at"
213
205
  t.datetime "updated_at"
214
- t.string "attachment_file_name"
215
- t.string "attachment_content_type"
216
- t.integer "attachment_file_size"
206
+ t.string "attachment_file_name"
207
+ t.string "attachment_content_type"
208
+ t.integer "attachment_file_size"
217
209
  t.datetime "attachment_updated_at"
218
210
  end
219
211
 
220
212
  create_table "colors", force: :cascade do |t|
221
- t.integer "library_group_id"
222
- t.string "property"
223
- t.string "code"
224
- t.integer "position"
213
+ t.integer "library_group_id"
214
+ t.string "property"
215
+ t.string "code"
216
+ t.integer "position"
225
217
  t.datetime "created_at"
226
218
  t.datetime "updated_at"
219
+ t.index ["library_group_id"], name: "index_colors_on_library_group_id"
227
220
  end
228
221
 
229
- add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
230
-
231
222
  create_table "content_types", force: :cascade do |t|
232
- t.string "name", null: false
233
- t.text "display_name"
234
- t.text "note"
235
- t.integer "position"
223
+ t.string "name", null: false
224
+ t.text "display_name"
225
+ t.text "note"
226
+ t.integer "position"
236
227
  t.datetime "created_at"
237
228
  t.datetime "updated_at"
238
229
  end
239
230
 
240
231
  create_table "countries", force: :cascade do |t|
241
- t.string "name", null: false
242
- t.text "display_name"
243
- t.string "alpha_2"
244
- t.string "alpha_3"
245
- t.string "numeric_3"
246
- t.text "note"
232
+ t.string "name", null: false
233
+ t.text "display_name"
234
+ t.string "alpha_2"
235
+ t.string "alpha_3"
236
+ t.string "numeric_3"
237
+ t.text "note"
247
238
  t.integer "position"
239
+ t.index ["alpha_2"], name: "index_countries_on_alpha_2"
240
+ t.index ["alpha_3"], name: "index_countries_on_alpha_3"
241
+ t.index ["name"], name: "index_countries_on_name"
242
+ t.index ["numeric_3"], name: "index_countries_on_numeric_3"
248
243
  end
249
244
 
250
- add_index "countries", ["alpha_2"], name: "index_countries_on_alpha_2"
251
- add_index "countries", ["alpha_3"], name: "index_countries_on_alpha_3"
252
- add_index "countries", ["name"], name: "index_countries_on_name"
253
- add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
254
-
255
245
  create_table "create_types", force: :cascade do |t|
256
- t.string "name"
257
- t.text "display_name"
258
- t.text "note"
259
- t.integer "position"
246
+ t.string "name"
247
+ t.text "display_name"
248
+ t.text "note"
249
+ t.integer "position"
260
250
  t.datetime "created_at"
261
251
  t.datetime "updated_at"
262
252
  end
263
253
 
264
254
  create_table "creates", force: :cascade do |t|
265
- t.integer "agent_id", null: false
266
- t.integer "work_id", null: false
267
- t.integer "position"
255
+ t.integer "agent_id", null: false
256
+ t.integer "work_id", null: false
257
+ t.integer "position"
268
258
  t.datetime "created_at"
269
259
  t.datetime "updated_at"
270
- t.integer "create_type_id"
260
+ t.integer "create_type_id"
261
+ t.index ["agent_id"], name: "index_creates_on_agent_id"
262
+ t.index ["work_id"], name: "index_creates_on_work_id"
271
263
  end
272
264
 
273
- add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
274
- add_index "creates", ["work_id"], name: "index_creates_on_work_id"
275
-
276
265
  create_table "donates", force: :cascade do |t|
277
- t.integer "agent_id", null: false
278
- t.integer "item_id", null: false
266
+ t.integer "agent_id", null: false
267
+ t.integer "item_id", null: false
279
268
  t.datetime "created_at"
280
269
  t.datetime "updated_at"
270
+ t.index ["agent_id"], name: "index_donates_on_agent_id"
271
+ t.index ["item_id"], name: "index_donates_on_item_id"
281
272
  end
282
273
 
283
- add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
284
- add_index "donates", ["item_id"], name: "index_donates_on_item_id"
285
-
286
274
  create_table "exemplifies", force: :cascade do |t|
287
- t.integer "manifestation_id", null: false
288
- t.integer "item_id", null: false
289
- t.integer "position"
275
+ t.integer "manifestation_id", null: false
276
+ t.integer "item_id", null: false
277
+ t.integer "position"
290
278
  t.datetime "created_at"
291
279
  t.datetime "updated_at"
280
+ t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true
281
+ t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
292
282
  end
293
283
 
294
- add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
295
- add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
296
-
297
284
  create_table "extents", force: :cascade do |t|
298
- t.string "name", null: false
299
- t.text "display_name"
300
- t.text "note"
301
- t.integer "position"
285
+ t.string "name", null: false
286
+ t.text "display_name"
287
+ t.text "note"
288
+ t.integer "position"
302
289
  t.datetime "created_at"
303
290
  t.datetime "updated_at"
304
291
  end
305
292
 
306
293
  create_table "form_of_works", force: :cascade do |t|
307
- t.string "name", null: false
308
- t.text "display_name"
309
- t.text "note"
310
- t.integer "position"
294
+ t.string "name", null: false
295
+ t.text "display_name"
296
+ t.text "note"
297
+ t.integer "position"
311
298
  t.datetime "created_at"
312
299
  t.datetime "updated_at"
313
300
  end
314
301
 
315
302
  create_table "frequencies", force: :cascade do |t|
316
- t.string "name", null: false
317
- t.text "display_name"
318
- t.text "note"
319
- t.integer "position"
303
+ t.string "name", null: false
304
+ t.text "display_name"
305
+ t.text "note"
306
+ t.integer "position"
320
307
  t.datetime "created_at"
321
308
  t.datetime "updated_at"
322
309
  end
323
310
 
324
311
  create_table "identifier_types", force: :cascade do |t|
325
- t.string "name"
326
- t.text "display_name"
327
- t.text "note"
328
- t.integer "position"
312
+ t.string "name"
313
+ t.text "display_name"
314
+ t.text "note"
315
+ t.integer "position"
329
316
  t.datetime "created_at"
330
317
  t.datetime "updated_at"
331
318
  end
332
319
 
333
320
  create_table "identifiers", force: :cascade do |t|
334
- t.string "body", null: false
335
- t.integer "identifier_type_id", null: false
336
- t.integer "manifestation_id"
337
- t.boolean "primary"
338
- t.integer "position"
321
+ t.string "body", null: false
322
+ t.integer "identifier_type_id", null: false
323
+ t.integer "manifestation_id"
324
+ t.boolean "primary"
325
+ t.integer "position"
339
326
  t.datetime "created_at"
340
327
  t.datetime "updated_at"
328
+ t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
329
+ t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
341
330
  end
342
331
 
343
- add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
344
- add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
345
-
346
332
  create_table "import_request_transitions", force: :cascade do |t|
347
- t.string "to_state"
348
- t.text "metadata", default: "{}"
349
- t.integer "sort_key"
350
- t.integer "import_request_id"
333
+ t.string "to_state"
334
+ t.text "metadata", default: "{}"
335
+ t.integer "sort_key"
336
+ t.integer "import_request_id"
351
337
  t.datetime "created_at"
352
338
  t.datetime "updated_at"
353
- t.boolean "most_recent", null: false
339
+ t.boolean "most_recent", null: false
340
+ t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
341
+ t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
342
+ t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
354
343
  end
355
344
 
356
- add_index "import_request_transitions", ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true
357
- add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
358
- add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
359
-
360
345
  create_table "import_requests", force: :cascade do |t|
361
- t.string "isbn"
362
- t.integer "manifestation_id"
363
- t.integer "user_id"
346
+ t.string "isbn"
347
+ t.integer "manifestation_id"
348
+ t.integer "user_id"
364
349
  t.datetime "created_at"
365
350
  t.datetime "updated_at"
351
+ t.index ["isbn"], name: "index_import_requests_on_isbn"
352
+ t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
353
+ t.index ["user_id"], name: "index_import_requests_on_user_id"
366
354
  end
367
355
 
368
- add_index "import_requests", ["isbn"], name: "index_import_requests_on_isbn"
369
- add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
370
- add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
371
-
372
356
  create_table "items", force: :cascade do |t|
373
- t.string "call_number"
374
- t.string "item_identifier"
357
+ t.string "call_number"
358
+ t.string "item_identifier"
375
359
  t.datetime "created_at"
376
360
  t.datetime "updated_at"
377
361
  t.datetime "deleted_at"
378
- t.integer "shelf_id", default: 1, null: false
379
- t.boolean "include_supplements", default: false, null: false
380
- t.text "note"
381
- t.string "url"
382
- t.integer "price"
383
- t.integer "lock_version", default: 0, null: false
384
- t.integer "required_role_id", default: 1, null: false
385
- t.integer "required_score", default: 0, null: false
362
+ t.integer "shelf_id", default: 1, null: false
363
+ t.boolean "include_supplements", default: false, null: false
364
+ t.text "note"
365
+ t.string "url"
366
+ t.integer "price"
367
+ t.integer "lock_version", default: 0, null: false
368
+ t.integer "required_role_id", default: 1, null: false
369
+ t.integer "required_score", default: 0, null: false
386
370
  t.datetime "acquired_at"
387
- t.integer "bookstore_id"
388
- t.integer "budget_type_id"
389
- t.string "binding_item_identifier"
390
- t.string "binding_call_number"
371
+ t.integer "bookstore_id"
372
+ t.integer "budget_type_id"
373
+ t.string "binding_item_identifier"
374
+ t.string "binding_call_number"
391
375
  t.datetime "binded_at"
392
- t.integer "manifestation_id", null: false
376
+ t.integer "manifestation_id", null: false
377
+ t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
378
+ t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
379
+ t.index ["item_identifier"], name: "index_items_on_item_identifier"
380
+ t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
381
+ t.index ["required_role_id"], name: "index_items_on_required_role_id"
382
+ t.index ["shelf_id"], name: "index_items_on_shelf_id"
393
383
  end
394
384
 
395
- add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
396
- add_index "items", ["bookstore_id"], name: "index_items_on_bookstore_id"
397
- add_index "items", ["item_identifier"], name: "index_items_on_item_identifier"
398
- add_index "items", ["manifestation_id"], name: "index_items_on_manifestation_id"
399
- add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
400
- add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
401
-
402
385
  create_table "languages", force: :cascade do |t|
403
- t.string "name", null: false
404
- t.string "native_name"
405
- t.text "display_name"
406
- t.string "iso_639_1"
407
- t.string "iso_639_2"
408
- t.string "iso_639_3"
409
- t.text "note"
386
+ t.string "name", null: false
387
+ t.string "native_name"
388
+ t.text "display_name"
389
+ t.string "iso_639_1"
390
+ t.string "iso_639_2"
391
+ t.string "iso_639_3"
392
+ t.text "note"
410
393
  t.integer "position"
394
+ t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
395
+ t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
396
+ t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
397
+ t.index ["name"], name: "index_languages_on_name", unique: true
411
398
  end
412
399
 
413
- add_index "languages", ["iso_639_1"], name: "index_languages_on_iso_639_1"
414
- add_index "languages", ["iso_639_2"], name: "index_languages_on_iso_639_2"
415
- add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
416
- add_index "languages", ["name"], name: "index_languages_on_name", unique: true
417
-
418
400
  create_table "libraries", force: :cascade do |t|
419
- t.string "name", null: false
420
- t.text "display_name"
421
- t.string "short_display_name", null: false
422
- t.string "zip_code"
423
- t.text "street"
424
- t.text "locality"
425
- t.text "region"
426
- t.string "telephone_number_1"
427
- t.string "telephone_number_2"
428
- t.string "fax_number"
429
- t.text "note"
430
- t.integer "call_number_rows", default: 1, null: false
431
- t.string "call_number_delimiter", default: "|", null: false
432
- t.integer "library_group_id", null: false
433
- t.integer "users_count", default: 0, null: false
434
- t.integer "position"
435
- t.integer "country_id"
401
+ t.string "name", null: false
402
+ t.text "display_name"
403
+ t.string "short_display_name", null: false
404
+ t.string "zip_code"
405
+ t.text "street"
406
+ t.text "locality"
407
+ t.text "region"
408
+ t.string "telephone_number_1"
409
+ t.string "telephone_number_2"
410
+ t.string "fax_number"
411
+ t.text "note"
412
+ t.integer "call_number_rows", default: 1, null: false
413
+ t.string "call_number_delimiter", default: "|", null: false
414
+ t.integer "library_group_id", null: false
415
+ t.integer "users_count", default: 0, null: false
416
+ t.integer "position"
417
+ t.integer "country_id"
436
418
  t.datetime "created_at"
437
419
  t.datetime "updated_at"
438
420
  t.datetime "deleted_at"
439
- t.text "opening_hour"
440
- t.string "isil"
441
- t.float "latitude"
442
- t.float "longitude"
421
+ t.text "opening_hour"
422
+ t.string "isil"
423
+ t.float "latitude"
424
+ t.float "longitude"
425
+ t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
426
+ t.index ["name"], name: "index_libraries_on_name"
443
427
  end
444
428
 
445
- add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
446
- add_index "libraries", ["name"], name: "index_libraries_on_name"
447
-
448
429
  create_table "library_group_translations", force: :cascade do |t|
449
- t.integer "library_group_id", null: false
450
- t.string "locale", null: false
451
- t.datetime "created_at", null: false
452
- t.datetime "updated_at", null: false
453
- t.text "login_banner"
454
- t.text "footer_banner"
430
+ t.integer "library_group_id", null: false
431
+ t.string "locale", null: false
432
+ t.datetime "created_at", null: false
433
+ t.datetime "updated_at", null: false
434
+ t.text "login_banner"
435
+ t.text "footer_banner"
436
+ t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
437
+ t.index ["locale"], name: "index_library_group_translations_on_locale"
455
438
  end
456
439
 
457
- add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
458
- add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
459
-
460
440
  create_table "library_groups", force: :cascade do |t|
461
- t.string "name", null: false
462
- t.text "display_name"
463
- t.string "short_name", null: false
464
- t.text "my_networks"
465
- t.text "old_login_banner"
466
- t.text "note"
467
- t.integer "country_id"
468
- t.integer "position"
469
- t.datetime "created_at"
470
- t.datetime "updated_at"
471
- t.text "admin_networks"
472
- t.string "url", default: "http://localhost:3000/"
473
- t.text "settings"
474
- t.text "html_snippet"
475
- t.integer "max_number_of_results", default: 500
476
- t.boolean "family_name_first", default: true
477
- t.integer "pub_year_facet_range_interval", default: 10
478
- t.integer "user_id"
479
- t.boolean "csv_charset_conversion", default: false, null: false
480
- t.string "header_logo_file_name"
481
- t.string "header_logo_content_type"
482
- t.integer "header_logo_file_size"
441
+ t.string "name", null: false
442
+ t.text "display_name"
443
+ t.string "short_name", null: false
444
+ t.text "my_networks"
445
+ t.text "old_login_banner"
446
+ t.text "note"
447
+ t.integer "country_id"
448
+ t.integer "position"
449
+ t.datetime "created_at"
450
+ t.datetime "updated_at"
451
+ t.text "admin_networks"
452
+ t.string "url", default: "http://localhost:3000/"
453
+ t.text "settings"
454
+ t.text "html_snippet"
455
+ t.integer "max_number_of_results", default: 500
456
+ t.boolean "family_name_first", default: true
457
+ t.integer "pub_year_facet_range_interval", default: 10
458
+ t.integer "user_id"
459
+ t.boolean "csv_charset_conversion", default: false, null: false
460
+ t.string "header_logo_file_name"
461
+ t.string "header_logo_content_type"
462
+ t.integer "header_logo_file_size"
483
463
  t.datetime "header_logo_updated_at"
484
- t.text "header_logo_meta"
464
+ t.text "header_logo_meta"
465
+ t.index ["short_name"], name: "index_library_groups_on_short_name"
466
+ t.index ["user_id"], name: "index_library_groups_on_user_id"
485
467
  end
486
468
 
487
- add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
488
- add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
489
-
490
469
  create_table "licenses", force: :cascade do |t|
491
- t.string "name", null: false
492
- t.string "display_name"
493
- t.text "note"
494
- t.integer "position"
470
+ t.string "name", null: false
471
+ t.string "display_name"
472
+ t.text "note"
473
+ t.integer "position"
495
474
  t.datetime "created_at"
496
475
  t.datetime "updated_at"
497
476
  end
498
477
 
499
478
  create_table "manifestation_relationship_types", force: :cascade do |t|
500
- t.string "name", null: false
501
- t.text "display_name"
502
- t.text "note"
503
- t.integer "position"
479
+ t.string "name", null: false
480
+ t.text "display_name"
481
+ t.text "note"
482
+ t.integer "position"
504
483
  t.datetime "created_at"
505
484
  t.datetime "updated_at"
506
485
  end
507
486
 
508
487
  create_table "manifestation_relationships", force: :cascade do |t|
509
- t.integer "parent_id"
510
- t.integer "child_id"
511
- t.integer "manifestation_relationship_type_id"
488
+ t.integer "parent_id"
489
+ t.integer "child_id"
490
+ t.integer "manifestation_relationship_type_id"
512
491
  t.datetime "created_at"
513
492
  t.datetime "updated_at"
514
- t.integer "position"
493
+ t.integer "position"
494
+ t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
495
+ t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
515
496
  end
516
497
 
517
- add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
518
- add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
519
-
520
498
  create_table "manifestations", force: :cascade do |t|
521
- t.text "original_title", null: false
522
- t.text "title_alternative"
523
- t.text "title_transcription"
524
- t.string "classification_number"
525
- t.string "manifestation_identifier"
499
+ t.text "original_title", null: false
500
+ t.text "title_alternative"
501
+ t.text "title_transcription"
502
+ t.string "classification_number"
503
+ t.string "manifestation_identifier"
526
504
  t.datetime "date_of_publication"
527
505
  t.datetime "date_copyrighted"
528
506
  t.datetime "created_at"
529
507
  t.datetime "updated_at"
530
508
  t.datetime "deleted_at"
531
- t.string "access_address"
532
- t.integer "language_id", default: 1, null: false
533
- t.integer "carrier_type_id", default: 1, null: false
534
- t.integer "start_page"
535
- t.integer "end_page"
536
- t.integer "height"
537
- t.integer "width"
538
- t.integer "depth"
539
- t.integer "price"
540
- t.text "fulltext"
541
- t.string "volume_number_string"
542
- t.string "issue_number_string"
543
- t.string "serial_number_string"
544
- t.integer "edition"
545
- t.text "note"
546
- t.boolean "repository_content", default: false, null: false
547
- t.integer "lock_version", default: 0, null: false
548
- t.integer "required_role_id", default: 1, null: false
549
- t.integer "required_score", default: 0, null: false
550
- t.integer "frequency_id", default: 1, null: false
551
- t.boolean "subscription_master", default: false, null: false
552
- t.string "attachment_file_name"
553
- t.string "attachment_content_type"
554
- t.integer "attachment_file_size"
509
+ t.string "access_address"
510
+ t.integer "language_id", default: 1, null: false
511
+ t.integer "carrier_type_id", default: 1, null: false
512
+ t.integer "start_page"
513
+ t.integer "end_page"
514
+ t.integer "height"
515
+ t.integer "width"
516
+ t.integer "depth"
517
+ t.integer "price"
518
+ t.text "fulltext"
519
+ t.string "volume_number_string"
520
+ t.string "issue_number_string"
521
+ t.string "serial_number_string"
522
+ t.integer "edition"
523
+ t.text "note"
524
+ t.boolean "repository_content", default: false, null: false
525
+ t.integer "lock_version", default: 0, null: false
526
+ t.integer "required_role_id", default: 1, null: false
527
+ t.integer "required_score", default: 0, null: false
528
+ t.integer "frequency_id", default: 1, null: false
529
+ t.boolean "subscription_master", default: false, null: false
530
+ t.string "attachment_file_name"
531
+ t.string "attachment_content_type"
532
+ t.integer "attachment_file_size"
555
533
  t.datetime "attachment_updated_at"
556
- t.text "title_alternative_transcription"
557
- t.text "description"
558
- t.text "abstract"
534
+ t.text "title_alternative_transcription"
535
+ t.text "description"
536
+ t.text "abstract"
559
537
  t.datetime "available_at"
560
538
  t.datetime "valid_until"
561
539
  t.datetime "date_submitted"
562
540
  t.datetime "date_accepted"
563
541
  t.datetime "date_captured"
564
- t.string "pub_date"
565
- t.string "edition_string"
566
- t.integer "volume_number"
567
- t.integer "issue_number"
568
- t.integer "serial_number"
569
- t.integer "content_type_id", default: 1
570
- t.integer "year_of_publication"
571
- t.text "attachment_meta"
572
- t.integer "month_of_publication"
573
- t.boolean "fulltext_content"
574
- t.boolean "serial"
575
- t.text "statement_of_responsibility"
576
- t.text "publication_place"
577
- t.text "extent_of_text"
578
- t.text "extent"
579
- t.text "dimensions"
580
- end
581
-
582
- add_index "manifestations", ["access_address"], name: "index_manifestations_on_access_address"
583
- add_index "manifestations", ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
584
- add_index "manifestations", ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
585
- add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
542
+ t.string "pub_date"
543
+ t.string "edition_string"
544
+ t.integer "volume_number"
545
+ t.integer "issue_number"
546
+ t.integer "serial_number"
547
+ t.integer "content_type_id", default: 1
548
+ t.integer "year_of_publication"
549
+ t.text "attachment_meta"
550
+ t.integer "month_of_publication"
551
+ t.boolean "fulltext_content"
552
+ t.boolean "serial"
553
+ t.text "statement_of_responsibility"
554
+ t.text "publication_place"
555
+ t.text "extent_of_text"
556
+ t.text "extent"
557
+ t.text "dimensions"
558
+ t.index ["access_address"], name: "index_manifestations_on_access_address"
559
+ t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
560
+ t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
561
+ t.index ["updated_at"], name: "index_manifestations_on_updated_at"
562
+ end
586
563
 
587
564
  create_table "medium_of_performances", force: :cascade do |t|
588
- t.string "name", null: false
589
- t.text "display_name"
590
- t.text "note"
591
- t.integer "position"
565
+ t.string "name", null: false
566
+ t.text "display_name"
567
+ t.text "note"
568
+ t.integer "position"
592
569
  t.datetime "created_at"
593
570
  t.datetime "updated_at"
594
571
  end
595
572
 
596
573
  create_table "message_request_transitions", force: :cascade do |t|
597
- t.string "to_state"
598
- t.text "metadata", default: "{}"
599
- t.integer "sort_key"
600
- t.integer "message_request_id"
574
+ t.string "to_state"
575
+ t.text "metadata", default: "{}"
576
+ t.integer "sort_key"
577
+ t.integer "message_request_id"
601
578
  t.datetime "created_at"
602
579
  t.datetime "updated_at"
603
- t.boolean "most_recent", null: false
580
+ t.boolean "most_recent", null: false
581
+ t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
582
+ t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
583
+ t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
604
584
  end
605
585
 
606
- add_index "message_request_transitions", ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true
607
- add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
608
- add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
609
-
610
586
  create_table "message_requests", force: :cascade do |t|
611
- t.integer "sender_id"
612
- t.integer "receiver_id"
613
- t.integer "message_template_id"
587
+ t.integer "sender_id"
588
+ t.integer "receiver_id"
589
+ t.integer "message_template_id"
614
590
  t.datetime "sent_at"
615
591
  t.datetime "deleted_at"
616
- t.text "body"
592
+ t.text "body"
617
593
  t.datetime "created_at"
618
594
  t.datetime "updated_at"
619
595
  end
620
596
 
621
597
  create_table "message_templates", force: :cascade do |t|
622
- t.string "status", null: false
623
- t.text "title", null: false
624
- t.text "body", null: false
625
- t.integer "position"
626
- t.string "locale", default: "en"
598
+ t.string "status", null: false
599
+ t.text "title", null: false
600
+ t.text "body", null: false
601
+ t.integer "position"
602
+ t.string "locale", default: "en"
627
603
  t.datetime "created_at"
628
604
  t.datetime "updated_at"
605
+ t.index ["status"], name: "index_message_templates_on_status", unique: true
629
606
  end
630
607
 
631
- add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
632
-
633
608
  create_table "message_transitions", force: :cascade do |t|
634
- t.string "to_state"
635
- t.text "metadata", default: "{}"
636
- t.integer "sort_key"
637
- t.integer "message_id"
609
+ t.string "to_state"
610
+ t.text "metadata", default: "{}"
611
+ t.integer "sort_key"
612
+ t.integer "message_id"
638
613
  t.datetime "created_at"
639
614
  t.datetime "updated_at"
640
- t.boolean "most_recent", null: false
615
+ t.boolean "most_recent", null: false
616
+ t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
617
+ t.index ["message_id"], name: "index_message_transitions_on_message_id"
618
+ t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
641
619
  end
642
620
 
643
- add_index "message_transitions", ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true
644
- add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
645
- add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
646
-
647
621
  create_table "messages", force: :cascade do |t|
648
622
  t.datetime "read_at"
649
- t.integer "sender_id"
650
- t.integer "receiver_id"
651
- t.string "subject", null: false
652
- t.text "body"
653
- t.integer "message_request_id"
654
- t.integer "parent_id"
623
+ t.integer "sender_id"
624
+ t.integer "receiver_id"
625
+ t.string "subject", null: false
626
+ t.text "body"
627
+ t.integer "message_request_id"
628
+ t.integer "parent_id"
655
629
  t.datetime "created_at"
656
630
  t.datetime "updated_at"
657
- t.integer "lft"
658
- t.integer "rgt"
659
- t.integer "depth"
631
+ t.integer "lft"
632
+ t.integer "rgt"
633
+ t.integer "depth"
634
+ t.index ["message_request_id"], name: "index_messages_on_message_request_id"
635
+ t.index ["parent_id"], name: "index_messages_on_parent_id"
636
+ t.index ["receiver_id"], name: "index_messages_on_receiver_id"
637
+ t.index ["sender_id"], name: "index_messages_on_sender_id"
660
638
  end
661
639
 
662
- add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
663
- add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
664
- add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
665
- add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
666
-
667
640
  create_table "owns", force: :cascade do |t|
668
- t.integer "agent_id", null: false
669
- t.integer "item_id", null: false
670
- t.integer "position"
641
+ t.integer "agent_id", null: false
642
+ t.integer "item_id", null: false
643
+ t.integer "position"
671
644
  t.datetime "created_at"
672
645
  t.datetime "updated_at"
646
+ t.index ["agent_id"], name: "index_owns_on_agent_id"
647
+ t.index ["item_id"], name: "index_owns_on_item_id"
673
648
  end
674
649
 
675
- add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
676
- add_index "owns", ["item_id"], name: "index_owns_on_item_id"
677
-
678
650
  create_table "picture_files", force: :cascade do |t|
679
- t.integer "picture_attachable_id"
680
- t.string "picture_attachable_type"
681
- t.string "content_type"
682
- t.text "title"
683
- t.string "thumbnail"
684
- t.integer "position"
651
+ t.integer "picture_attachable_id"
652
+ t.string "picture_attachable_type"
653
+ t.string "content_type"
654
+ t.text "title"
655
+ t.string "thumbnail"
656
+ t.integer "position"
685
657
  t.datetime "created_at"
686
658
  t.datetime "updated_at"
687
- t.string "picture_file_name"
688
- t.string "picture_content_type"
689
- t.integer "picture_file_size"
659
+ t.string "picture_file_name"
660
+ t.string "picture_content_type"
661
+ t.integer "picture_file_size"
690
662
  t.datetime "picture_updated_at"
691
- t.text "picture_meta"
692
- t.string "picture_fingerprint"
693
- t.integer "picture_width"
694
- t.integer "picture_height"
663
+ t.text "picture_meta"
664
+ t.string "picture_fingerprint"
665
+ t.integer "picture_width"
666
+ t.integer "picture_height"
667
+ t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
695
668
  end
696
669
 
697
- add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
698
-
699
670
  create_table "produce_types", force: :cascade do |t|
700
- t.string "name"
701
- t.text "display_name"
702
- t.text "note"
703
- t.integer "position"
671
+ t.string "name"
672
+ t.text "display_name"
673
+ t.text "note"
674
+ t.integer "position"
704
675
  t.datetime "created_at"
705
676
  t.datetime "updated_at"
706
677
  end
707
678
 
708
679
  create_table "produces", force: :cascade do |t|
709
- t.integer "agent_id", null: false
710
- t.integer "manifestation_id", null: false
711
- t.integer "position"
680
+ t.integer "agent_id", null: false
681
+ t.integer "manifestation_id", null: false
682
+ t.integer "position"
712
683
  t.datetime "created_at"
713
684
  t.datetime "updated_at"
714
- t.integer "produce_type_id"
685
+ t.integer "produce_type_id"
686
+ t.index ["agent_id"], name: "index_produces_on_agent_id"
687
+ t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
715
688
  end
716
689
 
717
- add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
718
- add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
719
-
720
690
  create_table "profiles", force: :cascade do |t|
721
- t.integer "user_id"
722
- t.integer "user_group_id"
723
- t.integer "library_id"
724
- t.string "locale"
725
- t.string "user_number"
726
- t.text "full_name"
727
- t.text "note"
728
- t.text "keyword_list"
729
- t.integer "required_role_id"
691
+ t.integer "user_id"
692
+ t.integer "user_group_id"
693
+ t.integer "library_id"
694
+ t.string "locale"
695
+ t.string "user_number"
696
+ t.text "full_name"
697
+ t.text "note"
698
+ t.text "keyword_list"
699
+ t.integer "required_role_id"
730
700
  t.datetime "created_at"
731
701
  t.datetime "updated_at"
732
702
  t.datetime "expired_at"
733
- t.text "full_name_transcription"
703
+ t.text "full_name_transcription"
734
704
  t.datetime "date_of_birth"
705
+ t.index ["user_id"], name: "index_profiles_on_user_id"
706
+ t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
735
707
  end
736
708
 
737
- add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
738
- add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
739
-
740
709
  create_table "realize_types", force: :cascade do |t|
741
- t.string "name"
742
- t.text "display_name"
743
- t.text "note"
744
- t.integer "position"
710
+ t.string "name"
711
+ t.text "display_name"
712
+ t.text "note"
713
+ t.integer "position"
745
714
  t.datetime "created_at"
746
715
  t.datetime "updated_at"
747
716
  end
748
717
 
749
718
  create_table "realizes", force: :cascade do |t|
750
- t.integer "agent_id", null: false
751
- t.integer "expression_id", null: false
752
- t.integer "position"
719
+ t.integer "agent_id", null: false
720
+ t.integer "expression_id", null: false
721
+ t.integer "position"
753
722
  t.datetime "created_at"
754
723
  t.datetime "updated_at"
755
- t.integer "realize_type_id"
724
+ t.integer "realize_type_id"
725
+ t.index ["agent_id"], name: "index_realizes_on_agent_id"
726
+ t.index ["expression_id"], name: "index_realizes_on_expression_id"
756
727
  end
757
728
 
758
- add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
759
- add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
760
-
761
729
  create_table "request_status_types", force: :cascade do |t|
762
- t.string "name", null: false
763
- t.text "display_name"
764
- t.text "note"
765
- t.integer "position"
730
+ t.string "name", null: false
731
+ t.text "display_name"
732
+ t.text "note"
733
+ t.integer "position"
766
734
  t.datetime "created_at"
767
735
  t.datetime "updated_at"
768
736
  end
769
737
 
770
738
  create_table "request_types", force: :cascade do |t|
771
- t.string "name", null: false
772
- t.text "display_name"
773
- t.text "note"
774
- t.integer "position"
739
+ t.string "name", null: false
740
+ t.text "display_name"
741
+ t.text "note"
742
+ t.integer "position"
775
743
  t.datetime "created_at"
776
744
  t.datetime "updated_at"
777
745
  end
778
746
 
779
747
  create_table "resource_export_file_transitions", force: :cascade do |t|
780
- t.string "to_state"
781
- t.text "metadata", default: "{}"
782
- t.integer "sort_key"
783
- t.integer "resource_export_file_id"
748
+ t.string "to_state"
749
+ t.text "metadata", default: "{}"
750
+ t.integer "sort_key"
751
+ t.integer "resource_export_file_id"
784
752
  t.datetime "created_at"
785
753
  t.datetime "updated_at"
786
- t.boolean "most_recent", null: false
754
+ t.boolean "most_recent", null: false
755
+ t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
756
+ t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
757
+ t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
787
758
  end
788
759
 
789
- add_index "resource_export_file_transitions", ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true
790
- add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
791
- 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
792
-
793
760
  create_table "resource_export_files", force: :cascade do |t|
794
- t.integer "user_id"
795
- t.string "resource_export_file_name"
796
- t.string "resource_export_content_type"
797
- t.integer "resource_export_file_size"
761
+ t.integer "user_id"
762
+ t.string "resource_export_file_name"
763
+ t.string "resource_export_content_type"
764
+ t.integer "resource_export_file_size"
798
765
  t.datetime "resource_export_updated_at"
799
766
  t.datetime "executed_at"
800
767
  t.datetime "created_at"
@@ -802,306 +769,289 @@ ActiveRecord::Schema.define(version: 20180107162711) do
802
769
  end
803
770
 
804
771
  create_table "resource_import_file_transitions", force: :cascade do |t|
805
- t.string "to_state"
806
- t.text "metadata", default: "{}"
807
- t.integer "sort_key"
808
- t.integer "resource_import_file_id"
772
+ t.string "to_state"
773
+ t.text "metadata", default: "{}"
774
+ t.integer "sort_key"
775
+ t.integer "resource_import_file_id"
809
776
  t.datetime "created_at"
810
777
  t.datetime "updated_at"
811
- t.boolean "most_recent", null: false
778
+ t.boolean "most_recent", null: false
779
+ t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
780
+ t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
781
+ t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
812
782
  end
813
783
 
814
- add_index "resource_import_file_transitions", ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true
815
- add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
816
- 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
817
-
818
784
  create_table "resource_import_files", force: :cascade do |t|
819
- t.integer "parent_id"
820
- t.string "content_type"
821
- t.integer "size"
822
- t.integer "user_id"
823
- t.text "note"
785
+ t.integer "parent_id"
786
+ t.string "content_type"
787
+ t.integer "size"
788
+ t.integer "user_id"
789
+ t.text "note"
824
790
  t.datetime "executed_at"
825
- t.string "resource_import_file_name"
826
- t.string "resource_import_content_type"
827
- t.integer "resource_import_file_size"
791
+ t.string "resource_import_file_name"
792
+ t.string "resource_import_content_type"
793
+ t.integer "resource_import_file_size"
828
794
  t.datetime "resource_import_updated_at"
829
795
  t.datetime "created_at"
830
796
  t.datetime "updated_at"
831
- t.string "edit_mode"
832
- t.string "resource_import_fingerprint"
833
- t.text "error_message"
834
- t.string "user_encoding"
835
- t.integer "default_shelf_id"
797
+ t.string "edit_mode"
798
+ t.string "resource_import_fingerprint"
799
+ t.text "error_message"
800
+ t.string "user_encoding"
801
+ t.integer "default_shelf_id"
802
+ t.index ["parent_id"], name: "index_resource_import_files_on_parent_id"
803
+ t.index ["user_id"], name: "index_resource_import_files_on_user_id"
836
804
  end
837
805
 
838
- add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
839
- add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
840
-
841
806
  create_table "resource_import_results", force: :cascade do |t|
842
- t.integer "resource_import_file_id"
843
- t.integer "manifestation_id"
844
- t.integer "item_id"
845
- t.text "body"
807
+ t.integer "resource_import_file_id"
808
+ t.integer "manifestation_id"
809
+ t.integer "item_id"
810
+ t.text "body"
846
811
  t.datetime "created_at"
847
812
  t.datetime "updated_at"
848
- t.text "error_message"
813
+ t.text "error_message"
814
+ t.index ["item_id"], name: "index_resource_import_results_on_item_id"
815
+ t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
816
+ t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
849
817
  end
850
818
 
851
- add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
852
- add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
853
- add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
854
-
855
819
  create_table "roles", force: :cascade do |t|
856
- t.string "name", null: false
857
- t.string "display_name"
858
- t.text "note"
820
+ t.string "name", null: false
821
+ t.string "display_name"
822
+ t.text "note"
859
823
  t.datetime "created_at"
860
824
  t.datetime "updated_at"
861
- t.integer "score", default: 0, null: false
862
- t.integer "position"
825
+ t.integer "score", default: 0, null: false
826
+ t.integer "position"
863
827
  end
864
828
 
865
829
  create_table "search_engines", force: :cascade do |t|
866
- t.string "name", null: false
867
- t.text "display_name"
868
- t.string "url", null: false
869
- t.text "base_url", null: false
870
- t.text "http_method", null: false
871
- t.text "query_param", null: false
872
- t.text "additional_param"
873
- t.text "note"
874
- t.integer "position"
830
+ t.string "name", null: false
831
+ t.text "display_name"
832
+ t.string "url", null: false
833
+ t.text "base_url", null: false
834
+ t.text "http_method", null: false
835
+ t.text "query_param", null: false
836
+ t.text "additional_param"
837
+ t.text "note"
838
+ t.integer "position"
875
839
  t.datetime "created_at"
876
840
  t.datetime "updated_at"
877
841
  end
878
842
 
879
843
  create_table "series_statement_merge_lists", force: :cascade do |t|
880
- t.string "title"
844
+ t.string "title"
881
845
  t.datetime "created_at"
882
846
  t.datetime "updated_at"
883
847
  end
884
848
 
885
849
  create_table "series_statement_merges", force: :cascade do |t|
886
- t.integer "series_statement_id", null: false
887
- t.integer "series_statement_merge_list_id", null: false
850
+ t.integer "series_statement_id", null: false
851
+ t.integer "series_statement_merge_list_id", null: false
888
852
  t.datetime "created_at"
889
853
  t.datetime "updated_at"
854
+ t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
855
+ t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
890
856
  end
891
857
 
892
- add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
893
- add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
894
-
895
858
  create_table "series_statements", force: :cascade do |t|
896
- t.text "original_title"
897
- t.text "numbering"
898
- t.text "title_subseries"
899
- t.text "numbering_subseries"
900
- t.integer "position"
901
- t.datetime "created_at"
902
- t.datetime "updated_at"
903
- t.text "title_transcription"
904
- t.text "title_alternative"
905
- t.string "series_statement_identifier"
906
- t.integer "manifestation_id"
907
- t.text "note"
908
- t.text "title_subseries_transcription"
909
- t.text "creator_string"
910
- t.text "volume_number_string"
911
- t.text "volume_number_transcription_string"
912
- t.boolean "series_master"
913
- t.integer "root_manifestation_id"
914
- end
915
-
916
- add_index "series_statements", ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
917
- add_index "series_statements", ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
918
- add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
859
+ t.text "original_title"
860
+ t.text "numbering"
861
+ t.text "title_subseries"
862
+ t.text "numbering_subseries"
863
+ t.integer "position"
864
+ t.datetime "created_at"
865
+ t.datetime "updated_at"
866
+ t.text "title_transcription"
867
+ t.text "title_alternative"
868
+ t.string "series_statement_identifier"
869
+ t.integer "manifestation_id"
870
+ t.text "note"
871
+ t.text "title_subseries_transcription"
872
+ t.text "creator_string"
873
+ t.text "volume_number_string"
874
+ t.text "volume_number_transcription_string"
875
+ t.boolean "series_master"
876
+ t.integer "root_manifestation_id"
877
+ t.index ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
878
+ t.index ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
879
+ t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
880
+ end
919
881
 
920
882
  create_table "shelves", force: :cascade do |t|
921
- t.string "name", null: false
922
- t.text "display_name"
923
- t.text "note"
924
- t.integer "library_id", null: false
925
- t.integer "items_count", default: 0, null: false
926
- t.integer "position"
883
+ t.string "name", null: false
884
+ t.text "display_name"
885
+ t.text "note"
886
+ t.integer "library_id", null: false
887
+ t.integer "items_count", default: 0, null: false
888
+ t.integer "position"
927
889
  t.datetime "created_at"
928
890
  t.datetime "updated_at"
929
891
  t.datetime "deleted_at"
930
- t.boolean "closed", default: false, null: false
892
+ t.boolean "closed", default: false, null: false
893
+ t.index ["library_id"], name: "index_shelves_on_library_id"
931
894
  end
932
895
 
933
- add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
934
-
935
896
  create_table "subscribes", force: :cascade do |t|
936
- t.integer "subscription_id", null: false
937
- t.integer "work_id", null: false
938
- t.datetime "start_at", null: false
939
- t.datetime "end_at", null: false
897
+ t.integer "subscription_id", null: false
898
+ t.integer "work_id", null: false
899
+ t.datetime "start_at", null: false
900
+ t.datetime "end_at", null: false
940
901
  t.datetime "created_at"
941
902
  t.datetime "updated_at"
903
+ t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
904
+ t.index ["work_id"], name: "index_subscribes_on_work_id"
942
905
  end
943
906
 
944
- add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
945
- add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
946
-
947
907
  create_table "subscriptions", force: :cascade do |t|
948
- t.text "title", null: false
949
- t.text "note"
950
- t.integer "user_id"
951
- t.integer "order_list_id"
908
+ t.text "title", null: false
909
+ t.text "note"
910
+ t.integer "user_id"
911
+ t.integer "order_list_id"
952
912
  t.datetime "deleted_at"
953
- t.integer "subscribes_count", default: 0, null: false
913
+ t.integer "subscribes_count", default: 0, null: false
954
914
  t.datetime "created_at"
955
915
  t.datetime "updated_at"
916
+ t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
917
+ t.index ["user_id"], name: "index_subscriptions_on_user_id"
956
918
  end
957
919
 
958
- add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
959
- add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
960
-
961
920
  create_table "user_export_file_transitions", force: :cascade do |t|
962
- t.string "to_state"
963
- t.text "metadata", default: "{}"
964
- t.integer "sort_key"
965
- t.integer "user_export_file_id"
921
+ t.string "to_state"
922
+ t.text "metadata", default: "{}"
923
+ t.integer "sort_key"
924
+ t.integer "user_export_file_id"
966
925
  t.datetime "created_at"
967
926
  t.datetime "updated_at"
968
- t.boolean "most_recent", null: false
927
+ t.boolean "most_recent", null: false
928
+ t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
929
+ t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
930
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
931
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
969
932
  end
970
933
 
971
- 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
972
- add_index "user_export_file_transitions", ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true
973
- add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
974
- add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
975
-
976
934
  create_table "user_export_files", force: :cascade do |t|
977
- t.integer "user_id"
978
- t.string "user_export_file_name"
979
- t.string "user_export_content_type"
980
- t.integer "user_export_file_size"
935
+ t.integer "user_id"
936
+ t.string "user_export_file_name"
937
+ t.string "user_export_content_type"
938
+ t.integer "user_export_file_size"
981
939
  t.datetime "user_export_updated_at"
982
940
  t.datetime "executed_at"
983
941
  t.datetime "created_at"
984
942
  t.datetime "updated_at"
943
+ t.index ["user_id"], name: "index_user_export_files_on_user_id"
985
944
  end
986
945
 
987
- add_index "user_export_files", ["user_id"], name: "index_user_export_files_on_user_id"
988
-
989
946
  create_table "user_groups", force: :cascade do |t|
990
- t.string "name"
991
- t.text "display_name"
992
- t.text "note"
993
- t.integer "position"
947
+ t.string "name"
948
+ t.text "display_name"
949
+ t.text "note"
950
+ t.integer "position"
994
951
  t.datetime "created_at"
995
952
  t.datetime "updated_at"
996
953
  t.datetime "deleted_at"
997
- t.integer "valid_period_for_new_user", default: 0, null: false
954
+ t.integer "valid_period_for_new_user", default: 0, null: false
998
955
  t.datetime "expired_at"
999
956
  end
1000
957
 
1001
958
  create_table "user_has_roles", force: :cascade do |t|
1002
- t.integer "user_id"
1003
- t.integer "role_id"
959
+ t.integer "user_id"
960
+ t.integer "role_id"
1004
961
  t.datetime "created_at"
1005
962
  t.datetime "updated_at"
963
+ t.index ["role_id"], name: "index_user_has_roles_on_role_id"
964
+ t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1006
965
  end
1007
966
 
1008
- add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
1009
- add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
1010
-
1011
967
  create_table "user_import_file_transitions", force: :cascade do |t|
1012
- t.string "to_state"
1013
- t.text "metadata", default: "{}"
1014
- t.integer "sort_key"
1015
- t.integer "user_import_file_id"
968
+ t.string "to_state"
969
+ t.text "metadata", default: "{}"
970
+ t.integer "sort_key"
971
+ t.integer "user_import_file_id"
1016
972
  t.datetime "created_at"
1017
973
  t.datetime "updated_at"
1018
- t.boolean "most_recent", null: false
974
+ t.boolean "most_recent", null: false
975
+ t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
976
+ t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
977
+ t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1019
978
  end
1020
979
 
1021
- 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
1022
- add_index "user_import_file_transitions", ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true
1023
- add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1024
-
1025
980
  create_table "user_import_files", force: :cascade do |t|
1026
- t.integer "user_id"
1027
- t.text "note"
981
+ t.integer "user_id"
982
+ t.text "note"
1028
983
  t.datetime "executed_at"
1029
- t.string "user_import_file_name"
1030
- t.string "user_import_content_type"
1031
- t.integer "user_import_file_size"
984
+ t.string "user_import_file_name"
985
+ t.string "user_import_content_type"
986
+ t.integer "user_import_file_size"
1032
987
  t.datetime "user_import_updated_at"
1033
- t.string "user_import_fingerprint"
1034
- t.string "edit_mode"
1035
- t.text "error_message"
988
+ t.string "user_import_fingerprint"
989
+ t.string "edit_mode"
990
+ t.text "error_message"
1036
991
  t.datetime "created_at"
1037
992
  t.datetime "updated_at"
1038
- t.string "user_encoding"
1039
- t.integer "default_library_id"
1040
- t.integer "default_user_group_id"
993
+ t.string "user_encoding"
994
+ t.integer "default_library_id"
995
+ t.integer "default_user_group_id"
996
+ t.index ["user_id"], name: "index_user_import_files_on_user_id"
1041
997
  end
1042
998
 
1043
- add_index "user_import_files", ["user_id"], name: "index_user_import_files_on_user_id"
1044
-
1045
999
  create_table "user_import_results", force: :cascade do |t|
1046
- t.integer "user_import_file_id"
1047
- t.integer "user_id"
1048
- t.text "body"
1000
+ t.integer "user_import_file_id"
1001
+ t.integer "user_id"
1002
+ t.text "body"
1049
1003
  t.datetime "created_at"
1050
1004
  t.datetime "updated_at"
1051
- t.text "error_message"
1005
+ t.text "error_message"
1006
+ t.index ["user_id"], name: "index_user_import_results_on_user_id"
1007
+ t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1052
1008
  end
1053
1009
 
1054
- add_index "user_import_results", ["user_id"], name: "index_user_import_results_on_user_id"
1055
- add_index "user_import_results", ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1056
-
1057
1010
  create_table "users", force: :cascade do |t|
1058
- t.string "email", default: "", null: false
1059
- t.string "encrypted_password", default: "", null: false
1060
- t.string "reset_password_token"
1011
+ t.string "email", default: "", null: false
1012
+ t.string "encrypted_password", default: "", null: false
1013
+ t.string "reset_password_token"
1061
1014
  t.datetime "reset_password_sent_at"
1062
1015
  t.datetime "remember_created_at"
1063
- t.integer "sign_in_count", default: 0
1016
+ t.integer "sign_in_count", default: 0
1064
1017
  t.datetime "current_sign_in_at"
1065
1018
  t.datetime "last_sign_in_at"
1066
- t.string "current_sign_in_ip"
1067
- t.string "last_sign_in_ip"
1019
+ t.string "current_sign_in_ip"
1020
+ t.string "last_sign_in_ip"
1068
1021
  t.datetime "created_at"
1069
1022
  t.datetime "updated_at"
1070
- t.string "username"
1023
+ t.string "username"
1071
1024
  t.datetime "deleted_at"
1072
1025
  t.datetime "expired_at"
1073
- t.integer "failed_attempts", default: 0
1074
- t.string "unlock_token"
1026
+ t.integer "failed_attempts", default: 0
1027
+ t.string "unlock_token"
1075
1028
  t.datetime "locked_at"
1076
1029
  t.datetime "confirmed_at"
1030
+ t.index ["email"], name: "index_users_on_email"
1031
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1032
+ t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1033
+ t.index ["username"], name: "index_users_on_username", unique: true
1077
1034
  end
1078
1035
 
1079
- add_index "users", ["email"], name: "index_users_on_email"
1080
- add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1081
- add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1082
- add_index "users", ["username"], name: "index_users_on_username", unique: true
1083
-
1084
1036
  create_table "versions", force: :cascade do |t|
1085
- t.string "item_type", null: false
1086
- t.integer "item_id", null: false
1087
- t.string "event", null: false
1088
- t.string "whodunnit"
1089
- t.text "object"
1037
+ t.string "item_type", null: false
1038
+ t.integer "item_id", null: false
1039
+ t.string "event", null: false
1040
+ t.string "whodunnit"
1041
+ t.text "object"
1090
1042
  t.datetime "created_at"
1043
+ t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1091
1044
  end
1092
1045
 
1093
- add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1094
-
1095
1046
  create_table "withdraws", force: :cascade do |t|
1096
- t.integer "basket_id"
1097
- t.integer "item_id"
1098
- t.integer "librarian_id"
1099
- t.datetime "created_at", null: false
1100
- t.datetime "updated_at", null: false
1047
+ t.integer "basket_id"
1048
+ t.integer "item_id"
1049
+ t.integer "librarian_id"
1050
+ t.datetime "created_at", null: false
1051
+ t.datetime "updated_at", null: false
1052
+ t.index ["basket_id"], name: "index_withdraws_on_basket_id"
1053
+ t.index ["item_id"], name: "index_withdraws_on_item_id"
1054
+ t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1101
1055
  end
1102
1056
 
1103
- add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
1104
- add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
1105
- add_index "withdraws", ["librarian_id"], name: "index_withdraws_on_librarian_id"
1106
-
1107
1057
  end