enju_leaf 1.1.0.rc15 → 1.1.0.rc16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +2 -2
  3. data/app/assets/javascripts/mobile.js +1 -1
  4. data/app/assets/stylesheets/mobile.css +1 -1
  5. data/app/controllers/my_accounts_controller.rb +5 -5
  6. data/app/controllers/page_controller.rb +10 -2
  7. data/app/models/profile.rb +15 -5
  8. data/app/models/user_export_file.rb +1 -1
  9. data/app/models/user_import_file.rb +2 -2
  10. data/app/views/my_accounts/_edit_credential.html.erb +10 -0
  11. data/app/views/my_accounts/edit.html.erb +2 -4
  12. data/app/views/page/_header.html.erb +3 -3
  13. data/app/views/page/_menu.html.erb +3 -0
  14. data/app/views/page/configuration.html.erb +3 -0
  15. data/app/views/page/opensearch.xml.builder +1 -1
  16. data/app/views/page/system_information.html.erb +23 -0
  17. data/app/views/profiles/_edit_credential.html.erb +10 -0
  18. data/app/views/profiles/edit.html.erb +3 -4
  19. data/app/views/profiles/index.html.erb +4 -4
  20. data/app/views/profiles/new.html.erb +10 -0
  21. data/config/locales/translation_en.yml +3 -0
  22. data/config/locales/translation_ja.yml +3 -0
  23. data/config/routes.rb +1 -0
  24. data/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  25. data/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  26. data/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  27. data/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  28. data/lib/enju_leaf/controller.rb +4 -4
  29. data/lib/enju_leaf/helper.rb +7 -0
  30. data/lib/enju_leaf/version.rb +1 -1
  31. data/lib/enju_leaf.rb +0 -48
  32. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +1 -1
  33. data/lib/generators/enju_leaf/setup/setup_generator.rb +9 -0
  34. data/lib/generators/enju_leaf/setup/templates/Procfile +1 -1
  35. data/lib/tasks/enju_leaf_tasks.rake +6 -0
  36. data/lib/tasks/profile.rb +1 -1
  37. data/spec/controllers/page_controller_spec.rb +15 -0
  38. data/spec/dummy/config/database.yml +23 -18
  39. data/spec/dummy/db/migrate/001_create_agents.rb +0 -2
  40. data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -2
  41. data/spec/dummy/db/migrate/006_create_items.rb +0 -2
  42. data/spec/dummy/db/migrate/035_create_reserves.rb +0 -1
  43. data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
  44. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
  45. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
  46. data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -3
  47. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
  48. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
  49. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
  50. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
  51. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +0 -1
  52. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +5 -1
  53. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +5 -1
  54. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
  55. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  56. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  57. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  58. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +5 -1
  59. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +5 -1
  60. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +5 -1
  61. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -1
  62. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -1
  63. data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +5 -1
  64. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  65. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
  66. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
  67. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
  68. data/spec/dummy/db/migrate/{20140810061942_add_user_id_to_stat.rb → 20140810061942_add_user_id_to_user_checkout_stat.rb} +1 -1
  69. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
  70. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  71. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  72. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +6 -0
  73. data/spec/dummy/db/schema.rb +674 -663
  74. data/spec/fixtures/agent_import_results.yml +0 -3
  75. data/spec/fixtures/agents.yml +0 -12
  76. data/spec/fixtures/checked_items.yml +4 -4
  77. data/spec/fixtures/checkouts.yml +12 -12
  78. data/spec/fixtures/manifestation_checkout_stats.yml +0 -3
  79. data/spec/fixtures/manifestation_reserve_stats.yml +0 -3
  80. data/spec/fixtures/manifestations.yml +114 -114
  81. data/spec/fixtures/reserves.yml +17 -17
  82. data/spec/fixtures/user_checkout_stats.yml +0 -3
  83. data/spec/fixtures/user_reserve_stats.yml +0 -3
  84. data/spec/fixtures/users.yml +1 -1
  85. data/spec/spec_helper.rb +2 -0
  86. data/vendor/assets/javascripts/{jquery.mobile-1.4.3.js → jquery.mobile-1.4.4.js} +191 -116
  87. data/vendor/assets/stylesheets/{jquery.mobile-1.4.3.css → jquery.mobile-1.4.4.css} +10 -2
  88. metadata +79 -264
  89. data/app/models/local_patron.rb +0 -27
  90. data/lib/enju_leaf/bookmark_url.rb +0 -45
  91. data/spec/dummy/db/development.sqlite3 +0 -0
  92. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  93. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
  94. data/spec/dummy/db/test.sqlite3 +0 -0
  95. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_delete_file.tsv +0 -4
  96. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_import_file_sample.tsv +0 -7
  97. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_update_file.tsv +0 -4
  98. data/spec/dummy/private/system/user_import_files/user_imports/980/190/964/original/user_delete_file.tsv +0 -4
  99. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-3963-1s1td26.txt +0 -8
  100. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-69229-i0rcty.txt +0 -8
  101. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140816-21120-1w731r8.txt +0 -8
  102. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-59118-14fm7df.txt +0 -8
  103. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-59989-vmovk5.txt +0 -8
  104. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75062-kpzjyb.txt +0 -8
  105. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75773-1lhgyub.txt +0 -8
  106. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75927-j8wteq.txt +0 -8
  107. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140820-9103-mfcugd.txt +0 -8
  108. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140822-13160-wz7o56.txt +0 -8
  109. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140824-39018-fw3fdj.txt +0 -8
  110. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140828-69043-tbwoqv.txt +0 -8
  111. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-22971-1jmyywh.txt +0 -8
  112. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-23153-j4x3ru.txt +0 -8
  113. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-67244-1uo8pkb.txt +0 -8
  114. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80298-14af9pc.txt +0 -8
  115. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80450-1qhv5cf.txt +0 -8
  116. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80529-1hahtrn.txt +0 -8
  117. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80725-tqmhnv.txt +0 -8
  118. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81018-wl1hgj.txt +0 -8
  119. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81246-wll5s.txt +0 -8
  120. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81371-8uz50r.txt +0 -8
  121. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-84122-1u96hw6.txt +0 -8
  122. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140926-7716-bbs13d.txt +0 -8
  123. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57000-yu6qop.txt +0 -8
  124. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57206-2j8sg2.txt +0 -8
  125. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57328-p8lryh.txt +0 -8
  126. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57609-1j3dd67.txt +0 -8
  127. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141003-78097-dw5i2k.txt +0 -8
  128. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-28652-1dj3e98.txt +0 -148
  129. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-29117-13jb6ol.txt +0 -148
  130. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140721-65743-1tnagd4.txt +0 -8
  131. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-3963-1kk8o87.txt +0 -8
  132. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-69229-188nwub.txt +0 -8
  133. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140816-21120-twzfb6.txt +0 -8
  134. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-59118-1lhrtka.txt +0 -8
  135. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-59989-1prz707.txt +0 -8
  136. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75062-10bxh78.txt +0 -8
  137. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75773-ekgeho.txt +0 -8
  138. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75927-uay97k.txt +0 -8
  139. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140820-9103-tuuox.txt +0 -8
  140. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140822-13160-17b5dbh.txt +0 -8
  141. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140824-39018-o12xa4.txt +0 -8
  142. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-22971-d4ul8o.txt +0 -8
  143. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-23153-1qmzqi6.txt +0 -8
  144. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-67244-1ps1qsi.txt +0 -8
  145. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80298-121rh7h.txt +0 -8
  146. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80450-wdetsg.txt +0 -8
  147. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80529-lmet02.txt +0 -8
  148. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80725-1l6tliy.txt +0 -8
  149. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81018-azm74f.txt +0 -8
  150. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81246-1rjpksn.txt +0 -8
  151. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81371-aroaof.txt +0 -8
  152. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-84122-7d6kls.txt +0 -8
  153. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140926-7716-1nap0l.txt +0 -8
  154. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57000-3nb1bj.txt +0 -8
  155. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57206-197ca0p.txt +0 -8
  156. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57328-1kra77f.txt +0 -8
  157. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57609-iymry0.txt +0 -8
  158. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141003-78097-1ocngi2.txt +0 -8
  159. data/spec/dummy/solr/conf/admin-extra.html +0 -31
  160. data/spec/dummy/solr/conf/elevate.xml +0 -36
  161. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  162. data/spec/dummy/solr/conf/protwords.txt +0 -21
  163. data/spec/dummy/solr/conf/schema.xml +0 -255
  164. data/spec/dummy/solr/conf/scripts.conf +0 -24
  165. data/spec/dummy/solr/conf/solrconfig.xml +0 -667
  166. data/spec/dummy/solr/conf/spellings.txt +0 -2
  167. data/spec/dummy/solr/conf/stopwords.txt +0 -58
  168. data/spec/dummy/solr/conf/synonyms.txt +0 -31
  169. data/spec/dummy/solr/default/data/index/_7b.fdt +0 -0
  170. data/spec/dummy/solr/default/data/index/_7b.fdx +0 -0
  171. data/spec/dummy/solr/default/data/index/_7b.fnm +0 -0
  172. data/spec/dummy/solr/default/data/index/_7b.nvd +0 -0
  173. data/spec/dummy/solr/default/data/index/_7b.nvm +0 -0
  174. data/spec/dummy/solr/default/data/index/_7b.si +0 -0
  175. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.doc +0 -0
  176. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.pos +0 -0
  177. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.tim +0 -0
  178. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.tip +0 -0
  179. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  180. data/spec/dummy/solr/default/data/index/segments_ev +0 -0
  181. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000524 +0 -0
  182. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000525 +0 -0
  183. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000526 +0 -0
  184. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000527 +0 -0
  185. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000528 +0 -0
  186. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000529 +0 -0
  187. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000530 +0 -0
  188. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000531 +0 -0
  189. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000532 +0 -0
  190. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000533 +0 -0
  191. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  192. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  193. data/spec/dummy/solr/solr.xml +0 -8
  194. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  195. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  196. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  197. data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
  198. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  199. data/spec/dummy/tmp/cache/assets/test/sprockets/154f7b83f2da0e86effbe25f32135177 +0 -0
  200. data/spec/dummy/tmp/cache/assets/test/sprockets/1b984bdbd3204a51a82d0e01a1569e2d +0 -0
  201. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  202. data/spec/dummy/tmp/cache/assets/test/sprockets/3054c50144654f9c7e57bb0639a276e9 +0 -0
  203. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  204. data/spec/dummy/tmp/cache/assets/test/sprockets/3bd7a263237ba366f64d938fe5303757 +0 -0
  205. data/spec/dummy/tmp/cache/assets/test/sprockets/62899096da1a3e67660f3b88068be8c9 +0 -0
  206. data/spec/dummy/tmp/cache/assets/test/sprockets/65b2e4f67eab21b30217e29075f433b2 +0 -0
  207. data/spec/dummy/tmp/cache/assets/test/sprockets/87d24a3f43f175d4d17babe9203c79a7 +0 -0
  208. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  209. data/spec/dummy/tmp/cache/assets/test/sprockets/d38d8658b30de1d068603968227680d4 +0 -0
  210. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  211. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  212. data/spec/dummy/tmp/cache/stdout +0 -1653
  213. data/spec/dummy/tmp/pids/redis-test.pid +0 -1
@@ -16,6 +16,11 @@ describe PageController do
16
16
  get :configuration
17
17
  expect(response).to be_success
18
18
  end
19
+
20
+ it "should get system information" do
21
+ get :system_information
22
+ expect(response).to be_success
23
+ end
19
24
  end
20
25
 
21
26
  describe "When logged in as User" do
@@ -35,6 +40,11 @@ describe PageController do
35
40
  get :configuration
36
41
  expect(response).to be_forbidden
37
42
  end
43
+
44
+ it "should not get system information" do
45
+ get :system_information
46
+ expect(response).to be_forbidden
47
+ end
38
48
  end
39
49
 
40
50
  describe "When not logged in" do
@@ -89,6 +99,11 @@ describe PageController do
89
99
  get :configuration
90
100
  expect(response).to redirect_to new_user_session_url
91
101
  end
102
+
103
+ it "should not get system information" do
104
+ get :system_information
105
+ expect(response).to redirect_to new_user_session_url
106
+ end
92
107
  end
93
108
  end
94
109
  end
@@ -1,25 +1,30 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- development:
1
+ sqlite: &sqlite
7
2
  adapter: sqlite3
8
- database: db/development.sqlite3
3
+ database: db/<%= Rails.env %>.sqlite3
4
+
5
+ mysql: &mysql
6
+ adapter: mysql2
7
+ username: root
8
+ password:
9
+ database: enju_<%= Rails.env %>
10
+
11
+ postgresql: &postgresql
12
+ adapter: postgresql
13
+ username: postgres
14
+ password:
15
+ database: enju_<%= Rails.env %>
16
+
17
+ defaults: &defaults
9
18
  pool: 5
10
19
  timeout: 5000
20
+ host: localhost
21
+ <<: *<%= ENV['DB'] || "sqlite" %>
22
+
23
+ development:
24
+ <<: *defaults
11
25
 
12
- # Warning: The database defined as "test" will be erased and
13
- # re-generated from your development database when you run "rake".
14
- # Do not set this db to the same as development or production.
15
26
  test:
16
- adapter: sqlite3
17
- database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
27
+ <<: *defaults
20
28
 
21
29
  production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
30
+ <<: *defaults
@@ -1,7 +1,6 @@
1
1
  class CreateAgents < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :agents do |t|
4
- t.integer :user_id
5
4
  t.string :last_name
6
5
  t.string :middle_name
7
6
  t.string :first_name
@@ -43,7 +42,6 @@ class CreateAgents < ActiveRecord::Migration
43
42
  t.text :email
44
43
  t.text :url
45
44
  end
46
- add_index :agents, :user_id, :unique => true
47
45
  add_index :agents, :language_id
48
46
  add_index :agents, :country_id
49
47
  add_index :agents, :required_role_id
@@ -13,13 +13,12 @@ class CreateManifestations < ActiveRecord::Migration
13
13
  t.string :access_address
14
14
  t.integer :language_id, :default => 1, :null => false
15
15
  t.integer :carrier_type_id, :default => 1, :null => false
16
- t.integer :extent_id, :default => 1, :null => false
17
16
  t.integer :start_page
18
17
  t.integer :end_page
19
18
  t.integer :height
20
19
  t.integer :width
21
20
  t.integer :depth
22
- t.integer :price # TODO: currency unit
21
+ t.integer :price # TODO: 通貨単位
23
22
  t.text :fulltext
24
23
  t.string :volume_number_string
25
24
  t.string :issue_number_string
@@ -1,7 +1,6 @@
1
1
  class CreateItems < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :items do |t|
4
- t.integer :manifestation_id
5
4
  t.string :call_number
6
5
  t.string :item_identifier
7
6
  t.timestamps
@@ -15,7 +14,6 @@ class CreateItems < ActiveRecord::Migration
15
14
  t.integer :required_role_id, :default => 1, :null => false
16
15
  t.integer :required_score, :default => 0, :null => false
17
16
  end
18
- add_index :items, :manifestation_id
19
17
  add_index :items, :shelf_id
20
18
  add_index :items, :item_identifier
21
19
  add_index :items, :required_role_id
@@ -10,7 +10,6 @@ class CreateReserves < ActiveRecord::Migration
10
10
  t.datetime :canceled_at
11
11
  t.datetime :expired_at
12
12
  t.datetime :deleted_at
13
- t.string :state
14
13
  t.boolean :expiration_notice_to_patron, :default => false
15
14
  t.boolean :expiration_notice_to_library, :default => false
16
15
  end
@@ -0,0 +1,15 @@
1
+ class CreateAgentMerges < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :agent_merges do |t|
4
+ t.integer :agent_id, :agent_merge_list_id, :null => false
5
+
6
+ t.timestamps
7
+ end
8
+ add_index :agent_merges, :agent_id
9
+ add_index :agent_merges, :agent_merge_list_id
10
+ end
11
+
12
+ def self.down
13
+ drop_table :agent_merges
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ class CreateAgentMergeLists < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :agent_merge_lists do |t|
4
+ t.string :title
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :agent_merge_lists
12
+ end
13
+ end
@@ -4,7 +4,6 @@ class CreateManifestationCheckoutStats < ActiveRecord::Migration
4
4
  t.datetime :start_date
5
5
  t.datetime :end_date
6
6
  t.text :note
7
- t.string :state
8
7
 
9
8
  t.timestamps
10
9
  end
@@ -6,11 +6,8 @@ class CreateBookmarkStats < ActiveRecord::Migration
6
6
  t.datetime :started_at
7
7
  t.datetime :completed_at
8
8
  t.text :note
9
- t.string :state
10
9
 
11
10
  t.timestamps
12
11
  end
13
-
14
- add_index :bookmark_stats, :state
15
12
  end
16
13
  end
@@ -4,7 +4,6 @@ class CreateUserCheckoutStats < ActiveRecord::Migration
4
4
  t.datetime :start_date
5
5
  t.datetime :end_date
6
6
  t.text :note
7
- t.string :state
8
7
 
9
8
  t.timestamps
10
9
  end
@@ -4,7 +4,6 @@ class CreateManifestationReserveStats < ActiveRecord::Migration
4
4
  t.datetime :start_date
5
5
  t.datetime :end_date
6
6
  t.text :note
7
- t.string :state
8
7
 
9
8
  t.timestamps
10
9
  end
@@ -4,7 +4,6 @@ class CreateUserReserveStats < ActiveRecord::Migration
4
4
  t.datetime :start_date
5
5
  t.datetime :end_date
6
6
  t.text :note
7
- t.string :state
8
7
 
9
8
  t.timestamps
10
9
  end
@@ -2,16 +2,12 @@ class AddCompletedAtToUserCheckoutStat < ActiveRecord::Migration
2
2
  def self.up
3
3
  add_column :user_checkout_stats, :started_at, :datetime
4
4
  add_column :user_checkout_stats, :completed_at, :datetime
5
- add_index :user_checkout_stats, :state
6
5
  add_column :user_reserve_stats, :started_at, :datetime
7
6
  add_column :user_reserve_stats, :completed_at, :datetime
8
- add_index :user_reserve_stats, :state
9
7
  add_column :manifestation_checkout_stats, :started_at, :datetime
10
8
  add_column :manifestation_checkout_stats, :completed_at, :datetime
11
- add_index :manifestation_checkout_stats, :state
12
9
  add_column :manifestation_reserve_stats, :started_at, :datetime
13
10
  add_column :manifestation_reserve_stats, :completed_at, :datetime
14
- add_index :manifestation_reserve_stats, :state
15
11
  end
16
12
 
17
13
  def self.down
@@ -3,7 +3,6 @@ class CreateAgentImportResults < ActiveRecord::Migration
3
3
  create_table :agent_import_results do |t|
4
4
  t.integer :agent_import_file_id
5
5
  t.integer :agent_id
6
- t.integer :user_id
7
6
  t.text :body
8
7
 
9
8
  t.timestamps
@@ -2,7 +2,11 @@ class CreateReserveTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :reserve_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :reserve_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateMessageTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :message_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :message_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateMessageRequestTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :message_request_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :message_request_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateResourceImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateImportRequestTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :import_request_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :import_request_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateAgentImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :agent_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :agent_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateBookmarkStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :bookmark_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :bookmark_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserCheckoutStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_checkout_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_checkout_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserReserveStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_reserve_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_reserve_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateManifestationCheckoutStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :manifestation_checkout_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :manifestation_checkout_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateManifestationReserveStatTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :manifestation_reserve_stat_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :manifestation_reserve_stat_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateItemTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :item_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :item_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateResourceExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :resource_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :resource_export_file_id
8
12
  t.timestamps
@@ -0,0 +1,8 @@
1
+ class AddBindingItemIdentifierToItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :items, :binding_item_identifier, :string
4
+ add_column :items, :binding_call_number, :string
5
+ add_column :items, :binded_at, :datetime
6
+ add_index :items, :binding_item_identifier
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ class AddDefaultShelfIdToResourceImportFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_files, :default_shelf_id, :integer
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddManifestationIdToItem < ActiveRecord::Migration
2
+ def change
3
+ add_column :items, :manifestation_id, :integer
4
+ add_index :items, :manifestation_id
5
+ end
6
+ end
@@ -1,4 +1,4 @@
1
- class AddUserIdToStat < ActiveRecord::Migration
1
+ class AddUserIdToUserCheckoutStat < ActiveRecord::Migration
2
2
  def change
3
3
  add_column :user_checkout_stats, :user_id, :integer
4
4
  add_column :user_reserve_stats, :user_id, :integer
@@ -0,0 +1,5 @@
1
+ class AddPublicationPlaceToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :publication_place, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddErrorMessageToResourceImportResult < ActiveRecord::Migration
2
+ def change
3
+ add_column :resource_import_results, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddExtentToManifestation < ActiveRecord::Migration
2
+ def change
3
+ add_column :manifestations, :extent, :text
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ class AddShelfIdToCheckout < ActiveRecord::Migration
2
+ def change
3
+ add_column :checkouts, :shelf_id, :integer
4
+ add_index :checkouts, :shelf_id
5
+ end
6
+ end