enju_leaf 1.2.0.beta.1 → 1.2.0.beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/lib/enju_leaf/engine.rb +1 -15
  3. data/lib/enju_leaf/version.rb +1 -1
  4. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +3 -3
  5. data/lib/generators/enju_leaf/setup/setup_generator.rb +0 -1
  6. data/spec/controllers/page_controller_spec.rb +1 -1
  7. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  8. data/spec/dummy/app/helpers/application_helper.rb +2 -1
  9. data/spec/dummy/app/models/user.rb +0 -1
  10. data/spec/dummy/config/application.rb +1 -2
  11. data/{db → spec/dummy/db}/migrate/041_create_roles.rb +0 -0
  12. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -5
  13. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -5
  14. data/{db → spec/dummy/db}/migrate/077_create_user_groups.rb +0 -0
  15. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -5
  16. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -5
  17. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  18. data/{db → spec/dummy/db}/migrate/20100606065209_create_user_has_roles.rb +0 -0
  19. data/{db → spec/dummy/db}/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +0 -0
  20. data/spec/dummy/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +6 -0
  21. data/{db → spec/dummy/db}/migrate/20130221154434_add_additional_attributes_to_user.rb +0 -0
  22. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  23. data/{db → spec/dummy/db}/migrate/20140110122216_create_user_import_files.rb +0 -0
  24. data/{db → spec/dummy/db}/migrate/20140110131010_create_user_import_results.rb +0 -0
  25. data/{db → spec/dummy/db}/migrate/20140122054321_create_profiles.rb +0 -0
  26. data/{db → spec/dummy/db}/migrate/20140524074813_create_user_import_file_transitions.rb +0 -0
  27. data/{db → spec/dummy/db}/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +0 -0
  28. data/{db → spec/dummy/db}/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +0 -0
  29. data/{db → spec/dummy/db}/migrate/20140709113413_create_user_export_files.rb +0 -0
  30. data/{db → spec/dummy/db}/migrate/20140709113905_create_user_export_file_transitions.rb +0 -0
  31. data/{db → spec/dummy/db}/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +0 -0
  32. data/{db → spec/dummy/db}/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +0 -0
  33. data/{db → spec/dummy/db}/migrate/20140811031145_add_expired_at_to_profile.rb +0 -0
  34. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  35. data/{db → spec/dummy/db}/migrate/20141003181336_add_full_name_transcription_to_profile.rb +0 -0
  36. data/{db → spec/dummy/db}/migrate/20141003182825_add_date_of_birth_to_profile.rb +0 -0
  37. data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +6 -0
  38. data/spec/dummy/db/migrate/20150106001709_create_demands.rb +14 -0
  39. data/{db → spec/dummy/db}/migrate/20150421023923_create_identities.rb +0 -0
  40. data/{db → spec/dummy/db}/migrate/20150506105356_add_error_message_to_user_import_result.rb +0 -0
  41. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  42. data/{db → spec/dummy/db}/migrate/20151126005552_add_provider_to_identity.rb +0 -0
  43. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +5 -0
  44. data/{db → spec/dummy/db}/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +0 -0
  45. data/{db → spec/dummy/db}/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +0 -0
  46. data/spec/dummy/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +9 -0
  47. data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +9 -0
  48. data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +9 -0
  49. data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +9 -0
  50. data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +9 -0
  51. data/spec/dummy/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +9 -0
  52. data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +5 -0
  53. data/spec/dummy/db/schema.rb +47 -12
  54. data/spec/fixtures/library_groups.yml +1 -4
  55. data/spec/models/user_spec.rb +0 -22
  56. data/spec/rails_helper.rb +1 -1
  57. data/spec/views/page/index.html.erb_spec.rb +0 -2
  58. metadata +96 -337
  59. data/app/controllers/concerns/enju_leaf/controller.rb +0 -225
  60. data/app/controllers/my_accounts_controller.rb +0 -93
  61. data/app/controllers/names_controller.rb +0 -60
  62. data/app/controllers/profiles_controller.rb +0 -219
  63. data/app/controllers/roles_controller.rb +0 -61
  64. data/app/controllers/user_export_files_controller.rb +0 -116
  65. data/app/controllers/user_groups_controller.rb +0 -118
  66. data/app/controllers/user_import_files_controller.rb +0 -129
  67. data/app/controllers/user_import_results_controller.rb +0 -57
  68. data/app/mailers/notifier.rb +0 -30
  69. data/app/models/identity.rb +0 -9
  70. data/app/models/profile.rb +0 -101
  71. data/app/models/role.rb +0 -50
  72. data/app/models/user_export_file.rb +0 -67
  73. data/app/models/user_export_file_state_machine.rb +0 -15
  74. data/app/models/user_export_file_transition.rb +0 -20
  75. data/app/models/user_group.rb +0 -29
  76. data/app/models/user_has_role.rb +0 -19
  77. data/app/models/user_import_file.rb +0 -352
  78. data/app/models/user_import_file_state_machine.rb +0 -19
  79. data/app/models/user_import_file_transition.rb +0 -20
  80. data/app/models/user_import_result.rb +0 -20
  81. data/app/policies/application_policy.rb +0 -53
  82. data/app/policies/name_policy.rb +0 -21
  83. data/app/policies/profile_policy.rb +0 -55
  84. data/app/policies/role_policy.rb +0 -21
  85. data/app/policies/user_export_file_policy.rb +0 -21
  86. data/app/policies/user_group_policy.rb +0 -22
  87. data/app/policies/user_import_file_policy.rb +0 -21
  88. data/app/policies/user_import_result_policy.rb +0 -21
  89. data/app/views/my_accounts/_edit_credential.html.erb +0 -99
  90. data/app/views/my_accounts/_form.html.erb +0 -24
  91. data/app/views/my_accounts/_show.html.erb +0 -1
  92. data/app/views/my_accounts/edit.html.erb +0 -32
  93. data/app/views/my_accounts/show.html+phone.erb +0 -1
  94. data/app/views/my_accounts/show.html.erb +0 -49
  95. data/app/views/names/_form.html.erb +0 -41
  96. data/app/views/names/edit.html.erb +0 -6
  97. data/app/views/names/index.html.erb +0 -37
  98. data/app/views/names/new.html.erb +0 -5
  99. data/app/views/names/show.html.erb +0 -34
  100. data/app/views/profiles/_edit_credential.html.erb +0 -88
  101. data/app/views/profiles/_edit_profile.html.erb +0 -42
  102. data/app/views/profiles/_form.html.erb +0 -15
  103. data/app/views/profiles/_show.html.erb +0 -1
  104. data/app/views/profiles/edit.html.erb +0 -33
  105. data/app/views/profiles/index.html.erb +0 -70
  106. data/app/views/profiles/new.html.erb +0 -88
  107. data/app/views/profiles/show.html+phone.erb +0 -1
  108. data/app/views/profiles/show.html.erb +0 -71
  109. data/app/views/roles/_form.html.erb +0 -19
  110. data/app/views/roles/edit.html.erb +0 -13
  111. data/app/views/roles/index.html.erb +0 -32
  112. data/app/views/roles/new.html.erb +0 -12
  113. data/app/views/roles/show.html.erb +0 -46
  114. data/app/views/user_export_files/_form.html.erb +0 -12
  115. data/app/views/user_export_files/edit.html.erb +0 -6
  116. data/app/views/user_export_files/index.html.erb +0 -44
  117. data/app/views/user_export_files/new.html.erb +0 -16
  118. data/app/views/user_export_files/show.html.erb +0 -36
  119. data/app/views/user_groups/_form.html.erb +0 -40
  120. data/app/views/user_groups/edit.html.erb +0 -13
  121. data/app/views/user_groups/index.html.erb +0 -51
  122. data/app/views/user_groups/new.html.erb +0 -12
  123. data/app/views/user_groups/show.html.erb +0 -68
  124. data/app/views/user_import_files/_form.html.erb +0 -61
  125. data/app/views/user_import_files/_results.html.erb +0 -22
  126. data/app/views/user_import_files/edit.html.erb +0 -6
  127. data/app/views/user_import_files/index.html.erb +0 -45
  128. data/app/views/user_import_files/new.html.erb +0 -60
  129. data/app/views/user_import_files/show.html.erb +0 -85
  130. data/app/views/user_import_results/_form.html.erb +0 -29
  131. data/app/views/user_import_results/_list.html.erb +0 -22
  132. data/app/views/user_import_results/_list_lines.html.erb +0 -24
  133. data/app/views/user_import_results/index.html.erb +0 -25
  134. data/app/views/user_import_results/index.txt.erb +0 -3
  135. data/app/views/user_import_results/show.html.erb +0 -33
  136. data/db/migrate/20091202124834_create_versions.rb +0 -18
  137. data/spec/controllers/my_accounts_controller_spec.rb +0 -229
  138. data/spec/controllers/profiles_controller_spec.rb +0 -594
  139. data/spec/controllers/roles_controller_spec.rb +0 -136
  140. data/spec/controllers/user_export_files_controller_spec.rb +0 -296
  141. data/spec/controllers/user_groups_controller_spec.rb +0 -443
  142. data/spec/controllers/user_import_files_controller_spec.rb +0 -305
  143. data/spec/controllers/user_import_results_controller_spec.rb +0 -157
  144. data/spec/fixtures/user_export_files.yml +0 -25
  145. data/spec/fixtures/user_import_files.yml +0 -51
  146. data/spec/fixtures/user_import_results.yml +0 -26
  147. data/spec/fixtures/user_reserve_stats.yml +0 -27
  148. data/spec/models/basket_spec.rb +0 -23
  149. data/spec/models/profile_spec.rb +0 -98
  150. data/spec/models/role_spec.rb +0 -40
  151. data/spec/models/user_export_file_spec.rb +0 -30
  152. data/spec/models/user_group_spec.rb +0 -37
  153. data/spec/models/user_has_role_spec.rb +0 -18
  154. data/spec/models/user_import_file_spec.rb +0 -220
  155. data/spec/models/user_import_result_spec.rb +0 -20
  156. data/spec/requests/profiles_spec.rb +0 -9
  157. data/spec/routing/profiles_routing_spec.rb +0 -35
  158. data/spec/routing/resource_import_files_routing_spec.rb +0 -35
  159. data/spec/routing/roles_routing_spec.rb +0 -35
  160. data/spec/routing/users_spec.rb +0 -14
  161. data/spec/views/my_accounts/show.html.erb_spec.rb +0 -43
  162. data/spec/views/profiles/edit.html.erb_spec.rb +0 -42
  163. data/spec/views/profiles/index.html.erb_spec.rb +0 -19
  164. data/spec/views/profiles/new.html.erb_spec.rb +0 -25
  165. data/spec/views/profiles/show.html.erb_spec.rb +0 -31
  166. data/spec/views/user_export_files/new.html.erb_spec.rb +0 -19
  167. data/spec/views/user_import_results/index.html.erb_spec.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bddebc600e5d6d8fb8f3a0117cbd5bdaab34c711
4
- data.tar.gz: ab1f301430da8166e9ac10b9d7b94c39dc607ffb
3
+ metadata.gz: 9e4355899ff711bb6fc0a762a9b541940b6754b5
4
+ data.tar.gz: f5d746c0756b0ffafbb767149a0d1dd216564e89
5
5
  SHA512:
6
- metadata.gz: 5b2285b9dfdb9d0ecd2e6abdb888d9694336645b16d29369c73a45e29345f53ed9db4db4d2fd3496407d7abe6dfb87344ba3b5fb6ab923c69ac19f3319c33e1f
7
- data.tar.gz: d31402743602b18a903e83c0ada8a6c33124cfc5a7561089e08c3b0666986fe441d999e94e12b2560cf8c322411d980e76e2b8546eb58df10a531de0480d3126
6
+ metadata.gz: 87467540f453196ed22bee978ffbc37fb883a9456bbfe78e517decaa6c5b587061f56a3c52632456e814330b761e52397400e08dc2eed593ff070a1678bd4c08
7
+ data.tar.gz: 92cb8990273542be0406a604a32eefaffba3ecbd268c66bb3500c9cf60ca6356f2d5b2ff88acb324149cf560b70b2d89de8100d226210a2342cc67058383a0cb
@@ -1,21 +1,7 @@
1
- require 'kaminari'
2
- require 'devise'
3
- require 'pundit'
4
- require 'acts_as_list'
5
- require 'strip_attributes'
6
- require 'friendly_id'
7
- require 'addressable/uri'
8
- require 'sunspot_rails'
9
- require 'cocoon'
10
1
  require 'enju_biblio'
11
2
  require 'enju_library'
12
- require 'enju_manifestation_viewer'
13
- require 'kramdown'
14
- require 'rails_autolink'
15
- require 'sitemap_generator'
3
+ #require 'enju_manifestation_viewer'
16
4
  require 'jquery-ui-rails'
17
- require 'statesman'
18
- require 'browser'
19
5
 
20
6
  module EnjuLeaf
21
7
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module EnjuLeaf
2
- VERSION = "1.2.0.beta.1"
2
+ VERSION = "1.2.0.beta.2"
3
3
  end
@@ -5,12 +5,12 @@ class EnjuLeaf::QuickInstallGenerator < Rails::Generators::Base
5
5
  environment = ENV['RAILS_ENV'] || 'development'
6
6
  gsub_file 'config/schedule.rb', /^set :environment, :development$/,
7
7
  "set :environment, :#{environment}"
8
- rake("enju_leaf_engine:install:migrations")
9
- rake("enju_biblio_engine:install:migrations")
8
+ rake("enju_seed_engine:install:migrations")
10
9
  rake("enju_library_engine:install:migrations")
10
+ rake("enju_biblio_engine:install:migrations")
11
11
  if !ENV['ENJU_SKIP_CONFIG']
12
- generate("enju_biblio:setup")
13
12
  generate("enju_library:setup")
13
+ generate("enju_biblio:setup")
14
14
  generate("enju_circulation:setup")
15
15
  generate("enju_subject:setup")
16
16
  end
@@ -70,7 +70,6 @@ EOS
70
70
 
71
71
  inject_into_class "app/controllers/application_controller.rb", ApplicationController do
72
72
  <<"EOS"
73
- include EnjuLeaf::Controller
74
73
  include EnjuBiblio::Controller
75
74
  include EnjuLibrary::Controller
76
75
 
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require 'rails_helper'
2
2
 
3
3
  describe PageController do
4
4
  fixtures :all
@@ -1,6 +1,5 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
- include EnjuLeaf::Controller
4
3
  include EnjuBiblio::Controller
5
4
  include EnjuLibrary::Controller
6
5
  before_action :set_paper_trail_whodunnit
@@ -1,4 +1,5 @@
1
1
  module ApplicationHelper
2
2
  include EnjuLeaf::EnjuLeafHelper
3
- include EnjuBiblio::BiblioHelper if defined?(EnjuBiblio)
3
+ include EnjuBiblio::BiblioHelper
4
+ include EnjuManifestationViewer::BookJacketHelper
4
5
  end
@@ -6,5 +6,4 @@ class User < ActiveRecord::Base
6
6
  include EnjuLeaf::EnjuUser
7
7
  include EnjuMessage::EnjuUser
8
8
  include EnjuCirculation::EnjuUser
9
- include EnjuBookmark::EnjuUser
10
9
  end
@@ -5,9 +5,8 @@ require 'rails/all'
5
5
  Bundler.require
6
6
  require 'enju_leaf'
7
7
  require 'resque/server'
8
+ require 'enju_manifestation_viewer'
8
9
  require 'enju_circulation'
9
- require 'enju_bookmark'
10
- require 'enju_search_log'
11
10
 
12
11
  module Dummy
13
12
  class Application < Rails::Application
@@ -1,5 +1,5 @@
1
1
  class CreateLibraries < ActiveRecord::Migration
2
- def self.up
2
+ def change
3
3
  create_table :libraries do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
@@ -25,8 +25,4 @@ class CreateLibraries < ActiveRecord::Migration
25
25
  add_index :libraries, :library_group_id
26
26
  add_index :libraries, :name, :unique => true
27
27
  end
28
-
29
- def self.down
30
- drop_table :libraries
31
- end
32
28
  end
@@ -1,5 +1,5 @@
1
1
  class CreateShelves < ActiveRecord::Migration
2
- def self.up
2
+ def change
3
3
  create_table :shelves do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
@@ -12,8 +12,4 @@ class CreateShelves < ActiveRecord::Migration
12
12
  end
13
13
  add_index :shelves, :library_id
14
14
  end
15
-
16
- def self.down
17
- drop_table :shelves
18
- end
19
15
  end
@@ -1,5 +1,5 @@
1
1
  class CreateRequestStatusTypes < ActiveRecord::Migration
2
- def self.up
2
+ def change
3
3
  create_table :request_status_types do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
@@ -9,8 +9,4 @@ class CreateRequestStatusTypes < ActiveRecord::Migration
9
9
  t.timestamps
10
10
  end
11
11
  end
12
-
13
- def self.down
14
- drop_table :request_status_types
15
- end
16
12
  end
@@ -1,5 +1,5 @@
1
1
  class CreateRequestTypes < ActiveRecord::Migration
2
- def self.up
2
+ def change
3
3
  create_table :request_types do |t|
4
4
  t.string :name, :null => false
5
5
  t.text :display_name
@@ -9,8 +9,4 @@ class CreateRequestTypes < ActiveRecord::Migration
9
9
  t.timestamps
10
10
  end
11
11
  end
12
-
13
- def self.down
14
- drop_table :request_types
15
- end
16
12
  end
@@ -0,0 +1,9 @@
1
+ class AddOpeningHourToLibrary < ActiveRecord::Migration
2
+ def self.up
3
+ add_column :libraries, :opening_hour, :text
4
+ end
5
+
6
+ def self.down
7
+ remove_column :libraries, :opening_hour
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ class AddPickupLocationToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_column :reserves, :pickup_location_id, :integer
4
+ add_index :reserves, :pickup_location_id
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration
2
+ def change
3
+ add_column :libraries, :latitude, :float
4
+ add_column :libraries, :longitude, :float
5
+ end
6
+ end
@@ -0,0 +1,14 @@
1
+ class CreateColors < ActiveRecord::Migration
2
+ def change
3
+ create_table :colors do |t|
4
+ t.integer :library_group_id
5
+ t.string :property
6
+ t.string :code
7
+ t.integer :position
8
+
9
+ t.timestamps
10
+ end
11
+
12
+ add_index :colors, :library_group_id
13
+ end
14
+ end
@@ -0,0 +1,6 @@
1
+ class AddLibraryIdToCheckout < ActiveRecord::Migration
2
+ def change
3
+ add_column :checkouts, :library_id, :integer
4
+ add_index :checkouts, :library_id
5
+ end
6
+ end
@@ -0,0 +1,14 @@
1
+ class CreateDemands < ActiveRecord::Migration
2
+ def change
3
+ create_table :demands do |t|
4
+ t.integer :user_id
5
+ t.integer :item_id
6
+ t.integer :message_id
7
+
8
+ t.timestamps null: false
9
+ end
10
+ add_index :demands, :user_id
11
+ add_index :demands, :item_id
12
+ add_index :demands, :message_id
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ class CreateWithdraws < ActiveRecord::Migration
2
+ def change
3
+ create_table :withdraws do |t|
4
+ t.integer :basket_id
5
+ t.integer :item_id
6
+ t.integer :librarian_id
7
+
8
+ t.timestamps null: false
9
+ end
10
+ add_index :withdraws, :basket_id
11
+ add_index :withdraws, :item_id
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :html_snippet, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToReserveTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :reserve_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :reserve_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToManifestationCheckoutStatTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :manifestation_checkout_stat_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :manifestation_checkout_stat_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToManifestationReserveStatTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :manifestation_reserve_stat_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :manifestation_reserve_stat_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToUserCheckoutStatTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_checkout_stat_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :user_checkout_stat_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToUserReserveStatTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :user_reserve_stat_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :user_reserve_stat_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToMessageTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :message_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :message_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddForeignKeyOnManifestationIdToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_foreign_key :reserves, :manifestations
4
+ end
5
+ end
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20160703185015) do
14
+ ActiveRecord::Schema.define(version: 20160703190209) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -338,6 +338,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
338
338
  t.datetime "created_at"
339
339
  t.datetime "updated_at"
340
340
  t.integer "shelf_id"
341
+ t.integer "library_id"
341
342
  end
342
343
 
343
344
  add_index "checkouts", ["basket_id"], name: "index_checkouts_on_basket_id"
@@ -345,6 +346,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
345
346
  add_index "checkouts", ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
346
347
  add_index "checkouts", ["item_id"], name: "index_checkouts_on_item_id"
347
348
  add_index "checkouts", ["librarian_id"], name: "index_checkouts_on_librarian_id"
349
+ add_index "checkouts", ["library_id"], name: "index_checkouts_on_library_id"
348
350
  add_index "checkouts", ["shelf_id"], name: "index_checkouts_on_shelf_id"
349
351
  add_index "checkouts", ["user_id"], name: "index_checkouts_on_user_id"
350
352
 
@@ -357,6 +359,17 @@ ActiveRecord::Schema.define(version: 20160703185015) do
357
359
  t.datetime "updated_at"
358
360
  end
359
361
 
362
+ create_table "colors", force: :cascade do |t|
363
+ t.integer "library_group_id"
364
+ t.string "property"
365
+ t.string "code"
366
+ t.integer "position"
367
+ t.datetime "created_at"
368
+ t.datetime "updated_at"
369
+ end
370
+
371
+ add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
372
+
360
373
  create_table "content_types", force: :cascade do |t|
361
374
  t.string "name", null: false
362
375
  t.text "display_name"
@@ -402,6 +415,18 @@ ActiveRecord::Schema.define(version: 20160703185015) do
402
415
  add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
403
416
  add_index "creates", ["work_id"], name: "index_creates_on_work_id"
404
417
 
418
+ create_table "demands", force: :cascade do |t|
419
+ t.integer "user_id"
420
+ t.integer "item_id"
421
+ t.integer "message_id"
422
+ t.datetime "created_at", null: false
423
+ t.datetime "updated_at", null: false
424
+ end
425
+
426
+ add_index "demands", ["item_id"], name: "index_demands_on_item_id"
427
+ add_index "demands", ["message_id"], name: "index_demands_on_message_id"
428
+ add_index "demands", ["user_id"], name: "index_demands_on_user_id"
429
+
405
430
  create_table "donates", force: :cascade do |t|
406
431
  t.integer "agent_id", null: false
407
432
  t.integer "item_id", null: false
@@ -644,7 +669,10 @@ ActiveRecord::Schema.define(version: 20160703185015) do
644
669
  t.datetime "created_at"
645
670
  t.datetime "updated_at"
646
671
  t.datetime "deleted_at"
672
+ t.text "opening_hour"
647
673
  t.string "isil"
674
+ t.float "latitude"
675
+ t.float "longitude"
648
676
  end
649
677
 
650
678
  add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
@@ -677,6 +705,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
677
705
  t.boolean "allow_bookmark_external_url", default: false, null: false
678
706
  t.string "url", default: "http://localhost:3000/"
679
707
  t.text "settings"
708
+ t.text "html_snippet"
680
709
  end
681
710
 
682
711
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
@@ -697,6 +726,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
697
726
  t.integer "manifestation_checkout_stat_id"
698
727
  t.datetime "created_at"
699
728
  t.datetime "updated_at"
729
+ t.boolean "most_recent"
700
730
  end
701
731
 
702
732
  add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
@@ -743,6 +773,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
743
773
  t.integer "manifestation_reserve_stat_id"
744
774
  t.datetime "created_at"
745
775
  t.datetime "updated_at"
776
+ t.boolean "most_recent"
746
777
  end
747
778
 
748
779
  add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
@@ -876,12 +907,11 @@ ActiveRecord::Schema.define(version: 20160703185015) do
876
907
 
877
908
  create_table "message_transitions", force: :cascade do |t|
878
909
  t.string "to_state"
879
- t.text "metadata", default: "{}"
910
+ t.text "metadata", default: "{}"
880
911
  t.integer "sort_key"
881
912
  t.integer "message_id"
882
913
  t.datetime "created_at"
883
914
  t.datetime "updated_at"
884
- t.boolean "most_recent"
885
915
  end
886
916
 
887
917
  add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
@@ -1046,11 +1076,12 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1046
1076
 
1047
1077
  create_table "reserve_transitions", force: :cascade do |t|
1048
1078
  t.string "to_state"
1049
- t.text "metadata", default: "{}"
1079
+ t.text "metadata", default: "{}"
1050
1080
  t.integer "sort_key"
1051
1081
  t.integer "reserve_id"
1052
1082
  t.datetime "created_at"
1053
1083
  t.datetime "updated_at"
1084
+ t.boolean "most_recent"
1054
1085
  end
1055
1086
 
1056
1087
  add_index "reserve_transitions", ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
@@ -1069,6 +1100,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1069
1100
  t.datetime "deleted_at"
1070
1101
  t.boolean "expiration_notice_to_patron", default: false
1071
1102
  t.boolean "expiration_notice_to_library", default: false
1103
+ t.integer "pickup_location_id"
1072
1104
  t.datetime "retained_at"
1073
1105
  t.datetime "postponed_at"
1074
1106
  t.integer "lock_version", default: 0, null: false
@@ -1076,6 +1108,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1076
1108
 
1077
1109
  add_index "reserves", ["item_id"], name: "index_reserves_on_item_id"
1078
1110
  add_index "reserves", ["manifestation_id"], name: "index_reserves_on_manifestation_id"
1111
+ add_index "reserves", ["pickup_location_id"], name: "index_reserves_on_pickup_location_id"
1079
1112
  add_index "reserves", ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
1080
1113
  add_index "reserves", ["user_id"], name: "index_reserves_on_user_id"
1081
1114
 
@@ -1341,6 +1374,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1341
1374
  t.integer "user_checkout_stat_id"
1342
1375
  t.datetime "created_at"
1343
1376
  t.datetime "updated_at"
1377
+ t.boolean "most_recent"
1344
1378
  end
1345
1379
 
1346
1380
  add_index "user_checkout_stat_transitions", ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
@@ -1475,6 +1509,7 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1475
1509
  t.integer "user_reserve_stat_id"
1476
1510
  t.datetime "created_at"
1477
1511
  t.datetime "updated_at"
1512
+ t.boolean "most_recent"
1478
1513
  end
1479
1514
 
1480
1515
  add_index "user_reserve_stat_transitions", ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
@@ -1525,15 +1560,15 @@ ActiveRecord::Schema.define(version: 20160703185015) do
1525
1560
  add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1526
1561
  add_index "users", ["username"], name: "index_users_on_username", unique: true
1527
1562
 
1528
- create_table "versions", force: :cascade do |t|
1529
- t.string "item_type", null: false
1530
- t.integer "item_id", null: false
1531
- t.string "event", null: false
1532
- t.string "whodunnit"
1533
- t.text "object"
1534
- t.datetime "created_at"
1563
+ create_table "withdraws", force: :cascade do |t|
1564
+ t.integer "basket_id"
1565
+ t.integer "item_id"
1566
+ t.integer "librarian_id"
1567
+ t.datetime "created_at", null: false
1568
+ t.datetime "updated_at", null: false
1535
1569
  end
1536
1570
 
1537
- add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1571
+ add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
1572
+ add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
1538
1573
 
1539
1574
  end