enju_subject 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/Rakefile +1 -1
  4. data/app/controllers/subjects_controller.rb +1 -1
  5. data/app/views/manifestations/_subject_facet.html.erb +1 -1
  6. data/lib/enju_subject/version.rb +1 -1
  7. data/lib/generators/enju_subject/setup/setup_generator.rb +0 -1
  8. data/spec/dummy/app/models/application_record.rb +3 -0
  9. data/spec/dummy/config/application.rb +1 -1
  10. data/spec/dummy/db/migrate/059_create_libraries.rb +3 -5
  11. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  12. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -2
  13. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -2
  14. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +2 -5
  15. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -2
  16. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  17. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
  18. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
  19. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  20. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
  21. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
  22. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +1 -2
  23. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  24. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +1 -1
  25. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  26. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  27. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
  28. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +5 -0
  29. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +14 -0
  30. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
  31. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +6 -0
  32. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +5 -0
  33. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +11 -6
  34. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
  35. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +9 -0
  36. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +9 -0
  37. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +9 -0
  38. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +9 -0
  39. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +6 -0
  40. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +11 -0
  41. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +5 -0
  42. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
  43. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
  44. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
  45. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
  46. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
  47. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +13 -0
  48. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +13 -0
  49. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +13 -0
  50. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +13 -0
  51. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +13 -0
  52. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +13 -0
  53. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
  54. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
  55. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
  56. data/spec/dummy/db/schema.rb +68 -11
  57. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  58. data/spec/dummy/public/apple-touch-icon.png +0 -0
  59. data/spec/fixtures/library_groups.yml +37 -19
  60. data/spec/lib/generators/enju_subject/setup/setup_generator_spec.rb +1 -0
  61. metadata +107 -9
  62. data/README.rdoc +0 -10
@@ -1,9 +1,22 @@
1
+ # This migration comes from enju_library_engine (originally 20151213072705)
1
2
  class AddFooterBannerToLibraryGroup < ActiveRecord::Migration[4.2]
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,9 @@
1
+ class AddMostRecentToImportRequestTransitions < ActiveRecord::Migration[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
2
+ def change
3
+ add_attachment :library_groups, :header_logo
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class SetNotNullToManifestationIdOnItems < ActiveRecord::Migration[4.2]
2
+ def change
3
+ change_column_null :items, :manifestation_id, false
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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[4.2]
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,5 @@
1
+ class AddMemoToManifestation < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :manifestations, :memo, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddMemoToItem < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :items, :memo, :text
4
+ end
5
+ end
@@ -0,0 +1,12 @@
1
+ class CreateCustomProperties < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :custom_properties do |t|
4
+ t.integer :resource_id, null: false
5
+ t.string :resource_type, null: false
6
+ t.text :label, null: false
7
+ t.text :value
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2016_08_14_165332) do
13
+ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
14
14
 
15
15
  create_table "accepts", force: :cascade do |t|
16
16
  t.integer "basket_id"
@@ -20,6 +20,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
20
20
  t.datetime "updated_at"
21
21
  t.index ["basket_id"], name: "index_accepts_on_basket_id"
22
22
  t.index ["item_id"], name: "index_accepts_on_item_id"
23
+ t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
23
24
  end
24
25
 
25
26
  create_table "agent_import_file_transitions", force: :cascade do |t|
@@ -29,6 +30,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
29
30
  t.integer "agent_import_file_id"
30
31
  t.datetime "created_at"
31
32
  t.datetime "updated_at"
33
+ t.boolean "most_recent", null: false
34
+ t.index ["agent_import_file_id", "most_recent"], name: "index_agent_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
32
35
  t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
33
36
  t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
34
37
  end
@@ -152,10 +155,12 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
152
155
  t.string "birth_date"
153
156
  t.string "death_date"
154
157
  t.string "agent_identifier"
158
+ t.integer "profile_id"
155
159
  t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
156
160
  t.index ["country_id"], name: "index_agents_on_country_id"
157
161
  t.index ["full_name"], name: "index_agents_on_full_name"
158
162
  t.index ["language_id"], name: "index_agents_on_language_id"
163
+ t.index ["profile_id"], name: "index_agents_on_profile_id"
159
164
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
160
165
  end
161
166
 
@@ -198,6 +203,10 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
198
203
  t.integer "position"
199
204
  t.datetime "created_at"
200
205
  t.datetime "updated_at"
206
+ t.string "attachment_file_name"
207
+ t.string "attachment_content_type"
208
+ t.integer "attachment_file_size"
209
+ t.datetime "attachment_updated_at"
201
210
  end
202
211
 
203
212
  create_table "classification_types", force: :cascade do |t|
@@ -280,6 +289,15 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
280
289
  t.index ["work_id"], name: "index_creates_on_work_id"
281
290
  end
282
291
 
292
+ create_table "custom_properties", force: :cascade do |t|
293
+ t.integer "resource_id", null: false
294
+ t.string "resource_type", null: false
295
+ t.text "label", null: false
296
+ t.text "value"
297
+ t.datetime "created_at", null: false
298
+ t.datetime "updated_at", null: false
299
+ end
300
+
283
301
  create_table "donates", force: :cascade do |t|
284
302
  t.integer "agent_id", null: false
285
303
  t.integer "item_id", null: false
@@ -347,6 +365,19 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
347
365
  t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
348
366
  end
349
367
 
368
+ create_table "identities", force: :cascade do |t|
369
+ t.string "name"
370
+ t.string "email"
371
+ t.string "password_digest"
372
+ t.integer "profile_id"
373
+ t.datetime "created_at", null: false
374
+ t.datetime "updated_at", null: false
375
+ t.string "provider"
376
+ t.index ["email"], name: "index_identities_on_email"
377
+ t.index ["name"], name: "index_identities_on_name"
378
+ t.index ["profile_id"], name: "index_identities_on_profile_id"
379
+ end
380
+
350
381
  create_table "import_request_transitions", force: :cascade do |t|
351
382
  t.string "to_state"
352
383
  t.text "metadata", default: "{}"
@@ -354,6 +385,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
354
385
  t.integer "import_request_id"
355
386
  t.datetime "created_at"
356
387
  t.datetime "updated_at"
388
+ t.boolean "most_recent", null: false
389
+ t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
357
390
  t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
358
391
  t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
359
392
  end
@@ -389,7 +422,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
389
422
  t.string "binding_item_identifier"
390
423
  t.string "binding_call_number"
391
424
  t.datetime "binded_at"
392
- t.integer "manifestation_id"
425
+ t.integer "manifestation_id", null: false
426
+ t.text "memo"
393
427
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
394
428
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
395
429
  t.index ["item_identifier"], name: "index_items_on_item_identifier"
@@ -427,7 +461,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
427
461
  t.text "note"
428
462
  t.integer "call_number_rows", default: 1, null: false
429
463
  t.string "call_number_delimiter", default: "|", null: false
430
- t.integer "library_group_id", default: 1, null: false
464
+ t.integer "library_group_id", null: false
431
465
  t.integer "users_count", default: 0, null: false
432
466
  t.integer "position"
433
467
  t.integer "country_id"
@@ -439,7 +473,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
439
473
  t.float "latitude"
440
474
  t.float "longitude"
441
475
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
442
- t.index ["name"], name: "index_libraries_on_name", unique: true
476
+ t.index ["name"], name: "index_libraries_on_name"
443
477
  end
444
478
 
445
479
  create_table "library_group_translations", force: :cascade do |t|
@@ -458,7 +492,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
458
492
  t.text "display_name"
459
493
  t.string "short_name", null: false
460
494
  t.text "my_networks"
461
- t.text "login_banner"
495
+ t.text "old_login_banner"
462
496
  t.text "note"
463
497
  t.integer "country_id"
464
498
  t.integer "position"
@@ -472,6 +506,12 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
472
506
  t.boolean "family_name_first", default: true
473
507
  t.integer "pub_year_facet_range_interval", default: 10
474
508
  t.integer "user_id"
509
+ t.boolean "csv_charset_conversion", default: false, null: false
510
+ t.string "header_logo_file_name"
511
+ t.string "header_logo_content_type"
512
+ t.integer "header_logo_file_size"
513
+ t.datetime "header_logo_updated_at"
514
+ t.text "header_logo_meta"
475
515
  t.index ["short_name"], name: "index_library_groups_on_short_name"
476
516
  t.index ["user_id"], name: "index_library_groups_on_user_id"
477
517
  end
@@ -548,7 +588,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
548
588
  t.datetime "valid_until"
549
589
  t.datetime "date_submitted"
550
590
  t.datetime "date_accepted"
551
- t.datetime "date_caputured"
591
+ t.datetime "date_captured"
552
592
  t.string "pub_date"
553
593
  t.string "edition_string"
554
594
  t.integer "volume_number"
@@ -565,6 +605,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
565
605
  t.text "publication_place"
566
606
  t.text "extent"
567
607
  t.text "dimensions"
608
+ t.text "memo"
568
609
  t.index ["access_address"], name: "index_manifestations_on_access_address"
569
610
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
570
611
  t.index ["doi"], name: "index_manifestations_on_doi"
@@ -671,6 +712,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
671
712
  t.datetime "picture_updated_at"
672
713
  t.text "picture_meta"
673
714
  t.string "picture_fingerprint"
715
+ t.integer "picture_width"
716
+ t.integer "picture_height"
674
717
  t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
675
718
  end
676
719
 
@@ -709,6 +752,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
709
752
  t.datetime "expired_at"
710
753
  t.text "full_name_transcription"
711
754
  t.datetime "date_of_birth"
755
+ t.index ["library_id"], name: "index_profiles_on_library_id"
756
+ t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
712
757
  t.index ["user_id"], name: "index_profiles_on_user_id"
713
758
  t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
714
759
  end
@@ -758,6 +803,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
758
803
  t.integer "resource_export_file_id"
759
804
  t.datetime "created_at"
760
805
  t.datetime "updated_at"
806
+ t.boolean "most_recent", null: false
807
+ t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
761
808
  t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
762
809
  t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
763
810
  end
@@ -780,6 +827,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
780
827
  t.integer "resource_import_file_id"
781
828
  t.datetime "created_at"
782
829
  t.datetime "updated_at"
830
+ t.boolean "most_recent", null: false
831
+ t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
783
832
  t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
784
833
  t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
785
834
  end
@@ -886,7 +935,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
886
935
  t.string "name", null: false
887
936
  t.text "display_name"
888
937
  t.text "note"
889
- t.integer "library_id", default: 1, null: false
938
+ t.integer "library_id", null: false
890
939
  t.integer "items_count", default: 0, null: false
891
940
  t.integer "position"
892
941
  t.datetime "created_at"
@@ -969,9 +1018,11 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
969
1018
  t.integer "user_export_file_id"
970
1019
  t.datetime "created_at"
971
1020
  t.datetime "updated_at"
972
- t.boolean "most_recent"
1021
+ t.boolean "most_recent", null: false
973
1022
  t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1023
+ t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
974
1024
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
1025
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
975
1026
  end
976
1027
 
977
1028
  create_table "user_export_files", force: :cascade do |t|
@@ -983,6 +1034,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
983
1034
  t.datetime "executed_at"
984
1035
  t.datetime "created_at"
985
1036
  t.datetime "updated_at"
1037
+ t.index ["user_id"], name: "index_user_export_files_on_user_id"
986
1038
  end
987
1039
 
988
1040
  create_table "user_groups", force: :cascade do |t|
@@ -998,8 +1050,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
998
1050
  end
999
1051
 
1000
1052
  create_table "user_has_roles", force: :cascade do |t|
1001
- t.integer "user_id"
1002
- t.integer "role_id"
1053
+ t.integer "user_id", null: false
1054
+ t.integer "role_id", null: false
1003
1055
  t.datetime "created_at"
1004
1056
  t.datetime "updated_at"
1005
1057
  t.index ["role_id"], name: "index_user_has_roles_on_role_id"
@@ -1013,8 +1065,9 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
1013
1065
  t.integer "user_import_file_id"
1014
1066
  t.datetime "created_at"
1015
1067
  t.datetime "updated_at"
1016
- t.boolean "most_recent"
1068
+ t.boolean "most_recent", null: false
1017
1069
  t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1070
+ t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1018
1071
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1019
1072
  end
1020
1073
 
@@ -1034,6 +1087,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
1034
1087
  t.string "user_encoding"
1035
1088
  t.integer "default_library_id"
1036
1089
  t.integer "default_user_group_id"
1090
+ t.index ["user_id"], name: "index_user_import_files_on_user_id"
1037
1091
  end
1038
1092
 
1039
1093
  create_table "user_import_results", force: :cascade do |t|
@@ -1043,6 +1097,8 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
1043
1097
  t.datetime "created_at"
1044
1098
  t.datetime "updated_at"
1045
1099
  t.text "error_message"
1100
+ t.index ["user_id"], name: "index_user_import_results_on_user_id"
1101
+ t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1046
1102
  end
1047
1103
 
1048
1104
  create_table "users", force: :cascade do |t|
@@ -1089,6 +1145,7 @@ ActiveRecord::Schema.define(version: 2016_08_14_165332) do
1089
1145
  t.datetime "updated_at", null: false
1090
1146
  t.index ["basket_id"], name: "index_withdraws_on_basket_id"
1091
1147
  t.index ["item_id"], name: "index_withdraws_on_item_id"
1148
+ t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1092
1149
  end
1093
1150
 
1094
1151
  end