enju_seed 0.4.0.rc.1 → 0.4.0.rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/app/controllers/profiles_controller.rb +3 -3
  4. data/app/controllers/roles_controller.rb +1 -1
  5. data/app/models/concerns/enju_seed/enju_user.rb +3 -3
  6. data/app/models/profile.rb +9 -9
  7. data/app/models/role.rb +2 -2
  8. data/app/models/user_has_role.rb +6 -6
  9. data/app/views/roles/_form.html.erb +1 -1
  10. data/db/migrate/041_create_roles.rb +1 -1
  11. data/db/migrate/20100606065209_create_user_has_roles.rb +1 -1
  12. data/db/migrate/20130221154434_add_additional_attributes_to_user.rb +1 -2
  13. data/db/migrate/20140122054321_create_profiles.rb +1 -1
  14. data/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +1 -1
  15. data/db/migrate/20140811031145_add_expired_at_to_profile.rb +1 -1
  16. data/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +1 -1
  17. data/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +1 -1
  18. data/lib/enju_seed/version.rb +1 -1
  19. data/spec/dummy/app/models/user.rb +1 -1
  20. data/spec/dummy/db/migrate/059_create_libraries.rb +1 -2
  21. data/spec/dummy/db/migrate/069_create_shelves.rb +1 -2
  22. data/spec/dummy/db/migrate/077_create_user_groups.rb +1 -2
  23. data/spec/dummy/db/migrate/080_create_library_groups.rb +1 -1
  24. data/spec/dummy/db/migrate/120_create_baskets.rb +1 -1
  25. data/spec/dummy/db/migrate/124_create_bookstores.rb +1 -2
  26. data/spec/dummy/db/migrate/130_create_request_status_types.rb +1 -1
  27. data/spec/dummy/db/migrate/131_create_request_types.rb +1 -1
  28. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +1 -2
  29. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +1 -1
  30. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +1 -1
  31. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +1 -1
  32. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +1 -1
  33. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +1 -1
  34. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +1 -1
  35. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +1 -1
  36. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +1 -1
  37. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +1 -1
  38. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +1 -1
  39. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +1 -1
  40. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +1 -1
  41. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +1 -1
  42. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +2 -6
  43. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +1 -1
  44. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +1 -1
  45. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +2 -6
  46. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +1 -1
  47. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +1 -1
  48. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +1 -1
  49. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +1 -1
  50. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +1 -1
  51. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +1 -1
  52. data/spec/dummy/db/migrate/20160610093229_add_html_snippet_to_library_group.rb +1 -1
  53. data/spec/dummy/db/migrate/20160627232219_add_most_recent_to_user_import_file_transitions.rb +1 -1
  54. data/spec/dummy/db/migrate/20160627232316_add_most_recent_to_user_export_file_transitions.rb +1 -1
  55. data/spec/dummy/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  56. data/spec/dummy/db/migrate/20160813191733_add_family_name_first_to_library_group.rb +1 -1
  57. data/spec/dummy/db/migrate/20160813192542_add_pub_year_facet_range_interval_to_library_group.rb +1 -1
  58. data/spec/dummy/db/migrate/20160813203039_add_user_id_to_library_group.rb +1 -1
  59. data/spec/dummy/db/migrate/20170305064014_add_csv_charset_conversion_to_library_group.rb +1 -1
  60. data/spec/dummy/db/migrate/20171014084528_add_header_logo_to_library_group.rb +1 -1
  61. data/spec/dummy/db/migrate/20171126133835_rename_login_banner_to_old_login_banner.rb +1 -1
  62. data/spec/dummy/db/migrate/20171126135238_add_foreign_key_to_library_group_id_on_library.rb +1 -1
  63. data/spec/dummy/db/migrate/20180102162311_add_header_logo_meta_to_library_group.rb +1 -1
  64. data/spec/dummy/db/migrate/20180107160726_add_constraints_to_most_recent_for_user_import_file_transitions.rb +1 -1
  65. data/spec/dummy/db/migrate/20180107160740_add_constraints_to_most_recent_for_user_export_file_transitions.rb +1 -1
  66. data/spec/dummy/db/migrate/20191216131755_add_email_to_library_group.rb +6 -0
  67. data/spec/dummy/db/schema.rb +100 -101
  68. data/spec/dummy/db/test.sqlite3 +0 -0
  69. data/spec/fixtures/profiles.yml +7 -7
  70. data/spec/fixtures/roles.yml +1 -1
  71. data/spec/fixtures/user_has_roles.yml +5 -5
  72. data/spec/models/profile_spec.rb +7 -7
  73. data/spec/models/role_spec.rb +1 -1
  74. data/spec/models/user_has_role_spec.rb +5 -5
  75. metadata +257 -253
@@ -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_07_13_115451) do
13
+ ActiveRecord::Schema.define(version: 2019_12_16_131755) 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"
@@ -166,16 +166,16 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
166
166
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
167
167
  end
168
168
 
169
- create_table "baskets", id: :serial, force: :cascade do |t|
170
- t.integer "user_id"
169
+ create_table "baskets", force: :cascade do |t|
170
+ t.bigint "user_id"
171
171
  t.text "note"
172
172
  t.integer "lock_version", default: 0, null: false
173
- t.datetime "created_at"
174
- t.datetime "updated_at"
173
+ t.datetime "created_at", null: false
174
+ t.datetime "updated_at", null: false
175
175
  t.index ["user_id"], name: "index_baskets_on_user_id"
176
176
  end
177
177
 
178
- create_table "bookstores", id: :serial, force: :cascade do |t|
178
+ create_table "bookstores", force: :cascade do |t|
179
179
  t.text "name", null: false
180
180
  t.string "zip_code"
181
181
  t.text "address"
@@ -184,18 +184,17 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
184
184
  t.string "fax_number"
185
185
  t.string "url"
186
186
  t.integer "position"
187
- t.datetime "deleted_at"
188
- t.datetime "created_at"
189
- t.datetime "updated_at"
187
+ t.datetime "created_at", null: false
188
+ t.datetime "updated_at", null: false
190
189
  end
191
190
 
192
- create_table "budget_types", id: :serial, force: :cascade do |t|
191
+ create_table "budget_types", force: :cascade do |t|
193
192
  t.string "name"
194
193
  t.text "display_name"
195
194
  t.text "note"
196
195
  t.integer "position"
197
- t.datetime "created_at"
198
- t.datetime "updated_at"
196
+ t.datetime "created_at", null: false
197
+ t.datetime "updated_at", null: false
199
198
  t.jsonb "display_name_translations", default: {}, null: false
200
199
  end
201
200
 
@@ -304,13 +303,13 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
304
303
  t.datetime "updated_at"
305
304
  end
306
305
 
307
- create_table "colors", id: :serial, force: :cascade do |t|
308
- t.integer "library_group_id"
306
+ create_table "colors", force: :cascade do |t|
307
+ t.bigint "library_group_id"
309
308
  t.string "property"
310
309
  t.string "code"
311
310
  t.integer "position"
312
- t.datetime "created_at"
313
- t.datetime "updated_at"
311
+ t.datetime "created_at", null: false
312
+ t.datetime "updated_at", null: false
314
313
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
315
314
  end
316
315
 
@@ -509,7 +508,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
509
508
  t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
510
509
  end
511
510
 
512
- create_table "libraries", id: :serial, force: :cascade do |t|
511
+ create_table "libraries", force: :cascade do |t|
513
512
  t.string "name", null: false
514
513
  t.text "display_name"
515
514
  t.string "short_display_name", null: false
@@ -523,23 +522,23 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
523
522
  t.text "note"
524
523
  t.integer "call_number_rows", default: 1, null: false
525
524
  t.string "call_number_delimiter", default: "|", null: false
526
- t.integer "library_group_id", null: false
525
+ t.bigint "library_group_id", null: false
527
526
  t.integer "users_count", default: 0, null: false
528
527
  t.integer "position"
529
- t.integer "country_id"
530
- t.datetime "created_at"
531
- t.datetime "updated_at"
532
- t.datetime "deleted_at"
528
+ t.bigint "country_id"
529
+ t.datetime "created_at", null: false
530
+ t.datetime "updated_at", null: false
533
531
  t.text "opening_hour"
534
532
  t.string "isil"
535
533
  t.float "latitude"
536
534
  t.float "longitude"
537
535
  t.jsonb "display_name_translations", default: {}, null: false
536
+ t.index ["country_id"], name: "index_libraries_on_country_id"
538
537
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
539
538
  t.index ["name"], name: "index_libraries_on_name"
540
539
  end
541
540
 
542
- create_table "library_groups", id: :serial, force: :cascade do |t|
541
+ create_table "library_groups", force: :cascade do |t|
543
542
  t.string "name", null: false
544
543
  t.text "display_name"
545
544
  t.string "short_name", null: false
@@ -548,8 +547,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
548
547
  t.text "note"
549
548
  t.integer "country_id"
550
549
  t.integer "position"
551
- t.datetime "created_at"
552
- t.datetime "updated_at"
550
+ t.datetime "created_at", null: false
551
+ t.datetime "updated_at", null: false
553
552
  t.text "admin_networks"
554
553
  t.string "url", default: "http://localhost:3000/"
555
554
  t.text "settings"
@@ -557,7 +556,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
557
556
  t.integer "max_number_of_results", default: 500
558
557
  t.boolean "family_name_first", default: true
559
558
  t.integer "pub_year_facet_range_interval", default: 10
560
- t.integer "user_id"
559
+ t.bigint "user_id"
561
560
  t.boolean "csv_charset_conversion", default: false, null: false
562
561
  t.string "header_logo_file_name"
563
562
  t.string "header_logo_content_type"
@@ -567,6 +566,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
567
566
  t.jsonb "display_name_translations", default: {}, null: false
568
567
  t.jsonb "login_banner_translations", default: {}, null: false
569
568
  t.jsonb "footer_banner_translations", default: {}, null: false
569
+ t.string "email"
570
+ t.index ["email"], name: "index_library_groups_on_email"
570
571
  t.index ["short_name"], name: "index_library_groups_on_short_name"
571
572
  t.index ["user_id"], name: "index_library_groups_on_user_id"
572
573
  end
@@ -834,18 +835,18 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
834
835
  t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
835
836
  end
836
837
 
837
- create_table "profiles", id: :serial, force: :cascade do |t|
838
- t.integer "user_id"
839
- t.integer "user_group_id"
840
- t.integer "library_id"
838
+ create_table "profiles", force: :cascade do |t|
839
+ t.bigint "user_id"
840
+ t.bigint "user_group_id"
841
+ t.bigint "library_id"
841
842
  t.string "locale"
842
843
  t.string "user_number"
843
844
  t.text "full_name"
844
845
  t.text "note"
845
846
  t.text "keyword_list"
846
- t.integer "required_role_id"
847
- t.datetime "created_at"
848
- t.datetime "updated_at"
847
+ t.bigint "required_role_id"
848
+ t.datetime "created_at", null: false
849
+ t.datetime "updated_at", null: false
849
850
  t.string "checkout_icalendar_token"
850
851
  t.boolean "save_checkout_history", default: false, null: false
851
852
  t.datetime "expired_at"
@@ -879,23 +880,23 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
879
880
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
880
881
  end
881
882
 
882
- create_table "request_status_types", id: :serial, force: :cascade do |t|
883
+ create_table "request_status_types", force: :cascade do |t|
883
884
  t.string "name", null: false
884
885
  t.text "display_name"
885
886
  t.text "note"
886
887
  t.integer "position"
887
- t.datetime "created_at"
888
- t.datetime "updated_at"
888
+ t.datetime "created_at", null: false
889
+ t.datetime "updated_at", null: false
889
890
  t.jsonb "display_name_translations", default: {}, null: false
890
891
  end
891
892
 
892
- create_table "request_types", id: :serial, force: :cascade do |t|
893
+ create_table "request_types", force: :cascade do |t|
893
894
  t.string "name", null: false
894
895
  t.text "display_name"
895
896
  t.text "note"
896
897
  t.integer "position"
897
- t.datetime "created_at"
898
- t.datetime "updated_at"
898
+ t.datetime "created_at", null: false
899
+ t.datetime "updated_at", null: false
899
900
  t.jsonb "display_name_translations", default: {}, null: false
900
901
  end
901
902
 
@@ -1023,7 +1024,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1023
1024
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
1024
1025
  end
1025
1026
 
1026
- create_table "roles", id: :serial, force: :cascade do |t|
1027
+ create_table "roles", force: :cascade do |t|
1027
1028
  t.string "name", null: false
1028
1029
  t.string "display_name"
1029
1030
  t.text "note"
@@ -1034,7 +1035,7 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1034
1035
  t.jsonb "display_name_translations", default: {}, null: false
1035
1036
  end
1036
1037
 
1037
- create_table "search_engines", id: :serial, force: :cascade do |t|
1038
+ create_table "search_engines", force: :cascade do |t|
1038
1039
  t.string "name", null: false
1039
1040
  t.text "display_name"
1040
1041
  t.string "url", null: false
@@ -1044,8 +1045,8 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1044
1045
  t.text "additional_param"
1045
1046
  t.text "note"
1046
1047
  t.integer "position"
1047
- t.datetime "created_at"
1048
- t.datetime "updated_at"
1048
+ t.datetime "created_at", null: false
1049
+ t.datetime "updated_at", null: false
1049
1050
  t.jsonb "display_name_translations", default: {}, null: false
1050
1051
  end
1051
1052
 
@@ -1088,41 +1089,39 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1088
1089
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
1089
1090
  end
1090
1091
 
1091
- create_table "shelves", id: :serial, force: :cascade do |t|
1092
+ create_table "shelves", force: :cascade do |t|
1092
1093
  t.string "name", null: false
1093
1094
  t.text "display_name"
1094
1095
  t.text "note"
1095
- t.integer "library_id", null: false
1096
+ t.bigint "library_id", null: false
1096
1097
  t.integer "items_count", default: 0, null: false
1097
1098
  t.integer "position"
1098
- t.datetime "created_at"
1099
- t.datetime "updated_at"
1100
- t.datetime "deleted_at"
1099
+ t.datetime "created_at", null: false
1100
+ t.datetime "updated_at", null: false
1101
1101
  t.boolean "closed", default: false, null: false
1102
1102
  t.jsonb "display_name_translations", default: {}, null: false
1103
1103
  t.index ["library_id"], name: "index_shelves_on_library_id"
1104
1104
  end
1105
1105
 
1106
- create_table "subscribes", id: :serial, force: :cascade do |t|
1107
- t.integer "subscription_id", null: false
1106
+ create_table "subscribes", force: :cascade do |t|
1107
+ t.bigint "subscription_id", null: false
1108
1108
  t.integer "work_id", null: false
1109
1109
  t.datetime "start_at", null: false
1110
1110
  t.datetime "end_at", null: false
1111
- t.datetime "created_at"
1112
- t.datetime "updated_at"
1111
+ t.datetime "created_at", null: false
1112
+ t.datetime "updated_at", null: false
1113
1113
  t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
1114
1114
  t.index ["work_id"], name: "index_subscribes_on_work_id"
1115
1115
  end
1116
1116
 
1117
- create_table "subscriptions", id: :serial, force: :cascade do |t|
1117
+ create_table "subscriptions", force: :cascade do |t|
1118
1118
  t.text "title", null: false
1119
1119
  t.text "note"
1120
- t.integer "user_id"
1121
- t.integer "order_list_id"
1122
- t.datetime "deleted_at"
1120
+ t.bigint "user_id"
1121
+ t.bigint "order_list_id"
1123
1122
  t.integer "subscribes_count", default: 0, null: false
1124
- t.datetime "created_at"
1125
- t.datetime "updated_at"
1123
+ t.datetime "created_at", null: false
1124
+ t.datetime "updated_at", null: false
1126
1125
  t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
1127
1126
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1128
1127
  end
@@ -1160,13 +1159,13 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1160
1159
  t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
1161
1160
  end
1162
1161
 
1163
- create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1162
+ create_table "user_export_file_transitions", force: :cascade do |t|
1164
1163
  t.string "to_state"
1165
1164
  t.text "metadata", default: "{}"
1166
1165
  t.integer "sort_key"
1167
- t.integer "user_export_file_id"
1168
- t.datetime "created_at"
1169
- t.datetime "updated_at"
1166
+ t.bigint "user_export_file_id"
1167
+ t.datetime "created_at", null: false
1168
+ t.datetime "updated_at", null: false
1170
1169
  t.boolean "most_recent", null: false
1171
1170
  t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
1172
1171
  t.index ["user_export_file_id", "most_recent"], name: "index_user_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
@@ -1174,15 +1173,15 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1174
1173
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1175
1174
  end
1176
1175
 
1177
- create_table "user_export_files", id: :serial, force: :cascade do |t|
1178
- t.integer "user_id"
1176
+ create_table "user_export_files", force: :cascade do |t|
1177
+ t.bigint "user_id"
1179
1178
  t.string "user_export_file_name"
1180
1179
  t.string "user_export_content_type"
1181
1180
  t.bigint "user_export_file_size"
1182
1181
  t.datetime "user_export_updated_at"
1183
1182
  t.datetime "executed_at"
1184
- t.datetime "created_at"
1185
- t.datetime "updated_at"
1183
+ t.datetime "created_at", null: false
1184
+ t.datetime "updated_at", null: false
1186
1185
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1187
1186
  end
1188
1187
 
@@ -1205,14 +1204,13 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1205
1204
  t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
1206
1205
  end
1207
1206
 
1208
- create_table "user_groups", id: :serial, force: :cascade do |t|
1207
+ create_table "user_groups", force: :cascade do |t|
1209
1208
  t.string "name"
1210
1209
  t.text "display_name"
1211
1210
  t.text "note"
1212
1211
  t.integer "position"
1213
- t.datetime "created_at"
1214
- t.datetime "updated_at"
1215
- t.datetime "deleted_at"
1212
+ t.datetime "created_at", null: false
1213
+ t.datetime "updated_at", null: false
1216
1214
  t.integer "valid_period_for_new_user", default: 0, null: false
1217
1215
  t.datetime "expired_at"
1218
1216
  t.integer "number_of_day_to_notify_overdue", default: 1, null: false
@@ -1221,30 +1219,30 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1221
1219
  t.jsonb "display_name_translations", default: {}, null: false
1222
1220
  end
1223
1221
 
1224
- create_table "user_has_roles", id: :serial, force: :cascade do |t|
1225
- t.integer "user_id", null: false
1226
- t.integer "role_id", null: false
1227
- t.datetime "created_at"
1228
- t.datetime "updated_at"
1222
+ create_table "user_has_roles", force: :cascade do |t|
1223
+ t.bigint "user_id", null: false
1224
+ t.bigint "role_id", null: false
1225
+ t.datetime "created_at", null: false
1226
+ t.datetime "updated_at", null: false
1229
1227
  t.index ["role_id"], name: "index_user_has_roles_on_role_id"
1230
1228
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1231
1229
  end
1232
1230
 
1233
- create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1231
+ create_table "user_import_file_transitions", force: :cascade do |t|
1234
1232
  t.string "to_state"
1235
1233
  t.text "metadata", default: "{}"
1236
1234
  t.integer "sort_key"
1237
- t.integer "user_import_file_id"
1238
- t.datetime "created_at"
1239
- t.datetime "updated_at"
1235
+ t.bigint "user_import_file_id"
1236
+ t.datetime "created_at", null: false
1237
+ t.datetime "updated_at", null: false
1240
1238
  t.boolean "most_recent", null: false
1241
1239
  t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
1242
1240
  t.index ["user_import_file_id", "most_recent"], name: "index_user_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
1243
1241
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1244
1242
  end
1245
1243
 
1246
- create_table "user_import_files", id: :serial, force: :cascade do |t|
1247
- t.integer "user_id"
1244
+ create_table "user_import_files", force: :cascade do |t|
1245
+ t.bigint "user_id"
1248
1246
  t.text "note"
1249
1247
  t.datetime "executed_at"
1250
1248
  t.string "user_import_file_name"
@@ -1254,20 +1252,22 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1254
1252
  t.string "user_import_fingerprint"
1255
1253
  t.string "edit_mode"
1256
1254
  t.text "error_message"
1257
- t.datetime "created_at"
1258
- t.datetime "updated_at"
1255
+ t.datetime "created_at", null: false
1256
+ t.datetime "updated_at", null: false
1259
1257
  t.string "user_encoding"
1260
- t.integer "default_library_id"
1261
- t.integer "default_user_group_id"
1258
+ t.bigint "default_library_id"
1259
+ t.bigint "default_user_group_id"
1260
+ t.index ["default_library_id"], name: "index_user_import_files_on_default_library_id"
1261
+ t.index ["default_user_group_id"], name: "index_user_import_files_on_default_user_group_id"
1262
1262
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1263
1263
  end
1264
1264
 
1265
- create_table "user_import_results", id: :serial, force: :cascade do |t|
1266
- t.integer "user_import_file_id"
1267
- t.integer "user_id"
1265
+ create_table "user_import_results", force: :cascade do |t|
1266
+ t.bigint "user_import_file_id"
1267
+ t.bigint "user_id"
1268
1268
  t.text "body"
1269
- t.datetime "created_at"
1270
- t.datetime "updated_at"
1269
+ t.datetime "created_at", null: false
1270
+ t.datetime "updated_at", null: false
1271
1271
  t.text "error_message"
1272
1272
  t.index ["user_id"], name: "index_user_import_results_on_user_id"
1273
1273
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
@@ -1311,7 +1311,6 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1311
1311
  t.datetime "created_at"
1312
1312
  t.datetime "updated_at"
1313
1313
  t.string "username"
1314
- t.datetime "deleted_at"
1315
1314
  t.datetime "expired_at"
1316
1315
  t.integer "failed_attempts", default: 0
1317
1316
  t.string "unlock_token"
@@ -1325,10 +1324,10 @@ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
1325
1324
  t.index ["username"], name: "index_users_on_username", unique: true
1326
1325
  end
1327
1326
 
1328
- create_table "withdraws", id: :serial, force: :cascade do |t|
1329
- t.integer "basket_id"
1330
- t.integer "item_id"
1331
- t.integer "librarian_id"
1327
+ create_table "withdraws", force: :cascade do |t|
1328
+ t.bigint "basket_id"
1329
+ t.bigint "item_id"
1330
+ t.bigint "librarian_id"
1332
1331
  t.datetime "created_at", null: false
1333
1332
  t.datetime "updated_at", null: false
1334
1333
  t.index ["basket_id"], name: "index_withdraws_on_basket_id"