enju_circulation 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/manifestation_checkout_stat.rb +1 -1
  3. data/app/models/manifestation_checkout_stat_transition.rb +1 -1
  4. data/app/models/manifestation_reserve_stat.rb +1 -1
  5. data/app/models/manifestation_reserve_stat_transition.rb +1 -1
  6. data/app/models/reserve.rb +1 -1
  7. data/app/models/reserve_transition.rb +1 -1
  8. data/app/models/user_checkout_stat.rb +1 -1
  9. data/app/models/user_checkout_stat_transition.rb +1 -1
  10. data/app/models/user_reserve_stat.rb +1 -1
  11. data/app/models/user_reserve_stat_transition.rb +1 -1
  12. data/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb +13 -0
  13. data/db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb +13 -0
  14. data/db/migrate/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb +13 -0
  15. data/db/migrate/20180107162029_add_constraints_to_most_recent_for_manifestation_checkout_stat_transitions.rb +13 -0
  16. data/db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb +13 -0
  17. data/lib/enju_circulation/version.rb +1 -1
  18. data/spec/dummy/db/migrate/059_create_libraries.rb +7 -9
  19. data/spec/dummy/db/migrate/069_create_shelves.rb +3 -4
  20. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -3
  21. data/spec/dummy/db/migrate/120_create_baskets.rb +2 -3
  22. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +4 -7
  23. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -5
  24. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  25. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
  26. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  27. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
  28. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
  29. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  30. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
  31. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  32. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  33. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
  34. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +5 -0
  35. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
  36. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +6 -0
  37. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +19 -6
  38. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
  39. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +5 -0
  40. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
  41. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
  42. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
  43. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
  44. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
  45. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +13 -0
  46. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +13 -0
  47. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +13 -0
  48. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +13 -0
  49. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +13 -0
  50. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +13 -0
  51. data/spec/dummy/db/schema.rb +47 -18
  52. data/spec/fixtures/reserve_transitions.yml +1 -1
  53. metadata +38 -6
  54. data/lib/generators/enju_circulation/update/update_generator.rb +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c7dd7a5e75571acdc8dde4eaa51b41285669e9c
4
- data.tar.gz: 1d925968dff36c5de25ece699685a5c5712034af
3
+ metadata.gz: dda5244be075c380ff8290904ec4d0bd0503d075
4
+ data.tar.gz: 76ea8769aeeb402fe0516f8b38bc7b80a7fd6114
5
5
  SHA512:
6
- metadata.gz: 4324c83b957e1fe7e6638aa069dbf76f3fc58ad723175bb552ed8db94af047ec02af8faed9581831b4627c6954002af5e0b595dc39edd308934c493e060c2874
7
- data.tar.gz: 5a7f410f273fb3fcbe4281604b027f5a922cfaeae5e85da3554f7aeedd6d75841ec68c490477250279a03cbbfa28760fd3942a2395072bfe3e8cdfa7bb23a80f
6
+ metadata.gz: 7f9b1b8a03dfa58fe4710fdd65ca34a00f0b44e6cbcf54a506b0197d3b63237aacecd6ead72a44a437e978f3dfba4d73d06b1b41c6110ed7a41461fa6d2b589f
7
+ data.tar.gz: c02c164437b5b2183841af93e8163adc3dfdcb97633de55f11755124f094e12a7d72675b97492b6adb553874a2b6d4f1a8c5a47a1af05cf8bbf55233d950721d
@@ -10,7 +10,7 @@ class ManifestationCheckoutStat < ActiveRecord::Base
10
10
  paginates_per 10
11
11
  attr_accessor :mode
12
12
 
13
- has_many :manifestation_checkout_stat_transitions
13
+ has_many :manifestation_checkout_stat_transitions, autosave: false
14
14
 
15
15
  def state_machine
16
16
  ManifestationCheckoutStatStateMachine.new(self, transition_class: ManifestationCheckoutStatTransition)
@@ -17,5 +17,5 @@ end
17
17
  # manifestation_checkout_stat_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -10,7 +10,7 @@ class ManifestationReserveStat < ActiveRecord::Base
10
10
  paginates_per 10
11
11
  attr_accessor :mode
12
12
 
13
- has_many :manifestation_reserve_stat_transitions
13
+ has_many :manifestation_reserve_stat_transitions, autosave: false
14
14
 
15
15
  def state_machine
16
16
  ManifestationReserveStatStateMachine.new(self, transition_class: ManifestationReserveStatTransition)
@@ -17,5 +17,5 @@ end
17
17
  # manifestation_reserve_stat_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -74,7 +74,7 @@ class Reserve < ActiveRecord::Base
74
74
  ReserveStateMachine.new(self, transition_class: ReserveTransition)
75
75
  end
76
76
 
77
- has_many :reserve_transitions
77
+ has_many :reserve_transitions, autosave: false
78
78
 
79
79
  delegate :can_transition_to?, :transition_to!, :transition_to, :current_state,
80
80
  to: :state_machine
@@ -17,5 +17,5 @@ end
17
17
  # reserve_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -10,7 +10,7 @@ class UserCheckoutStat < ActiveRecord::Base
10
10
  paginates_per 10
11
11
  attr_accessor :mode
12
12
 
13
- has_many :user_checkout_stat_transitions
13
+ has_many :user_checkout_stat_transitions, autosave: false
14
14
 
15
15
  def state_machine
16
16
  UserCheckoutStatStateMachine.new(self, transition_class: UserCheckoutStatTransition)
@@ -17,5 +17,5 @@ end
17
17
  # user_checkout_stat_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -10,7 +10,7 @@ class UserReserveStat < ActiveRecord::Base
10
10
  paginates_per 10
11
11
  attr_accessor :mode
12
12
 
13
- has_many :user_reserve_stat_transitions
13
+ has_many :user_reserve_stat_transitions, autosave: false
14
14
 
15
15
  def state_machine
16
16
  UserReserveStatStateMachine.new(self, transition_class: UserReserveStatTransition)
@@ -17,5 +17,5 @@ end
17
17
  # user_reserve_stat_id :integer
18
18
  # created_at :datetime
19
19
  # updated_at :datetime
20
- # most_recent :boolean
20
+ # most_recent :boolean not null
21
21
  #
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForReserveTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :reserve_transitions, [:reserve_id, :most_recent], unique: true, where: "most_recent", name: "index_reserve_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :reserve_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :reserve_transitions, name: "index_reserve_transitions_parent_most_recent"
11
+ change_column_null :reserve_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForUserCheckoutStatTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :user_checkout_stat_transitions, [:user_checkout_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_user_checkout_stat_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :user_checkout_stat_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :user_checkout_stat_transitions, name: "index_user_checkout_stat_transitions_parent_most_recent"
11
+ change_column_null :user_checkout_stat_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForUserReserveStatTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :user_reserve_stat_transitions, [:user_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_user_reserve_stat_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :user_reserve_stat_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :user_reserve_stat_transitions, name: "index_user_reserve_stat_transitions_parent_most_recent"
11
+ change_column_null :user_reserve_stat_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForManifestationCheckoutStatTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :manifestation_checkout_stat_transitions, [:manifestation_checkout_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_manifestation_checkout_stat_transitions_parent_most_rece" #, algorithm: :concurrently
6
+ change_column_null :manifestation_checkout_stat_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :manifestation_checkout_stat_transitions, name: "index_manifestation_checkout_stat_transitions_parent_most_rece"
11
+ change_column_null :manifestation_checkout_stat_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForManifestationReserveStatTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :manifestation_reserve_stat_transitions, [:manifestation_reserve_stat_id, :most_recent], unique: true, where: "most_recent", name: "index_manifestation_reserve_stat_transitions_parent_most_recen" #, algorithm: :concurrently
6
+ change_column_null :manifestation_reserve_stat_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :manifestation_reserve_stat_transitions, name: "index_manifestation_reserve_stat_transitions_parent_most_recen"
11
+ change_column_null :manifestation_reserve_stat_transitions, :most_recent, true
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module EnjuCirculation
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -1,9 +1,9 @@
1
1
  class CreateLibraries < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :libraries do |t|
4
- t.string :name, :null => false
4
+ t.string :name, index: true, null: false
5
5
  t.text :display_name
6
- t.string :short_display_name, :null => false
6
+ t.string :short_display_name, null: false
7
7
  t.string :zip_code
8
8
  t.text :street
9
9
  t.text :locality
@@ -12,17 +12,15 @@ class CreateLibraries < ActiveRecord::Migration
12
12
  t.string :telephone_number_2
13
13
  t.string :fax_number
14
14
  t.text :note
15
- t.integer :call_number_rows, :default => 1, :null => false
16
- t.string :call_number_delimiter, :default => "|", :null => false
17
- t.integer :library_group_id, :default => 1, :null => false
18
- t.integer :users_count, :default => 0, :null => false
15
+ t.integer :call_number_rows, default: 1, null: false
16
+ t.string :call_number_delimiter, default: "|", null: false
17
+ t.references :library_group, index: true, null: false
18
+ t.integer :users_count, default: 0, null: false
19
19
  t.integer :position
20
- t.integer :country_id
20
+ t.references :country
21
21
 
22
22
  t.timestamps
23
23
  t.datetime :deleted_at
24
24
  end
25
- add_index :libraries, :library_group_id
26
- add_index :libraries, :name, :unique => true
27
25
  end
28
26
  end
@@ -1,15 +1,14 @@
1
1
  class CreateShelves < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :shelves do |t|
4
- t.string :name, :null => false
4
+ t.string :name, null: false
5
5
  t.text :display_name
6
6
  t.text :note
7
- t.integer :library_id, :default => 1, :null => false
8
- t.integer :items_count, :default => 0, :null => false
7
+ t.references :library, index: true, null: false
8
+ t.integer :items_count, default: 0, null: false
9
9
  t.integer :position
10
10
  t.timestamps
11
11
  t.datetime :deleted_at
12
12
  end
13
- add_index :shelves, :library_id
14
13
  end
15
14
  end
@@ -1,9 +1,9 @@
1
1
  class CreateLibraryGroups < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :library_groups do |t|
4
- t.string :name, :null => false
4
+ t.string :name, null: false
5
5
  t.text :display_name
6
- t.string :short_name, :null => false
6
+ t.string :short_name, index: true, null: false
7
7
  t.text :my_networks
8
8
  t.text :login_banner
9
9
  t.text :note
@@ -12,6 +12,5 @@ class CreateLibraryGroups < ActiveRecord::Migration
12
12
 
13
13
  t.timestamps
14
14
  end
15
- add_index :library_groups, :short_name
16
15
  end
17
16
  end
@@ -1,12 +1,11 @@
1
1
  class CreateBaskets < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :baskets do |t|
4
- t.integer :user_id
4
+ t.references :user, index: true
5
5
  t.text :note
6
- t.integer :lock_version, :default => 0, :null => false
6
+ t.integer :lock_version, default: 0, null: false
7
7
 
8
8
  t.timestamps
9
9
  end
10
- add_index :baskets, :user_id
11
10
  end
12
11
  end
@@ -1,17 +1,14 @@
1
1
  class CreateSubscriptions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :subscriptions do |t|
4
- t.text :title, :null => false
4
+ t.text :title, null: false
5
5
  t.text :note
6
- #t.integer :subscription_list_id, :integer
7
- t.integer :user_id
8
- t.integer :order_list_id
6
+ t.references :user, index: true
7
+ t.references :order_list, index: true
9
8
  t.datetime :deleted_at
10
- t.integer :subscribes_count, :default => 0, :null => false
9
+ t.integer :subscribes_count, default: 0, null: false
11
10
 
12
11
  t.timestamps
13
12
  end
14
- add_index :subscriptions, :user_id
15
- add_index :subscriptions, :order_list_id
16
13
  end
17
14
  end
@@ -1,14 +1,13 @@
1
1
  class CreateSubscribes < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :subscribes do |t|
4
- t.integer :subscription_id, :null => false
5
- t.integer :work_id, :null => false
6
- t.datetime :start_at, :null => false
7
- t.datetime :end_at, :null => false
4
+ t.references :subscription, index: true, null: false
5
+ t.integer :work_id, null: false
6
+ t.datetime :start_at, null: false
7
+ t.datetime :end_at, null: false
8
8
 
9
9
  t.timestamps
10
10
  end
11
- add_index :subscribes, :subscription_id
12
11
  add_index :subscribes, :work_id
13
12
  end
14
13
  end
@@ -8,7 +8,7 @@ class AddDcndlSchema < ActiveRecord::Migration
8
8
  add_column :manifestations, :valid_until, :timestamp
9
9
  add_column :manifestations, :date_submitted, :timestamp
10
10
  add_column :manifestations, :date_accepted, :timestamp
11
- add_column :manifestations, :date_caputured, :timestamp
11
+ add_column :manifestations, :date_captured, :timestamp
12
12
  rename_column :manifestations, :copyright_date, :date_copyrighted
13
13
  end
14
14
 
@@ -21,7 +21,7 @@ class AddDcndlSchema < ActiveRecord::Migration
21
21
  remove_column :manifestations, :valid_until
22
22
  remove_column :manifestations, :date_submitted
23
23
  remove_column :manifestations, :date_accepted
24
- remove_column :manifestations, :date_caputured
24
+ remove_column :manifestations, :date_captured
25
25
  rename_column :manifestations, :date_copyrighted, :copyright_date
26
26
  end
27
27
  end
@@ -1,14 +1,11 @@
1
1
  class CreateAccepts < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :accepts do |t|
4
- t.integer :basket_id
5
- t.integer :item_id
6
- t.integer :librarian_id
4
+ t.references :basket, index: true
5
+ t.references :item, index: true
6
+ t.references :librarian, index: true
7
7
 
8
8
  t.timestamps
9
9
  end
10
-
11
- add_index :accepts, :basket_id
12
- add_index :accepts, :item_id
13
10
  end
14
11
  end
@@ -1,7 +1,7 @@
1
1
  class CreateUserImportFiles < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_import_files do |t|
4
- t.integer :user_id
4
+ t.references :user, index: true
5
5
  t.text :note
6
6
  t.datetime :executed_at
7
7
  t.string :user_import_file_name
@@ -1,8 +1,8 @@
1
1
  class CreateUserImportResults < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_import_results do |t|
4
- t.integer :user_import_file_id
5
- t.integer :user_id
4
+ t.references :user_import_file, index: true
5
+ t.references :user, index: true
6
6
  t.text :body
7
7
 
8
8
  t.timestamps
@@ -8,11 +8,10 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
8
8
  t.text :metadata, default: "{}"
9
9
  end
10
10
  t.integer :sort_key
11
- t.integer :user_import_file_id
11
+ t.references :user_import_file, index: true
12
12
  t.timestamps
13
13
  end
14
14
 
15
- add_index :user_import_file_transitions, :user_import_file_id
16
15
  add_index :user_import_file_transitions, [:sort_key, :user_import_file_id], unique: true, name: "index_user_import_file_transitions_on_sort_key_and_file_id"
17
16
  end
18
17
  end
@@ -1,7 +1,7 @@
1
1
  class CreateUserExportFiles < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_export_files do |t|
4
- t.integer :user_id
4
+ t.references :user, index: true
5
5
  t.attachment :user_export
6
6
  t.datetime :executed_at
7
7
 
@@ -8,7 +8,7 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration
8
8
  t.text :metadata, default: "{}"
9
9
  end
10
10
  t.integer :sort_key
11
- t.integer :user_export_file_id
11
+ t.references :user_export_file, index: true
12
12
  t.timestamps
13
13
  end
14
14
 
@@ -1,5 +1,5 @@
1
1
  class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration
2
2
  def change
3
- add_column :user_import_files, :default_library_id, :integer
3
+ add_reference :user_import_files, :default_library
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration
2
2
  def change
3
- add_column :user_import_files, :default_user_group_id, :integer
3
+ add_reference :user_import_files, :default_user_group
4
4
  end
5
5
  end
@@ -1,14 +1,12 @@
1
1
  class CreateColors < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :colors do |t|
4
- t.integer :library_group_id
4
+ t.references :library_group, index: true
5
5
  t.string :property
6
6
  t.string :code
7
7
  t.integer :position
8
8
 
9
9
  t.timestamps
10
10
  end
11
-
12
- add_index :colors, :library_group_id
13
11
  end
14
12
  end
@@ -0,0 +1,5 @@
1
+ class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration
2
+ def change
3
+ add_foreign_key :items, :manifestations
4
+ end
5
+ end
@@ -1,13 +1,11 @@
1
1
  class CreateWithdraws < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :withdraws do |t|
4
- t.integer :basket_id
5
- t.integer :item_id
6
- t.integer :librarian_id
4
+ t.references :basket, index: true
5
+ t.references :item, index: true
6
+ t.references :librarian, index: true
7
7
 
8
8
  t.timestamps null: false
9
9
  end
10
- add_index :withdraws, :basket_id
11
- add_index :withdraws, :item_id
12
10
  end
13
11
  end
@@ -0,0 +1,6 @@
1
+ class AddProfileIdToAgent < ActiveRecord::Migration
2
+ def change
3
+ add_column :agents, :profile_id, :integer
4
+ add_index :agents, :profile_id
5
+ end
6
+ end
@@ -1,13 +1,26 @@
1
+ # This migration comes from enju_library_engine (originally 20151213070943)
1
2
  class AddTranslationTableToLibraryGroup < ActiveRecord::Migration
2
3
  def up
3
- LibraryGroup.create_translation_table!({
4
- login_banner: :text
5
- }, {
6
- migrate_data: true
7
- })
4
+ if defined?(Globalize)
5
+ LibraryGroup.create_translation_table!({
6
+ login_banner: :text
7
+ }, {
8
+ migrate_data: true
9
+ })
10
+ end
11
+
12
+ if defined?(AwesomeHstoreTranslate)
13
+ add_column :library_groups, :login_banner, :hstore
14
+ end
8
15
  end
9
16
 
10
17
  def down
11
- LibraryGroup.drop_translation_table! migrate_data: true
18
+ if defined?(Globalize)
19
+ LibraryGroup.drop_translation_table! migrate_data: true
20
+ end
21
+
22
+ if defined?(AwesomeHstoreTranslate)
23
+ remove_column :library_groups, :login_banner
24
+ end
12
25
  end
13
26
  end
@@ -1,9 +1,22 @@
1
+ # This migration comes from enju_library_engine (originally 20151213072705)
1
2
  class AddFooterBannerToLibraryGroup < ActiveRecord::Migration
2
3
  def up
3
- LibraryGroup.add_translation_fields! footer_banner: :text
4
+ if defined?(Globalize)
5
+ LibraryGroup.add_translation_fields! footer_banner: :text
6
+ end
7
+
8
+ if defined?(AwesomeHstoreTranslate)
9
+ add_column :library_groups, :footer_banner, :hstore
10
+ end
4
11
  end
5
12
 
6
13
  def down
7
- remove_column :library_group_translations, :footer_banner
14
+ if defined?(Globalize)
15
+ remove_column :library_group_translations, :footer_banner
16
+ end
17
+
18
+ if defined?(AwesomeHstoreTranslate)
19
+ remove_column :library_groups, :footer_banner
20
+ end
8
21
  end
9
22
  end
@@ -0,0 +1,5 @@
1
+ class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :csv_charset_conversion, :boolean, null: false, default: false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_attachment :library_groups, :header_logo
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration
2
+ def change
3
+ change_column_null :items, :manifestation_id, false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration
2
+ def change
3
+ rename_column :library_groups, :login_banner, :old_login_banner
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration
2
+ def change
3
+ add_foreign_key :libraries, :library_groups, null: false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration
2
+ def change
3
+ add_column :library_groups, :header_logo_meta, :text
4
+ end
5
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :user_import_file_transitions, [:user_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :user_import_file_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :user_import_file_transitions, name: "index_user_import_file_transitions_parent_most_recent"
11
+ change_column_null :user_import_file_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :user_export_file_transitions, [:user_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_user_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :user_export_file_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :user_export_file_transitions, name: "index_user_export_file_transitions_parent_most_recent"
11
+ change_column_null :user_export_file_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForAgentImportFileTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :agent_import_file_transitions, [:agent_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_agent_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :agent_import_file_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :agent_import_file_transitions, name: "index_agent_import_file_transitions_parent_most_recent"
11
+ change_column_null :agent_import_file_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForResourceImportFileTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :resource_import_file_transitions, [:resource_import_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_import_file_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :resource_import_file_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :resource_import_file_transitions, name: "index_resource_import_file_transitions_parent_most_recent"
11
+ change_column_null :resource_import_file_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForResourceExportFileTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :resource_export_file_transitions, [:resource_export_file_id, :most_recent], unique: true, where: "most_recent", name: "index_resource_export_file_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :resource_export_file_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :resource_export_file_transitions, name: "index_resource_export_file_transitions_parent_most_recent"
11
+ change_column_null :resource_export_file_transitions, :most_recent, true
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ class AddConstraintsToMostRecentForImportRequestTransitions < ActiveRecord::Migration
2
+ disable_ddl_transaction!
3
+
4
+ def up
5
+ add_index :import_request_transitions, [:import_request_id, :most_recent], unique: true, where: "most_recent", name: "index_import_request_transitions_parent_most_recent" #, algorithm: :concurrently
6
+ change_column_null :import_request_transitions, :most_recent, false
7
+ end
8
+
9
+ def down
10
+ remove_index :import_request_transitions, name: "index_import_request_transitions_parent_most_recent"
11
+ change_column_null :import_request_transitions, :most_recent, true
12
+ end
13
+ 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: 20160820004638) do
14
+ ActiveRecord::Schema.define(version: 20180107162048) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -23,6 +23,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
23
23
 
24
24
  add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
25
25
  add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
26
+ add_index "accepts", ["librarian_id"], name: "index_accepts_on_librarian_id"
26
27
 
27
28
  create_table "agent_import_file_transitions", force: :cascade do |t|
28
29
  t.string "to_state"
@@ -31,9 +32,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
31
32
  t.integer "agent_import_file_id"
32
33
  t.datetime "created_at"
33
34
  t.datetime "updated_at"
34
- t.boolean "most_recent"
35
+ t.boolean "most_recent", null: false
35
36
  end
36
37
 
38
+ add_index "agent_import_file_transitions", ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true
37
39
  add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
38
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
39
41
 
@@ -159,12 +161,14 @@ ActiveRecord::Schema.define(version: 20160820004638) do
159
161
  t.string "birth_date"
160
162
  t.string "death_date"
161
163
  t.string "agent_identifier"
164
+ t.integer "profile_id"
162
165
  end
163
166
 
164
167
  add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
165
168
  add_index "agents", ["country_id"], name: "index_agents_on_country_id"
166
169
  add_index "agents", ["full_name"], name: "index_agents_on_full_name"
167
170
  add_index "agents", ["language_id"], name: "index_agents_on_language_id"
171
+ add_index "agents", ["profile_id"], name: "index_agents_on_profile_id"
168
172
  add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
169
173
 
170
174
  create_table "baskets", force: :cascade do |t|
@@ -548,9 +552,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
548
552
  t.integer "import_request_id"
549
553
  t.datetime "created_at"
550
554
  t.datetime "updated_at"
551
- t.boolean "most_recent"
555
+ t.boolean "most_recent", null: false
552
556
  end
553
557
 
558
+ add_index "import_request_transitions", ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true
554
559
  add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
555
560
  add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
556
561
 
@@ -598,7 +603,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
598
603
  t.string "binding_item_identifier"
599
604
  t.string "binding_call_number"
600
605
  t.datetime "binded_at"
601
- t.integer "manifestation_id"
606
+ t.integer "manifestation_id", null: false
602
607
  end
603
608
 
604
609
  add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
@@ -655,7 +660,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
655
660
  t.text "note"
656
661
  t.integer "call_number_rows", default: 1, null: false
657
662
  t.string "call_number_delimiter", default: "|", null: false
658
- t.integer "library_group_id", default: 1, null: false
663
+ t.integer "library_group_id", null: false
659
664
  t.integer "users_count", default: 0, null: false
660
665
  t.integer "position"
661
666
  t.integer "country_id"
@@ -669,7 +674,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
669
674
  end
670
675
 
671
676
  add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
672
- add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
677
+ add_index "libraries", ["name"], name: "index_libraries_on_name"
673
678
 
674
679
  create_table "library_group_translations", force: :cascade do |t|
675
680
  t.integer "library_group_id", null: false
@@ -688,7 +693,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
688
693
  t.text "display_name"
689
694
  t.string "short_name", null: false
690
695
  t.text "my_networks"
691
- t.text "login_banner"
696
+ t.text "old_login_banner"
692
697
  t.text "note"
693
698
  t.integer "country_id"
694
699
  t.integer "position"
@@ -702,6 +707,12 @@ ActiveRecord::Schema.define(version: 20160820004638) do
702
707
  t.boolean "family_name_first", default: true
703
708
  t.integer "pub_year_facet_range_interval", default: 10
704
709
  t.integer "user_id"
710
+ t.boolean "csv_charset_conversion", default: false, null: false
711
+ t.string "header_logo_file_name"
712
+ t.string "header_logo_content_type"
713
+ t.integer "header_logo_file_size"
714
+ t.datetime "header_logo_updated_at"
715
+ t.text "header_logo_meta"
705
716
  end
706
717
 
707
718
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
@@ -723,9 +734,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
723
734
  t.integer "manifestation_checkout_stat_id"
724
735
  t.datetime "created_at"
725
736
  t.datetime "updated_at"
726
- t.boolean "most_recent"
737
+ t.boolean "most_recent", null: false
727
738
  end
728
739
 
740
+ add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id", "most_recent"], name: "index_manifestation_checkout_stat_transitions_parent_most_rece", unique: true
729
741
  add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
730
742
  add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
731
743
 
@@ -770,9 +782,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
770
782
  t.integer "manifestation_reserve_stat_id"
771
783
  t.datetime "created_at"
772
784
  t.datetime "updated_at"
773
- t.boolean "most_recent"
785
+ t.boolean "most_recent", null: false
774
786
  end
775
787
 
788
+ add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id", "most_recent"], name: "index_manifestation_reserve_stat_transitions_parent_most_recen", unique: true
776
789
  add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
777
790
  add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
778
791
 
@@ -832,7 +845,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
832
845
  t.datetime "valid_until"
833
846
  t.datetime "date_submitted"
834
847
  t.datetime "date_accepted"
835
- t.datetime "date_caputured"
848
+ t.datetime "date_captured"
836
849
  t.string "pub_date"
837
850
  t.string "edition_string"
838
851
  t.integer "volume_number"
@@ -1088,9 +1101,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1088
1101
  t.integer "reserve_id"
1089
1102
  t.datetime "created_at"
1090
1103
  t.datetime "updated_at"
1091
- t.boolean "most_recent"
1104
+ t.boolean "most_recent", null: false
1092
1105
  end
1093
1106
 
1107
+ add_index "reserve_transitions", ["reserve_id", "most_recent"], name: "index_reserve_transitions_parent_most_recent", unique: true
1094
1108
  add_index "reserve_transitions", ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
1095
1109
  add_index "reserve_transitions", ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
1096
1110
 
@@ -1125,9 +1139,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1125
1139
  t.integer "resource_export_file_id"
1126
1140
  t.datetime "created_at"
1127
1141
  t.datetime "updated_at"
1128
- t.boolean "most_recent"
1142
+ t.boolean "most_recent", null: false
1129
1143
  end
1130
1144
 
1145
+ add_index "resource_export_file_transitions", ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true
1131
1146
  add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
1132
1147
  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
1133
1148
 
@@ -1149,9 +1164,10 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1149
1164
  t.integer "resource_import_file_id"
1150
1165
  t.datetime "created_at"
1151
1166
  t.datetime "updated_at"
1152
- t.boolean "most_recent"
1167
+ t.boolean "most_recent", null: false
1153
1168
  end
1154
1169
 
1170
+ add_index "resource_import_file_transitions", ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true
1155
1171
  add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
1156
1172
  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
1157
1173
 
@@ -1261,7 +1277,7 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1261
1277
  t.string "name", null: false
1262
1278
  t.text "display_name"
1263
1279
  t.text "note"
1264
- t.integer "library_id", default: 1, null: false
1280
+ t.integer "library_id", null: false
1265
1281
  t.integer "items_count", default: 0, null: false
1266
1282
  t.integer "position"
1267
1283
  t.datetime "created_at"
@@ -1314,10 +1330,11 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1314
1330
  t.integer "user_checkout_stat_id"
1315
1331
  t.datetime "created_at"
1316
1332
  t.datetime "updated_at"
1317
- t.boolean "most_recent"
1333
+ t.boolean "most_recent", null: false
1318
1334
  end
1319
1335
 
1320
1336
  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
1337
+ add_index "user_checkout_stat_transitions", ["user_checkout_stat_id", "most_recent"], name: "index_user_checkout_stat_transitions_parent_most_recent", unique: true
1321
1338
  add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
1322
1339
 
1323
1340
  create_table "user_checkout_stats", force: :cascade do |t|
@@ -1340,11 +1357,13 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1340
1357
  t.integer "user_export_file_id"
1341
1358
  t.datetime "created_at"
1342
1359
  t.datetime "updated_at"
1343
- t.boolean "most_recent"
1360
+ t.boolean "most_recent", null: false
1344
1361
  end
1345
1362
 
1346
1363
  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
1364
+ add_index "user_export_file_transitions", ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true
1347
1365
  add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
1366
+ add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1348
1367
 
1349
1368
  create_table "user_export_files", force: :cascade do |t|
1350
1369
  t.integer "user_id"
@@ -1357,6 +1376,8 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1357
1376
  t.datetime "updated_at"
1358
1377
  end
1359
1378
 
1379
+ add_index "user_export_files", ["user_id"], name: "index_user_export_files_on_user_id"
1380
+
1360
1381
  create_table "user_group_has_checkout_types", force: :cascade do |t|
1361
1382
  t.integer "user_group_id", null: false
1362
1383
  t.integer "checkout_type_id", null: false
@@ -1409,10 +1430,11 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1409
1430
  t.integer "user_import_file_id"
1410
1431
  t.datetime "created_at"
1411
1432
  t.datetime "updated_at"
1412
- t.boolean "most_recent"
1433
+ t.boolean "most_recent", null: false
1413
1434
  end
1414
1435
 
1415
1436
  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
1437
+ add_index "user_import_file_transitions", ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true
1416
1438
  add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1417
1439
 
1418
1440
  create_table "user_import_files", force: :cascade do |t|
@@ -1433,6 +1455,8 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1433
1455
  t.integer "default_user_group_id"
1434
1456
  end
1435
1457
 
1458
+ add_index "user_import_files", ["user_id"], name: "index_user_import_files_on_user_id"
1459
+
1436
1460
  create_table "user_import_results", force: :cascade do |t|
1437
1461
  t.integer "user_import_file_id"
1438
1462
  t.integer "user_id"
@@ -1442,6 +1466,9 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1442
1466
  t.text "error_message"
1443
1467
  end
1444
1468
 
1469
+ add_index "user_import_results", ["user_id"], name: "index_user_import_results_on_user_id"
1470
+ add_index "user_import_results", ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1471
+
1445
1472
  create_table "user_reserve_stat_transitions", force: :cascade do |t|
1446
1473
  t.string "to_state"
1447
1474
  t.text "metadata", default: "{}"
@@ -1449,10 +1476,11 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1449
1476
  t.integer "user_reserve_stat_id"
1450
1477
  t.datetime "created_at"
1451
1478
  t.datetime "updated_at"
1452
- t.boolean "most_recent"
1479
+ t.boolean "most_recent", null: false
1453
1480
  end
1454
1481
 
1455
1482
  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
1483
+ add_index "user_reserve_stat_transitions", ["user_reserve_stat_id", "most_recent"], name: "index_user_reserve_stat_transitions_parent_most_recent", unique: true
1456
1484
  add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
1457
1485
 
1458
1486
  create_table "user_reserve_stats", force: :cascade do |t|
@@ -1516,5 +1544,6 @@ ActiveRecord::Schema.define(version: 20160820004638) do
1516
1544
 
1517
1545
  add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
1518
1546
  add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
1547
+ add_index "withdraws", ["librarian_id"], name: "index_withdraws_on_librarian_id"
1519
1548
 
1520
1549
  end
@@ -100,5 +100,5 @@ reserve_transition_00015:
100
100
  # reserve_id :integer
101
101
  # created_at :datetime
102
102
  # updated_at :datetime
103
- # most_recent :boolean
103
+ # most_recent :boolean not null
104
104
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_circulation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.3
19
+ version: 0.2.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.3
26
+ version: 0.2.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: enju_event
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.1
33
+ version: 0.2.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.2.1
40
+ version: 0.2.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: enju_leaf
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -495,6 +495,11 @@ files:
495
495
  - db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb
496
496
  - db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb
497
497
  - db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb
498
+ - db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb
499
+ - db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb
500
+ - db/migrate/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb
501
+ - db/migrate/20180107162029_add_constraints_to_most_recent_for_manifestation_checkout_stat_transitions.rb
502
+ - db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb
498
503
  - lib/enju_circulation.rb
499
504
  - lib/enju_circulation/engine.rb
500
505
  - lib/enju_circulation/helper.rb
@@ -506,7 +511,6 @@ files:
506
511
  - lib/generators/enju_circulation/setup/templates/db/fixtures/checkout_types.yml
507
512
  - lib/generators/enju_circulation/setup/templates/db/fixtures/circulation_statuses.yml
508
513
  - lib/generators/enju_circulation/setup/templates/db/fixtures/use_restrictions.yml
509
- - lib/generators/enju_circulation/update/update_generator.rb
510
514
  - lib/tasks/checkout.rb
511
515
  - lib/tasks/circulation_status.rb
512
516
  - lib/tasks/enju_circulation_tasks.rake
@@ -714,9 +718,11 @@ files:
714
718
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
715
719
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
716
720
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
721
+ - spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb
717
722
  - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
718
723
  - spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb
719
724
  - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
725
+ - spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb
720
726
  - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
721
727
  - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
722
728
  - spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb
@@ -734,6 +740,18 @@ files:
734
740
  - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
735
741
  - spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
736
742
  - spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb
743
+ - spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb
744
+ - spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb
745
+ - spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
746
+ - spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb
747
+ - spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb
748
+ - spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb
749
+ - spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb
750
+ - spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
751
+ - spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
752
+ - spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb
753
+ - spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb
754
+ - spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
737
755
  - spec/dummy/db/schema.rb
738
756
  - spec/dummy/public/404.html
739
757
  - spec/dummy/public/422.html
@@ -916,6 +934,8 @@ test_files:
916
934
  - spec/dummy/public/500.html
917
935
  - spec/dummy/public/404.html
918
936
  - spec/dummy/db/schema.rb
937
+ - spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb
938
+ - spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb
919
939
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
920
940
  - spec/dummy/db/migrate/20090720091429_create_content_types.rb
921
941
  - spec/dummy/db/migrate/20140709113413_create_user_export_files.rb
@@ -936,12 +956,16 @@ test_files:
936
956
  - spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb
937
957
  - spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb
938
958
  - spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb
959
+ - spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb
939
960
  - spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb
940
961
  - spec/dummy/db/migrate/015_create_creates.rb
941
962
  - spec/dummy/db/migrate/20081025083905_create_languages.rb
942
963
  - spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb
964
+ - spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb
943
965
  - spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb
944
966
  - spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb
967
+ - spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb
968
+ - spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb
945
969
  - spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb
946
970
  - spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb
947
971
  - spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb
@@ -953,6 +977,7 @@ test_files:
953
977
  - spec/dummy/db/migrate/130_create_request_status_types.rb
954
978
  - spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb
955
979
  - spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb
980
+ - spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb
956
981
  - spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb
957
982
  - spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb
958
983
  - spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb
@@ -994,6 +1019,7 @@ test_files:
994
1019
  - spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb
995
1020
  - spec/dummy/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb
996
1021
  - spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb
1022
+ - spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb
997
1023
  - spec/dummy/db/migrate/20081006090811_create_subscriptions.rb
998
1024
  - spec/dummy/db/migrate/077_create_user_groups.rb
999
1025
  - spec/dummy/db/migrate/134_create_agent_merge_lists.rb
@@ -1003,7 +1029,10 @@ test_files:
1003
1029
  - spec/dummy/db/migrate/20100129142347_create_import_requests.rb
1004
1030
  - spec/dummy/db/migrate/125_create_donates.rb
1005
1031
  - spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb
1032
+ - spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb
1006
1033
  - spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb
1034
+ - spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb
1035
+ - spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb
1007
1036
  - spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb
1008
1037
  - spec/dummy/db/migrate/154_create_messages.rb
1009
1038
  - spec/dummy/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb
@@ -1017,6 +1046,7 @@ test_files:
1017
1046
  - spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb
1018
1047
  - spec/dummy/db/migrate/20081028093607_create_event_import_files.rb
1019
1048
  - spec/dummy/db/migrate/041_create_roles.rb
1049
+ - spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb
1020
1050
  - spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb
1021
1051
  - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
1022
1052
  - spec/dummy/db/migrate/20140812152348_create_event_export_files.rb
@@ -1028,6 +1058,7 @@ test_files:
1028
1058
  - spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb
1029
1059
  - spec/dummy/db/migrate/20111124110059_create_create_types.rb
1030
1060
  - spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb
1061
+ - spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb
1031
1062
  - spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb
1032
1063
  - spec/dummy/db/migrate/20100925074639_create_event_import_results.rb
1033
1064
  - spec/dummy/db/migrate/20081027150907_create_picture_files.rb
@@ -1038,6 +1069,7 @@ test_files:
1038
1069
  - spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb
1039
1070
  - spec/dummy/db/migrate/005_create_manifestations.rb
1040
1071
  - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
1072
+ - spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb
1041
1073
  - spec/dummy/db/migrate/20080830172106_create_exemplifies.rb
1042
1074
  - spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb
1043
1075
  - spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb
@@ -1,8 +0,0 @@
1
- class EnjuCirculation::UpdateGenerator < Rails::Generators::Base
2
- source_root File.expand_path('../templates', __FILE__)
3
- desc "Create files for updating Next-L Enju"
4
-
5
- def copy_statesman_migration_files
6
- generate('statesman:add_constraints_to_most_recent', 'Reserve', 'ReserveTransition')
7
- end
8
- end