enju_biblio 0.4.0.beta.2 → 0.4.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/items_controller.rb +5 -1
  3. data/app/controllers/manifestations_controller.rb +12 -6
  4. data/app/mailers/agent_import_mailer.rb +2 -2
  5. data/app/mailers/resource_export_mailer.rb +2 -2
  6. data/app/mailers/resource_import_mailer.rb +2 -2
  7. data/app/models/agent.rb +3 -4
  8. data/app/models/agent_import_file.rb +1 -8
  9. data/app/models/custom_property.rb +17 -0
  10. data/app/models/import_request.rb +0 -9
  11. data/app/models/isbn_record.rb +1 -1
  12. data/app/models/issn_record.rb +1 -1
  13. data/app/models/item.rb +49 -2
  14. data/app/models/manifestation.rb +109 -247
  15. data/app/models/resource_export_file.rb +3 -16
  16. data/app/models/resource_export_file_state_machine.rb +1 -1
  17. data/app/models/resource_import_file.rb +1 -9
  18. data/app/views/items/_custom_property_fields.html.erb +7 -0
  19. data/app/views/items/_form.html.erb +18 -6
  20. data/app/views/items/show.html.erb +8 -1
  21. data/app/views/layouts/items.html.erb +1 -1
  22. data/app/views/layouts/manifestations.html.erb +1 -1
  23. data/app/views/manifestations/_custom_property_fields.html.erb +7 -0
  24. data/app/views/manifestations/_form.html.erb +10 -0
  25. data/app/views/manifestations/_manifestation.txt.erb +1 -1
  26. data/app/views/manifestations/_paginate_id_link.html.erb +1 -1
  27. data/app/views/manifestations/_show_detail_librarian.html.erb +9 -1
  28. data/app/views/manifestations/_show_detail_user.html.erb +1 -1
  29. data/app/views/manifestations/index.txt.ruby +7 -0
  30. data/app/views/manifestations/show.txt.ruby +5 -0
  31. data/app/views/resource_import_files/_results.html.erb +6 -0
  32. data/app/views/resource_import_results/index.html.erb +0 -11
  33. data/app/views/series_statements/_form.html.erb +6 -8
  34. data/app/views/series_statements/show.html.erb +12 -0
  35. data/config/locales/translation_en.yml +12 -1
  36. data/config/locales/translation_ja.yml +14 -3
  37. data/db/migrate/001_create_agents.rb +0 -1
  38. data/db/migrate/005_create_manifestations.rb +0 -1
  39. data/db/migrate/006_create_items.rb +0 -1
  40. data/db/migrate/20191219122214_create_custom_properties.rb +12 -0
  41. data/lib/enju_biblio/version.rb +1 -1
  42. data/lib/generators/enju_biblio/setup/setup_generator.rb +2 -0
  43. data/spec/controllers/items_controller_spec.rb +25 -0
  44. data/spec/controllers/manifestations_controller_spec.rb +52 -0
  45. data/spec/dummy/app/controllers/application_controller.rb +0 -1
  46. data/spec/dummy/app/models/user.rb +0 -2
  47. data/spec/dummy/config/environments/development.rb +11 -24
  48. data/spec/dummy/config/environments/production.rb +16 -28
  49. data/spec/dummy/config/environments/test.rb +6 -6
  50. data/spec/dummy/config/initializers/assets.rb +1 -1
  51. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -2
  52. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  53. data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -2
  54. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  55. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  56. data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -2
  57. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
  58. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
  59. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -2
  60. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  61. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
  62. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  63. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  64. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
  65. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
  66. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  67. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  68. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  69. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
  70. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  71. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  72. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  73. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +2 -6
  74. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  75. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  76. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -6
  77. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  78. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  79. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  80. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  81. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  82. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  83. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  84. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  85. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  86. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  87. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  88. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  89. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  90. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  91. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  92. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  93. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  94. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  95. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  96. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  97. data/spec/dummy/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
  98. data/spec/dummy/db/schema.rb +96 -91
  99. data/spec/dummy/db/test.sqlite3 +0 -0
  100. data/spec/dummy/public/500.html +1 -0
  101. data/spec/factories/custom_property.rb +18 -0
  102. data/spec/factories/series_statement.rb +4 -3
  103. data/spec/fixtures/agents.yml +0 -1
  104. data/spec/fixtures/bookstores.yml +0 -8
  105. data/spec/fixtures/budget_types.yml +10 -9
  106. data/spec/fixtures/events.yml +0 -9
  107. data/spec/fixtures/items.yml +10 -11
  108. data/spec/fixtures/library_groups.yml +6 -11
  109. data/spec/fixtures/manifestations.yml +0 -1
  110. data/spec/models/agent_spec.rb +0 -1
  111. data/spec/models/custom_property_spec.rb +18 -0
  112. data/spec/models/item_spec.rb +0 -1
  113. data/spec/models/manifestation_spec.rb +32 -8
  114. data/spec/rails_helper.rb +3 -3
  115. data/spec/system/custom_properties_spec.rb +84 -0
  116. data/spec/system/items_spec.rb +60 -0
  117. data/spec/system/series_statements_spec.rb +16 -0
  118. data/spec/views/manifestations/index.json.jbuilder_spec.rb +18 -0
  119. data/spec/views/manifestations/{index.txt.erb_spec.rb → index.txt.ruby_spec.rb} +1 -1
  120. data/spec/views/manifestations/{show.txt.erb_spec.rb → show.txt.ruby_spec.rb} +1 -1
  121. metadata +56 -58
  122. data/app/views/manifestations/index.txt.erb +0 -1
  123. data/app/views/manifestations/show.txt.erb +0 -1
  124. data/spec/dummy/db/migrate/20180709023037_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb +0 -20
  125. data/spec/dummy/db/migrate/20180709023039_change_collation_for_tag_names.acts_as_taggable_on_engine.rb +0 -15
@@ -1,4 +1,4 @@
1
- class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration[4.2]
1
+ class AddValidPeriodForNewUserToUserGroup < ActiveRecord::Migration[5.2]
2
2
  def self.up
3
3
  add_column :user_groups, :valid_period_for_new_user, :integer, default: 0, null: false
4
4
  add_column :user_groups, :expired_at, :timestamp
@@ -1,4 +1,4 @@
1
- class AddIsilToLibrary < ActiveRecord::Migration[4.2]
1
+ class AddIsilToLibrary < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :libraries, :isil, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateBudgetTypes < ActiveRecord::Migration[4.2]
1
+ class CreateBudgetTypes < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :budget_types do |t|
4
4
  t.string :name
@@ -1,4 +1,4 @@
1
- class CreateAccepts < ActiveRecord::Migration[4.2]
1
+ class CreateAccepts < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :accepts do |t|
4
4
  t.references :basket, index: true
@@ -1,4 +1,4 @@
1
- class AddClosedToShelf < ActiveRecord::Migration[4.2]
1
+ class AddClosedToShelf < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :shelves, :closed, :boolean, default: false, null: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration[4.2]
1
+ class AddLatitudeAndLongitudeToLibrary < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :libraries, :latitude, :float
4
4
  add_column :libraries, :longitude, :float
@@ -1,4 +1,4 @@
1
- class CreateUserImportFiles < ActiveRecord::Migration[4.2]
1
+ class CreateUserImportFiles < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :user_import_files do |t|
4
4
  t.references :user, index: true
@@ -1,4 +1,4 @@
1
- class CreateUserImportResults < ActiveRecord::Migration[4.2]
1
+ class CreateUserImportResults < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :user_import_results do |t|
4
4
  t.references :user_import_file, index: true
@@ -1,12 +1,8 @@
1
- class CreateUserImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class CreateUserImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :user_import_file_transitions do |t|
4
4
  t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
5
+ t.text :metadata, default: "{}"
10
6
  t.integer :sort_key
11
7
  t.references :user_import_file, index: true
12
8
  t.timestamps
@@ -1,4 +1,4 @@
1
- class AddUserEncodingToUserImportFile < ActiveRecord::Migration[4.2]
1
+ class AddUserEncodingToUserImportFile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :user_import_files, :user_encoding, :string
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateUserExportFiles < ActiveRecord::Migration[4.2]
1
+ class CreateUserExportFiles < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :user_export_files do |t|
4
4
  t.references :user, index: true
@@ -1,12 +1,8 @@
1
- class CreateUserExportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class CreateUserExportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :user_export_file_transitions do |t|
4
4
  t.string :to_state
5
- if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
- t.text :metadata
7
- else
8
- t.text :metadata, default: "{}"
9
- end
5
+ t.text :metadata, default: "{}"
10
6
  t.integer :sort_key
11
7
  t.references :user_export_file, index: true
12
8
  t.timestamps
@@ -1,4 +1,4 @@
1
- class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration[4.2]
1
+ class AddDefaultLibraryIdToUserImportFile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_reference :user_import_files, :default_library
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration[4.2]
1
+ class AddDefaultUserGroupIdToUserImportFile < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_reference :user_import_files, :default_user_group
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateColors < ActiveRecord::Migration[4.2]
1
+ class CreateColors < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :colors do |t|
4
4
  t.references :library_group, index: true
@@ -1,4 +1,4 @@
1
- class AddSettingsToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddSettingsToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :settings, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddErrorMessageToUserImportResult < ActiveRecord::Migration[4.2]
1
+ class AddErrorMessageToUserImportResult < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :user_import_results, :error_message, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateWithdraws < ActiveRecord::Migration[4.2]
1
+ class CreateWithdraws < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  create_table :withdraws do |t|
4
4
  t.references :basket, index: true
@@ -1,4 +1,4 @@
1
- class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddHtmlSnippetToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :html_snippet, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToUserImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :user_import_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddMostRecentToUserExportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  def up
3
3
  add_column :user_export_file_transitions, :most_recent, :boolean, null: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddMaxNumberOfResultsToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :max_number_of_results, :integer, default: 500
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddFamilyNameFirstToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :family_name_first, :boolean, default: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddPubYearFacetRangeIntervalToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :pub_year_facet_range_interval, :integer, default: 10
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddUserIdToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddUserIdToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_reference :library_groups, :user, index: true, foreign_key: true
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddCsvCharsetConversionToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :csv_charset_conversion, :boolean, null: false, default: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddHeaderLogoToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_attachment :library_groups, :header_logo
4
4
  end
@@ -1,4 +1,4 @@
1
- class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[4.2]
1
+ class RenameLoginBannerToOldLoginBanner < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  rename_column :library_groups, :login_banner, :old_login_banner
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[4.2]
1
+ class AddForeignKeyToLibraryGroupIdOnLibrary < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_foreign_key :libraries, :library_groups, null: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[4.2]
1
+ class AddHeaderLogoMetaToLibraryGroup < ActiveRecord::Migration[5.2]
2
2
  def change
3
3
  add_column :library_groups, :header_logo_meta, :text
4
4
  end
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForUserImportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -1,4 +1,4 @@
1
- class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[4.2]
1
+ class AddConstraintsToMostRecentForUserExportFileTransitions < ActiveRecord::Migration[5.2]
2
2
  disable_ddl_transaction!
3
3
 
4
4
  def up
@@ -0,0 +1,6 @@
1
+ class AddEmailToLibraryGroup < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :library_groups, :email, :string
4
+ add_index :library_groups, :email
5
+ end
6
+ end
@@ -10,18 +10,18 @@
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: 2019_08_18_075628) do
13
+ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "pgcrypto"
17
17
  enable_extension "plpgsql"
18
18
 
19
- create_table "accepts", id: :serial, force: :cascade do |t|
20
- t.integer "basket_id"
21
- t.integer "item_id"
22
- t.integer "librarian_id"
23
- t.datetime "created_at"
24
- t.datetime "updated_at"
19
+ create_table "accepts", force: :cascade do |t|
20
+ t.bigint "basket_id"
21
+ t.bigint "item_id"
22
+ t.bigint "librarian_id"
23
+ t.datetime "created_at", null: false
24
+ t.datetime "updated_at", null: false
25
25
  t.index ["basket_id"], name: "index_accepts_on_basket_id"
26
26
  t.index ["item_id"], name: "index_accepts_on_item_id"
27
27
  t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
@@ -129,7 +129,6 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
129
129
  t.text "full_name_alternative"
130
130
  t.datetime "created_at"
131
131
  t.datetime "updated_at"
132
- t.datetime "deleted_at"
133
132
  t.string "zip_code_1"
134
133
  t.string "zip_code_2"
135
134
  t.text "address_1"
@@ -170,12 +169,12 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
170
169
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
171
170
  end
172
171
 
173
- create_table "baskets", id: :serial, force: :cascade do |t|
174
- t.integer "user_id"
172
+ create_table "baskets", force: :cascade do |t|
173
+ t.bigint "user_id"
175
174
  t.text "note"
176
175
  t.integer "lock_version", default: 0, null: false
177
- t.datetime "created_at"
178
- t.datetime "updated_at"
176
+ t.datetime "created_at", null: false
177
+ t.datetime "updated_at", null: false
179
178
  t.index ["user_id"], name: "index_baskets_on_user_id"
180
179
  end
181
180
 
@@ -226,7 +225,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
226
225
  t.index ["user_id"], name: "index_bookmarks_on_user_id"
227
226
  end
228
227
 
229
- create_table "bookstores", id: :serial, force: :cascade do |t|
228
+ create_table "bookstores", force: :cascade do |t|
230
229
  t.text "name", null: false
231
230
  t.string "zip_code"
232
231
  t.text "address"
@@ -235,18 +234,17 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
235
234
  t.string "fax_number"
236
235
  t.string "url"
237
236
  t.integer "position"
238
- t.datetime "deleted_at"
239
- t.datetime "created_at"
240
- t.datetime "updated_at"
237
+ t.datetime "created_at", null: false
238
+ t.datetime "updated_at", null: false
241
239
  end
242
240
 
243
- create_table "budget_types", id: :serial, force: :cascade do |t|
241
+ create_table "budget_types", force: :cascade do |t|
244
242
  t.string "name"
245
243
  t.text "display_name"
246
244
  t.text "note"
247
245
  t.integer "position"
248
- t.datetime "created_at"
249
- t.datetime "updated_at"
246
+ t.datetime "created_at", null: false
247
+ t.datetime "updated_at", null: false
250
248
  t.jsonb "display_name_translations", default: {}, null: false
251
249
  end
252
250
 
@@ -391,13 +389,13 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
391
389
  t.index ["parent_id"], name: "index_classifications_on_parent_id"
392
390
  end
393
391
 
394
- create_table "colors", id: :serial, force: :cascade do |t|
395
- t.integer "library_group_id"
392
+ create_table "colors", force: :cascade do |t|
393
+ t.bigint "library_group_id"
396
394
  t.string "property"
397
395
  t.string "code"
398
396
  t.integer "position"
399
- t.datetime "created_at"
400
- t.datetime "updated_at"
397
+ t.datetime "created_at", null: false
398
+ t.datetime "updated_at", null: false
401
399
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
402
400
  end
403
401
 
@@ -446,6 +444,15 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
446
444
  t.index ["work_id"], name: "index_creates_on_work_id"
447
445
  end
448
446
 
447
+ create_table "custom_properties", force: :cascade do |t|
448
+ t.integer "resource_id", null: false
449
+ t.string "resource_type", null: false
450
+ t.text "label", null: false
451
+ t.text "value"
452
+ t.datetime "created_at", null: false
453
+ t.datetime "updated_at", null: false
454
+ end
455
+
449
456
  create_table "demands", id: :serial, force: :cascade do |t|
450
457
  t.integer "user_id"
451
458
  t.integer "item_id"
@@ -693,7 +700,6 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
693
700
  t.string "item_identifier"
694
701
  t.datetime "created_at"
695
702
  t.datetime "updated_at"
696
- t.datetime "deleted_at"
697
703
  t.integer "shelf_id", default: 1, null: false
698
704
  t.boolean "include_supplements", default: false, null: false
699
705
  t.text "note"
@@ -761,7 +767,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
761
767
  t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
762
768
  end
763
769
 
764
- create_table "libraries", id: :serial, force: :cascade do |t|
770
+ create_table "libraries", force: :cascade do |t|
765
771
  t.string "name", null: false
766
772
  t.text "display_name"
767
773
  t.string "short_display_name", null: false
@@ -775,23 +781,23 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
775
781
  t.text "note"
776
782
  t.integer "call_number_rows", default: 1, null: false
777
783
  t.string "call_number_delimiter", default: "|", null: false
778
- t.integer "library_group_id", null: false
784
+ t.bigint "library_group_id", null: false
779
785
  t.integer "users_count", default: 0, null: false
780
786
  t.integer "position"
781
- t.integer "country_id"
782
- t.datetime "created_at"
783
- t.datetime "updated_at"
784
- t.datetime "deleted_at"
787
+ t.bigint "country_id"
788
+ t.datetime "created_at", null: false
789
+ t.datetime "updated_at", null: false
785
790
  t.text "opening_hour"
786
791
  t.string "isil"
787
792
  t.float "latitude"
788
793
  t.float "longitude"
789
794
  t.jsonb "display_name_translations", default: {}, null: false
795
+ t.index ["country_id"], name: "index_libraries_on_country_id"
790
796
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
791
797
  t.index ["name"], name: "index_libraries_on_name"
792
798
  end
793
799
 
794
- create_table "library_groups", id: :serial, force: :cascade do |t|
800
+ create_table "library_groups", force: :cascade do |t|
795
801
  t.string "name", null: false
796
802
  t.text "display_name"
797
803
  t.string "short_name", null: false
@@ -800,8 +806,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
800
806
  t.text "note"
801
807
  t.integer "country_id"
802
808
  t.integer "position"
803
- t.datetime "created_at"
804
- t.datetime "updated_at"
809
+ t.datetime "created_at", null: false
810
+ t.datetime "updated_at", null: false
805
811
  t.text "admin_networks"
806
812
  t.boolean "allow_bookmark_external_url", default: false, null: false
807
813
  t.string "url", default: "http://localhost:3000/"
@@ -812,7 +818,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
812
818
  t.boolean "family_name_first", default: true
813
819
  t.string "screenshot_generator"
814
820
  t.integer "pub_year_facet_range_interval", default: 10
815
- t.integer "user_id"
821
+ t.bigint "user_id"
816
822
  t.boolean "csv_charset_conversion", default: false, null: false
817
823
  t.string "header_logo_file_name"
818
824
  t.string "header_logo_content_type"
@@ -822,6 +828,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
822
828
  t.jsonb "display_name_translations", default: {}, null: false
823
829
  t.jsonb "login_banner_translations", default: {}, null: false
824
830
  t.jsonb "footer_banner_translations", default: {}, null: false
831
+ t.string "email"
832
+ t.index ["email"], name: "index_library_groups_on_email"
825
833
  t.index ["short_name"], name: "index_library_groups_on_short_name"
826
834
  t.index ["user_id"], name: "index_library_groups_on_user_id"
827
835
  end
@@ -917,7 +925,6 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
917
925
  t.datetime "date_copyrighted"
918
926
  t.datetime "created_at"
919
927
  t.datetime "updated_at"
920
- t.datetime "deleted_at"
921
928
  t.string "access_address"
922
929
  t.integer "language_id", default: 1, null: false
923
930
  t.integer "carrier_type_id", default: 1, null: false
@@ -1206,23 +1213,23 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1206
1213
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
1207
1214
  end
1208
1215
 
1209
- create_table "request_status_types", id: :serial, force: :cascade do |t|
1216
+ create_table "request_status_types", force: :cascade do |t|
1210
1217
  t.string "name", null: false
1211
1218
  t.text "display_name"
1212
1219
  t.text "note"
1213
1220
  t.integer "position"
1214
- t.datetime "created_at"
1215
- t.datetime "updated_at"
1221
+ t.datetime "created_at", null: false
1222
+ t.datetime "updated_at", null: false
1216
1223
  t.jsonb "display_name_translations", default: {}, null: false
1217
1224
  end
1218
1225
 
1219
- create_table "request_types", id: :serial, force: :cascade do |t|
1226
+ create_table "request_types", force: :cascade do |t|
1220
1227
  t.string "name", null: false
1221
1228
  t.text "display_name"
1222
1229
  t.text "note"
1223
1230
  t.integer "position"
1224
- t.datetime "created_at"
1225
- t.datetime "updated_at"
1231
+ t.datetime "created_at", null: false
1232
+ t.datetime "updated_at", null: false
1226
1233
  t.jsonb "display_name_translations", default: {}, null: false
1227
1234
  end
1228
1235
 
@@ -1374,7 +1381,7 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1374
1381
  t.jsonb "display_name_translations", default: {}, null: false
1375
1382
  end
1376
1383
 
1377
- create_table "search_engines", id: :serial, force: :cascade do |t|
1384
+ create_table "search_engines", force: :cascade do |t|
1378
1385
  t.string "name", null: false
1379
1386
  t.text "display_name"
1380
1387
  t.string "url", null: false
@@ -1384,8 +1391,8 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1384
1391
  t.text "additional_param"
1385
1392
  t.text "note"
1386
1393
  t.integer "position"
1387
- t.datetime "created_at"
1388
- t.datetime "updated_at"
1394
+ t.datetime "created_at", null: false
1395
+ t.datetime "updated_at", null: false
1389
1396
  t.jsonb "display_name_translations", default: {}, null: false
1390
1397
  end
1391
1398
 
@@ -1428,16 +1435,15 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1428
1435
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
1429
1436
  end
1430
1437
 
1431
- create_table "shelves", id: :serial, force: :cascade do |t|
1438
+ create_table "shelves", force: :cascade do |t|
1432
1439
  t.string "name", null: false
1433
1440
  t.text "display_name"
1434
1441
  t.text "note"
1435
- t.integer "library_id", null: false
1442
+ t.bigint "library_id", null: false
1436
1443
  t.integer "items_count", default: 0, null: false
1437
1444
  t.integer "position"
1438
- t.datetime "created_at"
1439
- t.datetime "updated_at"
1440
- t.datetime "deleted_at"
1445
+ t.datetime "created_at", null: false
1446
+ t.datetime "updated_at", null: false
1441
1447
  t.boolean "closed", default: false, null: false
1442
1448
  t.jsonb "display_name_translations", default: {}, null: false
1443
1449
  t.index ["library_id"], name: "index_shelves_on_library_id"
@@ -1485,26 +1491,25 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1485
1491
  t.index ["use_term_id"], name: "index_subjects_on_use_term_id"
1486
1492
  end
1487
1493
 
1488
- create_table "subscribes", id: :serial, force: :cascade do |t|
1489
- t.integer "subscription_id", null: false
1494
+ create_table "subscribes", force: :cascade do |t|
1495
+ t.bigint "subscription_id", null: false
1490
1496
  t.integer "work_id", null: false
1491
1497
  t.datetime "start_at", null: false
1492
1498
  t.datetime "end_at", null: false
1493
- t.datetime "created_at"
1494
- t.datetime "updated_at"
1499
+ t.datetime "created_at", null: false
1500
+ t.datetime "updated_at", null: false
1495
1501
  t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
1496
1502
  t.index ["work_id"], name: "index_subscribes_on_work_id"
1497
1503
  end
1498
1504
 
1499
- create_table "subscriptions", id: :serial, force: :cascade do |t|
1505
+ create_table "subscriptions", force: :cascade do |t|
1500
1506
  t.text "title", null: false
1501
1507
  t.text "note"
1502
- t.integer "user_id"
1503
- t.integer "order_list_id"
1504
- t.datetime "deleted_at"
1508
+ t.bigint "user_id"
1509
+ t.bigint "order_list_id"
1505
1510
  t.integer "subscribes_count", default: 0, null: false
1506
- t.datetime "created_at"
1507
- t.datetime "updated_at"
1511
+ t.datetime "created_at", null: false
1512
+ t.datetime "updated_at", null: false
1508
1513
  t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
1509
1514
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1510
1515
  end
@@ -1530,7 +1535,6 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1530
1535
 
1531
1536
  create_table "tags", id: :serial, force: :cascade do |t|
1532
1537
  t.string "name"
1533
- t.integer "taggings_count", default: 0
1534
1538
  t.datetime "created_at"
1535
1539
  t.datetime "updated_at"
1536
1540
  t.index ["name"], name: "index_tags_on_name", unique: true
@@ -1570,13 +1574,13 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1570
1574
  t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
1571
1575
  end
1572
1576
 
1573
- create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1577
+ create_table "user_export_file_transitions", force: :cascade do |t|
1574
1578
  t.string "to_state"
1575
1579
  t.text "metadata", default: "{}"
1576
1580
  t.integer "sort_key"
1577
- t.integer "user_export_file_id"
1578
- t.datetime "created_at"
1579
- t.datetime "updated_at"
1581
+ t.bigint "user_export_file_id"
1582
+ t.datetime "created_at", null: false
1583
+ t.datetime "updated_at", null: false
1580
1584
  t.boolean "most_recent", null: false
1581
1585
  t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1582
1586
  t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
@@ -1584,15 +1588,15 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1584
1588
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1585
1589
  end
1586
1590
 
1587
- create_table "user_export_files", id: :serial, force: :cascade do |t|
1588
- t.integer "user_id"
1591
+ create_table "user_export_files", force: :cascade do |t|
1592
+ t.bigint "user_id"
1589
1593
  t.string "user_export_file_name"
1590
1594
  t.string "user_export_content_type"
1591
1595
  t.bigint "user_export_file_size"
1592
1596
  t.datetime "user_export_updated_at"
1593
1597
  t.datetime "executed_at"
1594
- t.datetime "created_at"
1595
- t.datetime "updated_at"
1598
+ t.datetime "created_at", null: false
1599
+ t.datetime "updated_at", null: false
1596
1600
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1597
1601
  end
1598
1602
 
@@ -1615,14 +1619,13 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1615
1619
  t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
1616
1620
  end
1617
1621
 
1618
- create_table "user_groups", id: :serial, force: :cascade do |t|
1622
+ create_table "user_groups", force: :cascade do |t|
1619
1623
  t.string "name"
1620
1624
  t.text "display_name"
1621
1625
  t.text "note"
1622
1626
  t.integer "position"
1623
- t.datetime "created_at"
1624
- t.datetime "updated_at"
1625
- t.datetime "deleted_at"
1627
+ t.datetime "created_at", null: false
1628
+ t.datetime "updated_at", null: false
1626
1629
  t.integer "valid_period_for_new_user", default: 0, null: false
1627
1630
  t.datetime "expired_at"
1628
1631
  t.integer "number_of_day_to_notify_overdue", default: 7, null: false
@@ -1640,21 +1643,21 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1640
1643
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1641
1644
  end
1642
1645
 
1643
- create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1646
+ create_table "user_import_file_transitions", force: :cascade do |t|
1644
1647
  t.string "to_state"
1645
1648
  t.text "metadata", default: "{}"
1646
1649
  t.integer "sort_key"
1647
- t.integer "user_import_file_id"
1648
- t.datetime "created_at"
1649
- t.datetime "updated_at"
1650
+ t.bigint "user_import_file_id"
1651
+ t.datetime "created_at", null: false
1652
+ t.datetime "updated_at", null: false
1650
1653
  t.boolean "most_recent", null: false
1651
1654
  t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1652
1655
  t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1653
1656
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1654
1657
  end
1655
1658
 
1656
- create_table "user_import_files", id: :serial, force: :cascade do |t|
1657
- t.integer "user_id"
1659
+ create_table "user_import_files", force: :cascade do |t|
1660
+ t.bigint "user_id"
1658
1661
  t.text "note"
1659
1662
  t.datetime "executed_at"
1660
1663
  t.string "user_import_file_name"
@@ -1664,20 +1667,22 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1664
1667
  t.string "user_import_fingerprint"
1665
1668
  t.string "edit_mode"
1666
1669
  t.text "error_message"
1667
- t.datetime "created_at"
1668
- t.datetime "updated_at"
1670
+ t.datetime "created_at", null: false
1671
+ t.datetime "updated_at", null: false
1669
1672
  t.string "user_encoding"
1670
- t.integer "default_library_id"
1671
- t.integer "default_user_group_id"
1673
+ t.bigint "default_library_id"
1674
+ t.bigint "default_user_group_id"
1675
+ t.index ["default_library_id"], name: "index_user_import_files_on_default_library_id"
1676
+ t.index ["default_user_group_id"], name: "index_user_import_files_on_default_user_group_id"
1672
1677
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1673
1678
  end
1674
1679
 
1675
- create_table "user_import_results", id: :serial, force: :cascade do |t|
1676
- t.integer "user_import_file_id"
1677
- t.integer "user_id"
1680
+ create_table "user_import_results", force: :cascade do |t|
1681
+ t.bigint "user_import_file_id"
1682
+ t.bigint "user_id"
1678
1683
  t.text "body"
1679
- t.datetime "created_at"
1680
- t.datetime "updated_at"
1684
+ t.datetime "created_at", null: false
1685
+ t.datetime "updated_at", null: false
1681
1686
  t.text "error_message"
1682
1687
  t.index ["user_id"], name: "index_user_import_results_on_user_id"
1683
1688
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
@@ -1734,10 +1739,10 @@ ActiveRecord::Schema.define(version: 2019_08_18_075628) do
1734
1739
  t.index ["username"], name: "index_users_on_username", unique: true
1735
1740
  end
1736
1741
 
1737
- create_table "withdraws", id: :serial, force: :cascade do |t|
1738
- t.integer "basket_id"
1739
- t.integer "item_id"
1740
- t.integer "librarian_id"
1742
+ create_table "withdraws", force: :cascade do |t|
1743
+ t.bigint "basket_id"
1744
+ t.bigint "item_id"
1745
+ t.bigint "librarian_id"
1741
1746
  t.datetime "created_at", null: false
1742
1747
  t.datetime "updated_at", null: false
1743
1748
  t.index ["basket_id"], name: "index_withdraws_on_basket_id"