enju_question 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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -0
  3. data/Rakefile +1 -1
  4. data/lib/enju_question/version.rb +1 -1
  5. data/spec/dummy/app/models/application_record.rb +3 -0
  6. data/spec/dummy/config/application.rb +1 -1
  7. data/spec/dummy/db/migrate/001_create_agents.rb +0 -2
  8. data/spec/dummy/db/migrate/005_create_manifestations.rb +3 -4
  9. data/spec/dummy/db/migrate/059_create_libraries.rb +3 -5
  10. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  11. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -2
  12. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -2
  13. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +2 -5
  14. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -2
  15. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +6 -5
  16. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +1 -0
  17. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +1 -3
  18. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +2 -2
  19. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +0 -1
  20. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +1 -0
  21. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +1 -0
  22. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +1 -0
  23. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +3 -6
  24. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +1 -1
  25. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  26. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +2 -2
  27. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +6 -2
  28. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +6 -2
  29. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +6 -2
  30. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +2 -3
  31. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +6 -2
  32. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  33. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -2
  34. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  35. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  36. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
  37. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -3
  38. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  39. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  40. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
  41. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
  42. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +5 -0
  43. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +3 -5
  44. data/spec/dummy/db/migrate/20151125004028_add_profile_id_to_agent.rb +6 -0
  45. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +11 -5
  46. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +15 -2
  47. data/spec/dummy/db/migrate/20160801080612_add_most_recent_to_import_request_transitions.rb +9 -0
  48. data/spec/dummy/db/migrate/20160801080619_add_most_recent_to_resource_import_file_transitions.rb +9 -0
  49. data/spec/dummy/db/migrate/20160801080637_add_most_recent_to_resource_export_file_transitions.rb +9 -0
  50. data/spec/dummy/db/migrate/20160801080643_add_most_recent_to_agent_import_file_transitions.rb +9 -0
  51. data/spec/dummy/db/migrate/20160811102604_add_picture_width_to_picture_file.rb +6 -0
  52. data/spec/dummy/db/migrate/20160820004638_add_attachment_attachment_to_carrier_types.rb +11 -0
  53. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +5 -0
  54. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +5 -0
  55. data/spec/dummy/db/migrate/20171119051258_set_not_null_to_manifestation_id_on_items.rb +5 -0
  56. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +5 -0
  57. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +5 -0
  58. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +5 -0
  59. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +13 -0
  60. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +13 -0
  61. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +13 -0
  62. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +13 -0
  63. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +13 -0
  64. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +13 -0
  65. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
  66. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
  67. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +12 -0
  68. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +12 -0
  69. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +12 -0
  70. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +12 -0
  71. data/spec/dummy/db/schema.rb +89 -16
  72. data/spec/factories/profile.rb +11 -3
  73. data/spec/fixtures/library_groups.yml +37 -20
  74. data/spec/views/questions/index.rss.builder_spec.rb +1 -2
  75. metadata +116 -24
  76. data/README.rdoc +0 -10
@@ -1,7 +1,7 @@
1
1
  class CreateUserExportFiles < ActiveRecord::Migration[4.2]
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,11 +8,11 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration[4.2]
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
 
15
15
  add_index :user_export_file_transitions, :user_export_file_id, name: "index_user_export_file_transitions_on_file_id"
16
- add_index :user_export_file_transitions, %i[sort_key user_export_file_id], unique: true, name: "index_user_export_file_transitions_on_sort_key_and_file_id"
16
+ add_index :user_export_file_transitions, [:sort_key, :user_export_file_id], unique: true, name: "index_user_export_file_transitions_on_sort_key_and_file_id"
17
17
  end
18
18
  end
@@ -1,5 +1,5 @@
1
1
  class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration[4.2]
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[4.2]
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
@@ -0,0 +1,5 @@
1
+ class AddPublicationPlaceToManifestation < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :manifestations, :publication_place, :text
4
+ end
5
+ end
@@ -1,14 +1,12 @@
1
1
  class CreateColors < ActiveRecord::Migration[4.2]
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 AddErrorMessageToResourceImportResult < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :resource_import_results, :error_message, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddExtentToManifestation < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :manifestations, :extent, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDimensionsToManifestation < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_column :manifestations, :dimensions, :text
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ class RenameManifestationPeriodicalToSerial < ActiveRecord::Migration[4.2]
2
+ def up
3
+ rename_column :manifestations, :periodical, :serial
4
+ end
5
+
6
+ def down
7
+ rename_column :manifestations, :serial, :periodical
8
+ end
9
+ end
@@ -0,0 +1,5 @@
1
+ class AddForeignKeyToItemsReferencingManifestations < ActiveRecord::Migration[4.2]
2
+ def change
3
+ add_foreign_key :items, :manifestations
4
+ end
5
+ end
@@ -1,13 +1,11 @@
1
1
  class CreateWithdraws < ActiveRecord::Migration[4.2]
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[4.2]
2
+ def change
3
+ add_column :agents, :profile_id, :integer
4
+ add_index :agents, :profile_id
5
+ end
6
+ end
@@ -1,12 +1,18 @@
1
+ # This migration comes from enju_library_engine (originally 20151213070943)
1
2
  class AddTranslationTableToLibraryGroup < ActiveRecord::Migration[4.2]
2
3
  def up
3
- LibraryGroup.create_translation_table!({
4
- login_banner: :text
5
- },
6
- migrate_data: true)
4
+ if defined?(Globalize)
5
+ LibraryGroup.create_translation_table!({
6
+ login_banner: :text
7
+ }, {
8
+ migrate_data: true
9
+ })
10
+ end
7
11
  end
8
12
 
9
13
  def down
10
- LibraryGroup.drop_translation_table! migrate_data: true
14
+ if defined?(Globalize)
15
+ LibraryGroup.drop_translation_table! migrate_data: true
16
+ end
11
17
  end
12
18
  end
@@ -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 CreateManifestationCustomProperties < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :manifestation_custom_properties do |t|
4
+ t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
5
+ t.text :display_name, null: false, comment: '表示名'
6
+ t.text :note, comment: '備考'
7
+ t.integer :position, default: 1, null: false
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateItemCustomProperties < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :item_custom_properties do |t|
4
+ t.string :name, null: false, comment: 'ラベル名', index: {unique: true}
5
+ t.text :display_name, null: false, comment: '表示名'
6
+ t.text :note, comment: '備考'
7
+ t.integer :position, default: 1, null: false
8
+
9
+ t.timestamps
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateManifestationCustomValues < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :manifestation_custom_values do |t|
4
+ t.references :manifestation_custom_property, null: false, foreign_key: true, index: {name: 'index_manifestation_custom_values_on_custom_property_id'}
5
+ t.references :manifestation, null: false, foreign_key: true
6
+ t.text :value
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :manifestation_custom_values, [:manifestation_custom_property_id, :manifestation_id], unique: true, name: 'index_manifestation_custom_values_on_property_manifestation'
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateItemCustomValues < ActiveRecord::Migration[5.2]
2
+ def change
3
+ create_table :item_custom_values do |t|
4
+ t.references :item_custom_property, null: false, foreign_key: true, index: {name: 'index_item_custom_values_on_custom_property_id'}
5
+ t.references :item, null: false, foreign_key: true
6
+ t.text :value
7
+
8
+ t.timestamps
9
+ end
10
+ add_index :item_custom_values, [:item_custom_property_id, :item_id], unique: true, name: 'index_item_custom_values_on_custom_item_property_and_item_id'
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: 2018_07_09_023040) do
13
+ ActiveRecord::Schema.define(version: 2020_04_25_074822) 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: 2018_07_09_023040) 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: 2018_07_09_023040) 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
@@ -57,7 +60,6 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
57
60
  create_table "agent_import_results", force: :cascade do |t|
58
61
  t.integer "agent_import_file_id"
59
62
  t.integer "agent_id"
60
- t.integer "user_id"
61
63
  t.text "body"
62
64
  t.datetime "created_at"
63
65
  t.datetime "updated_at"
@@ -108,7 +110,6 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
108
110
  end
109
111
 
110
112
  create_table "agents", force: :cascade do |t|
111
- t.integer "user_id"
112
113
  t.string "last_name"
113
114
  t.string "middle_name"
114
115
  t.string "first_name"
@@ -154,12 +155,13 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
154
155
  t.string "birth_date"
155
156
  t.string "death_date"
156
157
  t.string "agent_identifier"
158
+ t.integer "profile_id"
157
159
  t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
158
160
  t.index ["country_id"], name: "index_agents_on_country_id"
159
161
  t.index ["full_name"], name: "index_agents_on_full_name"
160
162
  t.index ["language_id"], name: "index_agents_on_language_id"
163
+ t.index ["profile_id"], name: "index_agents_on_profile_id"
161
164
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
162
- t.index ["user_id"], name: "index_agents_on_user_id", unique: true
163
165
  end
164
166
 
165
167
  create_table "answer_has_items", force: :cascade do |t|
@@ -273,6 +275,10 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
273
275
  t.integer "position"
274
276
  t.datetime "created_at"
275
277
  t.datetime "updated_at"
278
+ t.string "attachment_file_name"
279
+ t.string "attachment_content_type"
280
+ t.integer "attachment_file_size"
281
+ t.datetime "attachment_updated_at"
276
282
  end
277
283
 
278
284
  create_table "colors", force: :cascade do |t|
@@ -402,6 +408,8 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
402
408
  t.integer "import_request_id"
403
409
  t.datetime "created_at"
404
410
  t.datetime "updated_at"
411
+ t.boolean "most_recent", null: false
412
+ t.index ["import_request_id", "most_recent"], name: "index_import_request_transitions_parent_most_recent", unique: true, where: "most_recent"
405
413
  t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
406
414
  t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
407
415
  end
@@ -417,6 +425,27 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
417
425
  t.index ["user_id"], name: "index_import_requests_on_user_id"
418
426
  end
419
427
 
428
+ create_table "item_custom_properties", force: :cascade do |t|
429
+ t.string "name", null: false
430
+ t.text "display_name", null: false
431
+ t.text "note"
432
+ t.integer "position", default: 1, null: false
433
+ t.datetime "created_at", null: false
434
+ t.datetime "updated_at", null: false
435
+ t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
436
+ end
437
+
438
+ create_table "item_custom_values", force: :cascade do |t|
439
+ t.integer "item_custom_property_id", null: false
440
+ t.integer "item_id", null: false
441
+ t.text "value"
442
+ t.datetime "created_at", null: false
443
+ t.datetime "updated_at", null: false
444
+ t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
445
+ t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
446
+ t.index ["item_id"], name: "index_item_custom_values_on_item_id"
447
+ end
448
+
420
449
  create_table "items", force: :cascade do |t|
421
450
  t.string "call_number"
422
451
  t.string "item_identifier"
@@ -437,7 +466,8 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
437
466
  t.string "binding_item_identifier"
438
467
  t.string "binding_call_number"
439
468
  t.datetime "binded_at"
440
- t.integer "manifestation_id"
469
+ t.integer "manifestation_id", null: false
470
+ t.text "memo"
441
471
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
442
472
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
443
473
  t.index ["item_identifier"], name: "index_items_on_item_identifier"
@@ -475,7 +505,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
475
505
  t.text "note"
476
506
  t.integer "call_number_rows", default: 1, null: false
477
507
  t.string "call_number_delimiter", default: "|", null: false
478
- t.integer "library_group_id", default: 1, null: false
508
+ t.integer "library_group_id", null: false
479
509
  t.integer "users_count", default: 0, null: false
480
510
  t.integer "position"
481
511
  t.integer "country_id"
@@ -487,7 +517,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
487
517
  t.float "latitude"
488
518
  t.float "longitude"
489
519
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
490
- t.index ["name"], name: "index_libraries_on_name", unique: true
520
+ t.index ["name"], name: "index_libraries_on_name"
491
521
  end
492
522
 
493
523
  create_table "library_group_translations", force: :cascade do |t|
@@ -506,7 +536,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
506
536
  t.text "display_name"
507
537
  t.string "short_name", null: false
508
538
  t.text "my_networks"
509
- t.text "login_banner"
539
+ t.text "old_login_banner"
510
540
  t.text "note"
511
541
  t.integer "country_id"
512
542
  t.integer "position"
@@ -521,6 +551,12 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
521
551
  t.boolean "family_name_first", default: true
522
552
  t.integer "pub_year_facet_range_interval", default: 10
523
553
  t.integer "user_id"
554
+ t.boolean "csv_charset_conversion", default: false, null: false
555
+ t.string "header_logo_file_name"
556
+ t.string "header_logo_content_type"
557
+ t.integer "header_logo_file_size"
558
+ t.datetime "header_logo_updated_at"
559
+ t.text "header_logo_meta"
524
560
  t.index ["short_name"], name: "index_library_groups_on_short_name"
525
561
  t.index ["user_id"], name: "index_library_groups_on_user_id"
526
562
  end
@@ -534,6 +570,27 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
534
570
  t.datetime "updated_at"
535
571
  end
536
572
 
573
+ create_table "manifestation_custom_properties", force: :cascade do |t|
574
+ t.string "name", null: false
575
+ t.text "display_name", null: false
576
+ t.text "note"
577
+ t.integer "position", default: 1, null: false
578
+ t.datetime "created_at", null: false
579
+ t.datetime "updated_at", null: false
580
+ t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
581
+ end
582
+
583
+ create_table "manifestation_custom_values", force: :cascade do |t|
584
+ t.integer "manifestation_custom_property_id", null: false
585
+ t.integer "manifestation_id", null: false
586
+ t.text "value"
587
+ t.datetime "created_at", null: false
588
+ t.datetime "updated_at", null: false
589
+ t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
590
+ t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
591
+ t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
592
+ end
593
+
537
594
  create_table "manifestation_relationship_types", force: :cascade do |t|
538
595
  t.string "name", null: false
539
596
  t.text "display_name"
@@ -568,7 +625,6 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
568
625
  t.string "access_address"
569
626
  t.integer "language_id", default: 1, null: false
570
627
  t.integer "carrier_type_id", default: 1, null: false
571
- t.integer "extent_id", default: 1, null: false
572
628
  t.integer "start_page"
573
629
  t.integer "end_page"
574
630
  t.integer "height"
@@ -598,7 +654,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
598
654
  t.datetime "valid_until"
599
655
  t.datetime "date_submitted"
600
656
  t.datetime "date_accepted"
601
- t.datetime "date_caputured"
657
+ t.datetime "date_captured"
602
658
  t.string "pub_date"
603
659
  t.string "edition_string"
604
660
  t.integer "volume_number"
@@ -610,8 +666,12 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
610
666
  t.integer "month_of_publication"
611
667
  t.boolean "fulltext_content"
612
668
  t.string "doi"
613
- t.boolean "periodical"
669
+ t.boolean "serial"
614
670
  t.text "statement_of_responsibility"
671
+ t.text "publication_place"
672
+ t.text "extent"
673
+ t.text "dimensions"
674
+ t.text "memo"
615
675
  t.index ["access_address"], name: "index_manifestations_on_access_address"
616
676
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
617
677
  t.index ["doi"], name: "index_manifestations_on_doi"
@@ -706,9 +766,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
706
766
  create_table "picture_files", force: :cascade do |t|
707
767
  t.integer "picture_attachable_id"
708
768
  t.string "picture_attachable_type"
709
- t.string "content_type"
710
769
  t.text "title"
711
- t.string "thumbnail"
712
770
  t.integer "position"
713
771
  t.datetime "created_at"
714
772
  t.datetime "updated_at"
@@ -718,6 +776,8 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
718
776
  t.datetime "picture_updated_at"
719
777
  t.text "picture_meta"
720
778
  t.string "picture_fingerprint"
779
+ t.integer "picture_width"
780
+ t.integer "picture_height"
721
781
  t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
722
782
  end
723
783
 
@@ -818,6 +878,8 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
818
878
  t.integer "resource_export_file_id"
819
879
  t.datetime "created_at"
820
880
  t.datetime "updated_at"
881
+ t.boolean "most_recent", null: false
882
+ t.index ["resource_export_file_id", "most_recent"], name: "index_resource_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
821
883
  t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
822
884
  t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
823
885
  end
@@ -840,6 +902,8 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
840
902
  t.integer "resource_import_file_id"
841
903
  t.datetime "created_at"
842
904
  t.datetime "updated_at"
905
+ t.boolean "most_recent", null: false
906
+ t.index ["resource_import_file_id", "most_recent"], name: "index_resource_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
843
907
  t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
844
908
  t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
845
909
  end
@@ -873,6 +937,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
873
937
  t.text "body"
874
938
  t.datetime "created_at"
875
939
  t.datetime "updated_at"
940
+ t.text "error_message"
876
941
  t.index ["item_id"], name: "index_resource_import_results_on_item_id"
877
942
  t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
878
943
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
@@ -945,7 +1010,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
945
1010
  t.string "name", null: false
946
1011
  t.text "display_name"
947
1012
  t.text "note"
948
- t.integer "library_id", default: 1, null: false
1013
+ t.integer "library_id", null: false
949
1014
  t.integer "items_count", default: 0, null: false
950
1015
  t.integer "position"
951
1016
  t.datetime "created_at"
@@ -1011,9 +1076,11 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
1011
1076
  t.integer "user_export_file_id"
1012
1077
  t.datetime "created_at"
1013
1078
  t.datetime "updated_at"
1014
- t.boolean "most_recent"
1079
+ t.boolean "most_recent", null: false
1015
1080
  t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1081
+ t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1016
1082
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
1083
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1017
1084
  end
1018
1085
 
1019
1086
  create_table "user_export_files", force: :cascade do |t|
@@ -1025,6 +1092,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
1025
1092
  t.datetime "executed_at"
1026
1093
  t.datetime "created_at"
1027
1094
  t.datetime "updated_at"
1095
+ t.index ["user_id"], name: "index_user_export_files_on_user_id"
1028
1096
  end
1029
1097
 
1030
1098
  create_table "user_groups", force: :cascade do |t|
@@ -1055,8 +1123,9 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
1055
1123
  t.integer "user_import_file_id"
1056
1124
  t.datetime "created_at"
1057
1125
  t.datetime "updated_at"
1058
- t.boolean "most_recent"
1126
+ t.boolean "most_recent", null: false
1059
1127
  t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1128
+ t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1060
1129
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1061
1130
  end
1062
1131
 
@@ -1076,6 +1145,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
1076
1145
  t.string "user_encoding"
1077
1146
  t.integer "default_library_id"
1078
1147
  t.integer "default_user_group_id"
1148
+ t.index ["user_id"], name: "index_user_import_files_on_user_id"
1079
1149
  end
1080
1150
 
1081
1151
  create_table "user_import_results", force: :cascade do |t|
@@ -1085,6 +1155,8 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
1085
1155
  t.datetime "created_at"
1086
1156
  t.datetime "updated_at"
1087
1157
  t.text "error_message"
1158
+ t.index ["user_id"], name: "index_user_import_results_on_user_id"
1159
+ t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1088
1160
  end
1089
1161
 
1090
1162
  create_table "users", force: :cascade do |t|
@@ -1133,6 +1205,7 @@ ActiveRecord::Schema.define(version: 2018_07_09_023040) do
1133
1205
  t.datetime "updated_at", null: false
1134
1206
  t.index ["basket_id"], name: "index_withdraws_on_basket_id"
1135
1207
  t.index ["item_id"], name: "index_withdraws_on_item_id"
1208
+ t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1136
1209
  end
1137
1210
 
1138
1211
  end