enju_inter_library_loan 0.2.0.beta.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/inter_library_loan_transition.rb +1 -1
  3. data/db/migrate/20180107164929_add_constraints_to_most_recent_for_inter_library_loan_transitions.rb +13 -0
  4. data/lib/enju_inter_library_loan/version.rb +1 -1
  5. data/spec/controllers/inter_library_loans_controller_spec.rb +20 -20
  6. data/spec/dummy/db/development.sqlite3 +0 -0
  7. data/spec/dummy/db/migrate/032_create_checkins.rb +3 -6
  8. data/spec/dummy/db/migrate/033_create_checkouts.rb +8 -13
  9. data/spec/dummy/db/migrate/035_create_reserves.rb +6 -11
  10. data/spec/dummy/db/migrate/059_create_libraries.rb +7 -9
  11. data/spec/dummy/db/migrate/069_create_shelves.rb +3 -4
  12. data/spec/dummy/db/migrate/080_create_library_groups.rb +2 -3
  13. data/spec/dummy/db/migrate/120_create_baskets.rb +2 -3
  14. data/spec/dummy/db/migrate/121_create_checked_items.rb +4 -5
  15. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +1 -1
  16. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +2 -4
  17. data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +1 -1
  18. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +4 -7
  19. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +4 -5
  20. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +8 -10
  21. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +3 -4
  22. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +4 -4
  23. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +3 -5
  24. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +3 -3
  25. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +2 -4
  26. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +5 -5
  27. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  28. data/spec/dummy/db/migrate/20111129044509_add_pickup_location_to_reserve.rb +6 -0
  29. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
  30. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +1 -1
  31. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +2 -2
  32. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  33. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
  34. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
  35. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  36. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
  37. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  38. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  39. data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +4 -8
  40. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
  41. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +1 -2
  42. data/spec/dummy/db/migrate/20141020120523_add_library_id_to_checkout.rb +5 -0
  43. data/spec/dummy/db/migrate/20150106001709_create_demands.rb +11 -0
  44. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +5 -0
  45. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
  46. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +6 -0
  47. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +19 -6
  48. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
  49. data/spec/dummy/db/migrate/20160703184619_add_most_recent_to_reserve_transitions.rb +9 -0
  50. data/spec/dummy/db/migrate/20160703184650_add_most_recent_to_manifestation_checkout_stat_transitions.rb +9 -0
  51. data/spec/dummy/db/migrate/20160703184723_add_most_recent_to_manifestation_reserve_stat_transitions.rb +9 -0
  52. data/spec/dummy/db/migrate/20160703184747_add_most_recent_to_user_checkout_stat_transitions.rb +9 -0
  53. data/spec/dummy/db/migrate/20160703184805_add_most_recent_to_user_reserve_stat_transitions.rb +9 -0
  54. data/spec/dummy/db/migrate/20160703190209_add_foreign_key_on_manifestation_id_to_reserve.rb +5 -0
  55. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +9 -0
  56. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +9 -0
  57. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +9 -0
  58. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +9 -0
  59. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +6 -0
  60. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +11 -0
  61. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +5 -0
  62. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
  63. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
  64. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
  65. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
  66. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
  67. data/spec/dummy/db/migrate/20180107161035_add_constraints_to_most_recent_for_reserve_transitions.rb +13 -0
  68. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +13 -0
  69. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +13 -0
  70. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +13 -0
  71. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +13 -0
  72. data/spec/dummy/db/migrate/20180107161951_add_constraints_to_most_recent_for_user_checkout_stat_transitions.rb +13 -0
  73. data/spec/dummy/db/migrate/20180107162009_add_constraints_to_most_recent_for_user_reserve_stat_transitions.rb +13 -0
  74. data/spec/dummy/db/migrate/20180107162029_add_constraints_to_most_recent_for_manifestation_checkout_stat_transitions.rb +13 -0
  75. data/spec/dummy/db/migrate/20180107162048_add_constraints_to_most_recent_for_manifestation_reserve_stat_transitions.rb +13 -0
  76. data/spec/dummy/db/schema.rb +59 -8
  77. data/spec/dummy/db/test.sqlite3 +0 -0
  78. data/spec/factories/inter_library_loan.rb +3 -3
  79. data/spec/factories/item.rb +2 -2
  80. data/spec/factories/library.rb +2 -2
  81. data/spec/factories/manifestation.rb +1 -1
  82. data/spec/factories/user.rb +1 -1
  83. data/spec/fixtures/inter_library_loan_transitions.yml +8 -1
  84. data/spec/rails_helper.rb +3 -3
  85. data/spec/support/controller_macros.rb +3 -3
  86. data/spec/support/devise.rb +2 -2
  87. metadata +299 -288
@@ -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,5 @@
1
+ class AddForeignKeyOnManifestationIdToReserve < ActiveRecord::Migration
2
+ def change
3
+ add_foreign_key :reserves, :manifestations
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :import_request_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :import_request_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToResourceImportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :resource_import_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :resource_import_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToResourceExportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :resource_export_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :resource_export_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,9 @@
1
+ class AddMostRecentToAgentImportFileTransitions < ActiveRecord::Migration
2
+ def up
3
+ add_column :agent_import_file_transitions, :most_recent, :boolean, null: true
4
+ end
5
+
6
+ def down
7
+ remove_column :agent_import_file_transitions, :most_recent
8
+ end
9
+ end
@@ -0,0 +1,6 @@
1
+ class AddPictureWidthToPictureFile < ActiveRecord::Migration
2
+ def change
3
+ add_column :picture_files, :picture_width, :integer
4
+ add_column :picture_files, :picture_height, :integer
5
+ end
6
+ end
@@ -0,0 +1,11 @@
1
+ class AddAttachmentAttachmentToCarrierTypes < ActiveRecord::Migration
2
+ def self.up
3
+ change_table :carrier_types do |t|
4
+ t.attachment :attachment
5
+ end
6
+ end
7
+
8
+ def self.down
9
+ remove_attachment :carrier_types, :attachment
10
+ end
11
+ 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 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 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
@@ -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
@@ -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: 20160814165332) do
14
+ ActiveRecord::Schema.define(version: 20180107164929) do
15
15
 
16
16
  create_table "accepts", force: :cascade do |t|
17
17
  t.integer "basket_id"
@@ -31,8 +31,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
31
31
  t.integer "agent_import_file_id"
32
32
  t.datetime "created_at"
33
33
  t.datetime "updated_at"
34
+ t.boolean "most_recent", null: false
34
35
  end
35
36
 
37
+ add_index "agent_import_file_transitions", ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true
36
38
  add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
37
39
  add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
38
40
 
@@ -158,12 +160,14 @@ ActiveRecord::Schema.define(version: 20160814165332) do
158
160
  t.string "birth_date"
159
161
  t.string "death_date"
160
162
  t.string "agent_identifier"
163
+ t.integer "profile_id"
161
164
  end
162
165
 
163
166
  add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
164
167
  add_index "agents", ["country_id"], name: "index_agents_on_country_id"
165
168
  add_index "agents", ["full_name"], name: "index_agents_on_full_name"
166
169
  add_index "agents", ["language_id"], name: "index_agents_on_language_id"
170
+ add_index "agents", ["profile_id"], name: "index_agents_on_profile_id"
167
171
  add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
168
172
 
169
173
  create_table "baskets", force: :cascade do |t|
@@ -212,25 +216,32 @@ ActiveRecord::Schema.define(version: 20160814165332) do
212
216
  add_index "carrier_type_has_checkout_types", ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
213
217
 
214
218
  create_table "carrier_types", force: :cascade do |t|
215
- t.string "name", null: false
219
+ t.string "name", null: false
216
220
  t.text "display_name"
217
221
  t.text "note"
218
222
  t.integer "position"
219
223
  t.datetime "created_at"
220
224
  t.datetime "updated_at"
225
+ t.string "attachment_file_name"
226
+ t.string "attachment_content_type"
227
+ t.integer "attachment_file_size"
228
+ t.datetime "attachment_updated_at"
221
229
  end
222
230
 
223
231
  create_table "checked_items", force: :cascade do |t|
224
232
  t.integer "item_id", null: false
225
233
  t.integer "basket_id", null: false
234
+ t.integer "librarian_id"
226
235
  t.datetime "due_date", null: false
227
236
  t.datetime "created_at"
228
237
  t.datetime "updated_at"
229
- t.integer "librarian_id"
238
+ t.integer "user_id"
230
239
  end
231
240
 
232
241
  add_index "checked_items", ["basket_id"], name: "index_checked_items_on_basket_id"
233
242
  add_index "checked_items", ["item_id"], name: "index_checked_items_on_item_id"
243
+ add_index "checked_items", ["librarian_id"], name: "index_checked_items_on_librarian_id"
244
+ add_index "checked_items", ["user_id"], name: "index_checked_items_on_user_id"
234
245
 
235
246
  create_table "checkins", force: :cascade do |t|
236
247
  t.integer "item_id", null: false
@@ -290,6 +301,7 @@ ActiveRecord::Schema.define(version: 20160814165332) do
290
301
  t.datetime "created_at"
291
302
  t.datetime "updated_at"
292
303
  t.integer "shelf_id"
304
+ t.integer "library_id"
293
305
  end
294
306
 
295
307
  add_index "checkouts", ["basket_id"], name: "index_checkouts_on_basket_id"
@@ -297,6 +309,7 @@ ActiveRecord::Schema.define(version: 20160814165332) do
297
309
  add_index "checkouts", ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
298
310
  add_index "checkouts", ["item_id"], name: "index_checkouts_on_item_id"
299
311
  add_index "checkouts", ["librarian_id"], name: "index_checkouts_on_librarian_id"
312
+ add_index "checkouts", ["library_id"], name: "index_checkouts_on_library_id"
300
313
  add_index "checkouts", ["shelf_id"], name: "index_checkouts_on_shelf_id"
301
314
  add_index "checkouts", ["user_id"], name: "index_checkouts_on_user_id"
302
315
 
@@ -365,6 +378,18 @@ ActiveRecord::Schema.define(version: 20160814165332) do
365
378
  add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
366
379
  add_index "creates", ["work_id"], name: "index_creates_on_work_id"
367
380
 
381
+ create_table "demands", force: :cascade do |t|
382
+ t.integer "user_id"
383
+ t.integer "item_id"
384
+ t.integer "message_id"
385
+ t.datetime "created_at", null: false
386
+ t.datetime "updated_at", null: false
387
+ end
388
+
389
+ add_index "demands", ["item_id"], name: "index_demands_on_item_id"
390
+ add_index "demands", ["message_id"], name: "index_demands_on_message_id"
391
+ add_index "demands", ["user_id"], name: "index_demands_on_user_id"
392
+
368
393
  create_table "donates", force: :cascade do |t|
369
394
  t.integer "agent_id", null: false
370
395
  t.integer "item_id", null: false
@@ -442,8 +467,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
442
467
  t.integer "import_request_id"
443
468
  t.datetime "created_at"
444
469
  t.datetime "updated_at"
470
+ t.boolean "most_recent", null: false
445
471
  end
446
472
 
473
+ add_index "import_request_transitions", ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true
447
474
  add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
448
475
  add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
449
476
 
@@ -466,9 +493,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
466
493
  t.integer "inter_library_loan_id"
467
494
  t.datetime "created_at"
468
495
  t.datetime "updated_at"
469
- t.boolean "most_recent"
496
+ t.boolean "most_recent", null: false
470
497
  end
471
498
 
499
+ add_index "inter_library_loan_transitions", ["inter_library_loan_id", "most_recent"], name: "index_inter_library_loan_transitions_parent_most_recent", unique: true
472
500
  add_index "inter_library_loan_transitions", ["inter_library_loan_id"], name: "index_inter_library_loan_transitions_on_inter_library_loan_id"
473
501
  add_index "inter_library_loan_transitions", ["sort_key", "inter_library_loan_id"], name: "index_inter_library_loan_transitions_on_sort_key_and_loan_id", unique: true
474
502
 
@@ -520,7 +548,7 @@ ActiveRecord::Schema.define(version: 20160814165332) do
520
548
  t.string "binding_item_identifier"
521
549
  t.string "binding_call_number"
522
550
  t.datetime "binded_at"
523
- t.integer "manifestation_id"
551
+ t.integer "manifestation_id", null: false
524
552
  end
525
553
 
526
554
  add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
@@ -610,7 +638,7 @@ ActiveRecord::Schema.define(version: 20160814165332) do
610
638
  t.text "display_name"
611
639
  t.string "short_name", null: false
612
640
  t.text "my_networks"
613
- t.text "login_banner"
641
+ t.text "old_login_banner"
614
642
  t.text "note"
615
643
  t.integer "country_id"
616
644
  t.integer "position"
@@ -624,6 +652,12 @@ ActiveRecord::Schema.define(version: 20160814165332) do
624
652
  t.boolean "family_name_first", default: true
625
653
  t.integer "pub_year_facet_range_interval", default: 10
626
654
  t.integer "user_id"
655
+ t.boolean "csv_charset_conversion", default: false, null: false
656
+ t.string "header_logo_file_name"
657
+ t.string "header_logo_content_type"
658
+ t.integer "header_logo_file_size"
659
+ t.datetime "header_logo_updated_at"
660
+ t.text "header_logo_meta"
627
661
  end
628
662
 
629
663
  add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
@@ -645,8 +679,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
645
679
  t.integer "manifestation_checkout_stat_id"
646
680
  t.datetime "created_at"
647
681
  t.datetime "updated_at"
682
+ t.boolean "most_recent", null: false
648
683
  end
649
684
 
685
+ add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id", "most_recent"], name: "index_manifestation_checkout_stat_transitions_parent_most_rece", unique: true
650
686
  add_index "manifestation_checkout_stat_transitions", ["manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_stat_id"
651
687
  add_index "manifestation_checkout_stat_transitions", ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
652
688
 
@@ -691,8 +727,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
691
727
  t.integer "manifestation_reserve_stat_id"
692
728
  t.datetime "created_at"
693
729
  t.datetime "updated_at"
730
+ t.boolean "most_recent", null: false
694
731
  end
695
732
 
733
+ add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id", "most_recent"], name: "index_manifestation_reserve_stat_transitions_parent_most_recen", unique: true
696
734
  add_index "manifestation_reserve_stat_transitions", ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
697
735
  add_index "manifestation_reserve_stat_transitions", ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
698
736
 
@@ -881,6 +919,8 @@ ActiveRecord::Schema.define(version: 20160814165332) do
881
919
  t.datetime "picture_updated_at"
882
920
  t.text "picture_meta"
883
921
  t.string "picture_fingerprint"
922
+ t.integer "picture_width"
923
+ t.integer "picture_height"
884
924
  end
885
925
 
886
926
  add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
@@ -992,13 +1032,15 @@ ActiveRecord::Schema.define(version: 20160814165332) do
992
1032
 
993
1033
  create_table "reserve_transitions", force: :cascade do |t|
994
1034
  t.string "to_state"
995
- t.text "metadata", default: "{}"
1035
+ t.text "metadata", default: "{}"
996
1036
  t.integer "sort_key"
997
1037
  t.integer "reserve_id"
998
1038
  t.datetime "created_at"
999
1039
  t.datetime "updated_at"
1040
+ t.boolean "most_recent", null: false
1000
1041
  end
1001
1042
 
1043
+ add_index "reserve_transitions", ["reserve_id", "most_recent"], name: "index_reserve_transitions_parent_most_recent", unique: true
1002
1044
  add_index "reserve_transitions", ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
1003
1045
  add_index "reserve_transitions", ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
1004
1046
 
@@ -1015,6 +1057,7 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1015
1057
  t.datetime "deleted_at"
1016
1058
  t.boolean "expiration_notice_to_patron", default: false
1017
1059
  t.boolean "expiration_notice_to_library", default: false
1060
+ t.integer "pickup_location_id"
1018
1061
  t.datetime "retained_at"
1019
1062
  t.datetime "postponed_at"
1020
1063
  t.integer "lock_version", default: 0, null: false
@@ -1022,7 +1065,7 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1022
1065
 
1023
1066
  add_index "reserves", ["item_id"], name: "index_reserves_on_item_id"
1024
1067
  add_index "reserves", ["manifestation_id"], name: "index_reserves_on_manifestation_id"
1025
- add_index "reserves", ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
1068
+ add_index "reserves", ["pickup_location_id"], name: "index_reserves_on_pickup_location_id"
1026
1069
  add_index "reserves", ["user_id"], name: "index_reserves_on_user_id"
1027
1070
 
1028
1071
  create_table "resource_export_file_transitions", force: :cascade do |t|
@@ -1032,8 +1075,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1032
1075
  t.integer "resource_export_file_id"
1033
1076
  t.datetime "created_at"
1034
1077
  t.datetime "updated_at"
1078
+ t.boolean "most_recent", null: false
1035
1079
  end
1036
1080
 
1081
+ add_index "resource_export_file_transitions", ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true
1037
1082
  add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
1038
1083
  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
1039
1084
 
@@ -1055,8 +1100,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1055
1100
  t.integer "resource_import_file_id"
1056
1101
  t.datetime "created_at"
1057
1102
  t.datetime "updated_at"
1103
+ t.boolean "most_recent", null: false
1058
1104
  end
1059
1105
 
1106
+ add_index "resource_import_file_transitions", ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true
1060
1107
  add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
1061
1108
  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
1062
1109
 
@@ -1219,9 +1266,11 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1219
1266
  t.integer "user_checkout_stat_id"
1220
1267
  t.datetime "created_at"
1221
1268
  t.datetime "updated_at"
1269
+ t.boolean "most_recent", null: false
1222
1270
  end
1223
1271
 
1224
1272
  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
1273
+ add_index "user_checkout_stat_transitions", ["user_checkout_stat_id", "most_recent"], name: "index_user_checkout_stat_transitions_parent_most_recent", unique: true
1225
1274
  add_index "user_checkout_stat_transitions", ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
1226
1275
 
1227
1276
  create_table "user_checkout_stats", force: :cascade do |t|
@@ -1353,9 +1402,11 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1353
1402
  t.integer "user_reserve_stat_id"
1354
1403
  t.datetime "created_at"
1355
1404
  t.datetime "updated_at"
1405
+ t.boolean "most_recent", null: false
1356
1406
  end
1357
1407
 
1358
1408
  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
1409
+ add_index "user_reserve_stat_transitions", ["user_reserve_stat_id", "most_recent"], name: "index_user_reserve_stat_transitions_parent_most_recent", unique: true
1359
1410
  add_index "user_reserve_stat_transitions", ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
1360
1411
 
1361
1412
  create_table "user_reserve_stats", force: :cascade do |t|