enju_event 0.3.5 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -3
  3. data/Rakefile +1 -1
  4. data/app/controllers/event_import_files_controller.rb +0 -1
  5. data/app/controllers/event_import_results_controller.rb +4 -4
  6. data/app/controllers/events_controller.rb +1 -1
  7. data/app/controllers/places_controller.rb +1 -1
  8. data/app/models/event.rb +37 -49
  9. data/app/models/event_category.rb +9 -7
  10. data/app/models/event_export_file.rb +9 -12
  11. data/app/models/event_import_file.rb +9 -5
  12. data/app/models/event_import_result.rb +1 -6
  13. data/app/views/event_categories/_form.html.erb +1 -1
  14. data/app/views/event_categories/index.html.erb +1 -1
  15. data/app/views/event_categories/show.html.erb +1 -1
  16. data/app/views/event_import_files/new.html.erb +2 -2
  17. data/app/views/event_import_files/show.html.erb +74 -70
  18. data/app/views/event_import_results/index.html.erb +12 -1
  19. data/app/views/event_import_results/index.txt.erb +3 -0
  20. data/app/views/events/_form.html.erb +2 -2
  21. data/app/views/events/index.atom.builder +2 -2
  22. data/app/views/events/index.html+phone.erb +2 -2
  23. data/app/views/events/index.html.erb +5 -5
  24. data/app/views/events/index.ics.erb +1 -1
  25. data/app/views/events/index.json.jbuilder +1 -1
  26. data/app/views/events/index.rss.builder +2 -2
  27. data/app/views/events/index.txt.erb +4 -0
  28. data/app/views/events/show.html+phone.erb +3 -3
  29. data/app/views/events/show.html.erb +3 -3
  30. data/app/views/layouts/calendar.html.erb +4 -4
  31. data/app/views/participates/index.html.erb +1 -1
  32. data/app/views/participates/show.html.erb +1 -1
  33. data/app/views/picture_files/_index_event.html.erb +1 -1
  34. data/config/locales/translation_en.yml +0 -1
  35. data/config/locales/translation_ja.yml +0 -1
  36. data/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  37. data/lib/enju_event/engine.rb +1 -0
  38. data/lib/enju_event/version.rb +1 -1
  39. data/lib/generators/enju_event/setup/setup_generator.rb +3 -3
  40. data/lib/generators/enju_event/setup/templates/db/fixtures/event_categories.yml +35 -6
  41. data/spec/controllers/event_import_results_controller_spec.rb +2 -2
  42. data/spec/controllers/events_controller_spec.rb +2 -2
  43. data/spec/dummy/bin/bundle +1 -1
  44. data/spec/dummy/bin/setup +1 -3
  45. data/spec/dummy/bin/update +4 -2
  46. data/spec/dummy/bin/yarn +3 -3
  47. data/spec/dummy/config/database.yml +70 -9
  48. data/spec/dummy/config/initializers/assets.rb +1 -1
  49. data/spec/dummy/config/initializers/mime_types.rb +0 -1
  50. data/spec/dummy/db/migrate/154_create_messages.rb +4 -8
  51. data/spec/dummy/db/migrate/20080819181903_create_message_requests.rb +3 -3
  52. data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
  53. data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
  54. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  55. data/spec/dummy/db/migrate/{20181026064038_add_login_banner_to_library_group.rb → 20190630115523_add_login_banner_translations_to_library_group.rb} +1 -1
  56. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  57. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  58. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  59. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  60. data/spec/dummy/db/schema.rb +148 -266
  61. data/spec/dummy/db/test.sqlite3 +0 -0
  62. data/spec/factories/event_category.rb +4 -2
  63. data/spec/factories/library.rb +2 -0
  64. data/spec/fixtures/agent_types.yml +11 -11
  65. data/spec/fixtures/event_categories.yml +14 -13
  66. data/spec/fixtures/event_export_files.yml +1 -1
  67. data/spec/fixtures/events.yml +22 -29
  68. data/spec/fixtures/libraries.yml +30 -32
  69. data/spec/fixtures/library_groups.yml +44 -20
  70. data/spec/fixtures/shelves.yml +16 -15
  71. data/spec/models/event_category_spec.rb +8 -7
  72. data/spec/models/event_export_file_spec.rb +1 -1
  73. data/spec/models/event_spec.rb +14 -13
  74. data/spec/rails_helper.rb +5 -1
  75. data/spec/system/events_spec.rb +0 -5
  76. metadata +256 -389
  77. data/app/views/event_import_files/_results.html.erb +0 -26
  78. data/app/views/event_import_results/index.text.ruby +0 -5
  79. data/app/views/events/index.text.ruby +0 -7
  80. data/app/views/layouts/mailer.html.erb +0 -13
  81. data/app/views/layouts/mailer.text.erb +0 -1
  82. data/config/brakeman.ignore +0 -66
  83. data/spec/dummy/app/assets/config/manifest.js +0 -5
  84. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +0 -13
  85. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +0 -21
  86. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +0 -18
  87. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +0 -13
  88. data/spec/dummy/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
  89. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
  90. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
  91. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
  92. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
  93. data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +0 -11
  94. data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +0 -14
  95. data/spec/dummy/db/migrate/20181030074920_add_not_null_to_position_on_library.rb +0 -14
  96. data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +0 -27
  97. data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +0 -10
  98. data/spec/dummy/db/migrate/20190314151124_add_full_name_translations_to_create.rb +0 -7
  99. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  100. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  101. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
  102. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  103. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  104. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  105. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +0 -12
  106. data/spec/mailers/event_export_spec.rb +0 -5
  107. data/spec/mailers/event_import_spec.rb +0 -5
  108. data/spec/mailers/previews/event_export_preview.rb +0 -4
  109. data/spec/mailers/previews/event_import_preview.rb +0 -4
  110. data/spec/system/event_import_results_spec.rb +0 -17
  111. data/spec/views/event_import_results/index.text.ruby_spec.rb +0 -22
@@ -10,9 +10,13 @@
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: 2020_04_25_074822) do
13
+ ActiveRecord::Schema.define(version: 2019_07_13_115451) do
14
14
 
15
- create_table "accepts", force: :cascade do |t|
15
+ # These are extensions that must be enabled in order to support this database
16
+ enable_extension "pgcrypto"
17
+ enable_extension "plpgsql"
18
+
19
+ create_table "accepts", id: :serial, force: :cascade do |t|
16
20
  t.integer "basket_id"
17
21
  t.integer "item_id"
18
22
  t.integer "librarian_id"
@@ -23,28 +27,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
23
27
  t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
24
28
  end
25
29
 
26
- create_table "active_storage_attachments", force: :cascade do |t|
27
- t.string "name", null: false
28
- t.string "record_type", null: false
29
- t.integer "record_id", null: false
30
- t.integer "blob_id", null: false
31
- t.datetime "created_at", null: false
32
- t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
33
- t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
34
- end
35
-
36
- create_table "active_storage_blobs", force: :cascade do |t|
37
- t.string "key", null: false
38
- t.string "filename", null: false
39
- t.string "content_type"
40
- t.text "metadata"
41
- t.bigint "byte_size", null: false
42
- t.string "checksum", null: false
43
- t.datetime "created_at", null: false
44
- t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
45
- end
46
-
47
- create_table "agent_import_file_transitions", force: :cascade do |t|
30
+ create_table "agent_import_file_transitions", id: :serial, force: :cascade do |t|
48
31
  t.string "to_state"
49
32
  t.text "metadata", default: "{}"
50
33
  t.integer "sort_key"
@@ -57,7 +40,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
57
40
  t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
58
41
  end
59
42
 
60
- create_table "agent_import_files", force: :cascade do |t|
43
+ create_table "agent_import_files", id: :serial, force: :cascade do |t|
61
44
  t.integer "parent_id"
62
45
  t.string "content_type"
63
46
  t.integer "size"
@@ -78,7 +61,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
78
61
  t.index ["user_id"], name: "index_agent_import_files_on_user_id"
79
62
  end
80
63
 
81
- create_table "agent_import_results", force: :cascade do |t|
64
+ create_table "agent_import_results", id: :serial, force: :cascade do |t|
82
65
  t.integer "agent_import_file_id"
83
66
  t.integer "agent_id"
84
67
  t.text "body"
@@ -86,13 +69,13 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
86
69
  t.datetime "updated_at"
87
70
  end
88
71
 
89
- create_table "agent_merge_lists", force: :cascade do |t|
72
+ create_table "agent_merge_lists", id: :serial, force: :cascade do |t|
90
73
  t.string "title"
91
74
  t.datetime "created_at"
92
75
  t.datetime "updated_at"
93
76
  end
94
77
 
95
- create_table "agent_merges", force: :cascade do |t|
78
+ create_table "agent_merges", id: :serial, force: :cascade do |t|
96
79
  t.integer "agent_id", null: false
97
80
  t.integer "agent_merge_list_id", null: false
98
81
  t.datetime "created_at"
@@ -101,16 +84,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
101
84
  t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
102
85
  end
103
86
 
104
- create_table "agent_relationship_types", force: :cascade do |t|
87
+ create_table "agent_relationship_types", id: :serial, force: :cascade do |t|
105
88
  t.string "name", null: false
106
89
  t.text "display_name"
107
90
  t.text "note"
108
91
  t.integer "position"
109
92
  t.datetime "created_at"
110
93
  t.datetime "updated_at"
94
+ t.jsonb "display_name_translations", default: {}, null: false
111
95
  end
112
96
 
113
- create_table "agent_relationships", force: :cascade do |t|
97
+ create_table "agent_relationships", id: :serial, force: :cascade do |t|
114
98
  t.integer "parent_id"
115
99
  t.integer "child_id"
116
100
  t.integer "agent_relationship_type_id"
@@ -121,16 +105,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
121
105
  t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
122
106
  end
123
107
 
124
- create_table "agent_types", force: :cascade do |t|
108
+ create_table "agent_types", id: :serial, force: :cascade do |t|
125
109
  t.string "name", null: false
126
110
  t.text "display_name"
127
111
  t.text "note"
128
- t.integer "position", default: 1, null: false
112
+ t.integer "position"
129
113
  t.datetime "created_at"
130
114
  t.datetime "updated_at"
115
+ t.jsonb "display_name_translations", default: {}, null: false
131
116
  end
132
117
 
133
- create_table "agents", force: :cascade do |t|
118
+ create_table "agents", id: :serial, force: :cascade do |t|
134
119
  t.string "last_name"
135
120
  t.string "middle_name"
136
121
  t.string "first_name"
@@ -185,7 +170,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
185
170
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
186
171
  end
187
172
 
188
- create_table "baskets", force: :cascade do |t|
173
+ create_table "baskets", id: :serial, force: :cascade do |t|
189
174
  t.integer "user_id"
190
175
  t.text "note"
191
176
  t.integer "lock_version", default: 0, null: false
@@ -194,7 +179,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
194
179
  t.index ["user_id"], name: "index_baskets_on_user_id"
195
180
  end
196
181
 
197
- create_table "bookstores", force: :cascade do |t|
182
+ create_table "bookstores", id: :serial, force: :cascade do |t|
198
183
  t.text "name", null: false
199
184
  t.string "zip_code"
200
185
  t.text "address"
@@ -202,54 +187,57 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
202
187
  t.string "telephone_number"
203
188
  t.string "fax_number"
204
189
  t.string "url"
205
- t.integer "position", default: 1, null: false
190
+ t.integer "position"
206
191
  t.datetime "deleted_at"
207
192
  t.datetime "created_at"
208
193
  t.datetime "updated_at"
209
194
  end
210
195
 
211
- create_table "budget_types", force: :cascade do |t|
196
+ create_table "budget_types", id: :serial, force: :cascade do |t|
212
197
  t.string "name"
213
198
  t.text "display_name"
214
199
  t.text "note"
215
- t.integer "position", default: 1, null: false
200
+ t.integer "position"
216
201
  t.datetime "created_at"
217
202
  t.datetime "updated_at"
203
+ t.jsonb "display_name_translations", default: {}, null: false
218
204
  end
219
205
 
220
- create_table "carrier_types", force: :cascade do |t|
206
+ create_table "carrier_types", id: :serial, force: :cascade do |t|
221
207
  t.string "name", null: false
222
208
  t.text "display_name"
223
209
  t.text "note"
224
- t.integer "position", default: 1, null: false
210
+ t.integer "position"
225
211
  t.datetime "created_at"
226
212
  t.datetime "updated_at"
227
213
  t.string "attachment_file_name"
228
214
  t.string "attachment_content_type"
229
- t.integer "attachment_file_size"
215
+ t.bigint "attachment_file_size"
230
216
  t.datetime "attachment_updated_at"
217
+ t.jsonb "display_name_translations", default: {}, null: false
231
218
  end
232
219
 
233
- create_table "colors", force: :cascade do |t|
220
+ create_table "colors", id: :serial, force: :cascade do |t|
234
221
  t.integer "library_group_id"
235
222
  t.string "property"
236
223
  t.string "code"
237
- t.integer "position", default: 1, null: false
224
+ t.integer "position"
238
225
  t.datetime "created_at"
239
226
  t.datetime "updated_at"
240
227
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
241
228
  end
242
229
 
243
- create_table "content_types", force: :cascade do |t|
230
+ create_table "content_types", id: :serial, force: :cascade do |t|
244
231
  t.string "name", null: false
245
232
  t.text "display_name"
246
233
  t.text "note"
247
- t.integer "position", default: 1, null: false
234
+ t.integer "position"
248
235
  t.datetime "created_at"
249
236
  t.datetime "updated_at"
237
+ t.jsonb "display_name_translations", default: {}, null: false
250
238
  end
251
239
 
252
- create_table "countries", force: :cascade do |t|
240
+ create_table "countries", id: :serial, force: :cascade do |t|
253
241
  t.string "name", null: false
254
242
  t.text "display_name"
255
243
  t.string "alpha_2"
@@ -263,37 +251,28 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
263
251
  t.index ["numeric_3"], name: "index_countries_on_numeric_3"
264
252
  end
265
253
 
266
- create_table "create_types", force: :cascade do |t|
254
+ create_table "create_types", id: :serial, force: :cascade do |t|
267
255
  t.string "name"
268
256
  t.text "display_name"
269
257
  t.text "note"
270
258
  t.integer "position"
271
259
  t.datetime "created_at"
272
260
  t.datetime "updated_at"
261
+ t.jsonb "display_name_translations", default: {}, null: false
273
262
  end
274
263
 
275
- create_table "creates", force: :cascade do |t|
264
+ create_table "creates", id: :serial, force: :cascade do |t|
276
265
  t.integer "agent_id", null: false
277
266
  t.integer "work_id", null: false
278
- t.integer "position", default: 1, null: false
267
+ t.integer "position"
279
268
  t.datetime "created_at"
280
269
  t.datetime "updated_at"
281
270
  t.integer "create_type_id"
282
- t.json "full_name_translations", default: {}
283
271
  t.index ["agent_id"], name: "index_creates_on_agent_id"
284
272
  t.index ["work_id"], name: "index_creates_on_work_id"
285
273
  end
286
274
 
287
- create_table "custom_properties", force: :cascade do |t|
288
- t.integer "resource_id", null: false
289
- t.string "resource_type", null: false
290
- t.text "label", null: false
291
- t.text "value"
292
- t.datetime "created_at", null: false
293
- t.datetime "updated_at", null: false
294
- end
295
-
296
- create_table "donates", force: :cascade do |t|
275
+ create_table "donates", id: :serial, force: :cascade do |t|
297
276
  t.integer "agent_id", null: false
298
277
  t.integer "item_id", null: false
299
278
  t.datetime "created_at"
@@ -302,16 +281,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
302
281
  t.index ["item_id"], name: "index_donates_on_item_id"
303
282
  end
304
283
 
305
- create_table "event_categories", force: :cascade do |t|
284
+ create_table "event_categories", id: :serial, force: :cascade do |t|
306
285
  t.string "name", null: false
307
286
  t.text "display_name"
308
287
  t.text "note"
309
288
  t.integer "position"
310
289
  t.datetime "created_at"
311
290
  t.datetime "updated_at"
291
+ t.jsonb "display_name_translations", default: {}, null: false
312
292
  end
313
293
 
314
- create_table "event_export_file_transitions", force: :cascade do |t|
294
+ create_table "event_export_file_transitions", id: :serial, force: :cascade do |t|
315
295
  t.string "to_state"
316
296
  t.text "metadata", default: "{}"
317
297
  t.integer "sort_key"
@@ -324,11 +304,11 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
324
304
  t.index ["sort_key", "event_export_file_id"], name: "index_event_export_file_transitions_on_sort_key_and_file_id", unique: true
325
305
  end
326
306
 
327
- create_table "event_export_files", force: :cascade do |t|
307
+ create_table "event_export_files", id: :serial, force: :cascade do |t|
328
308
  t.integer "user_id"
329
309
  t.string "event_export_file_name"
330
310
  t.string "event_export_content_type"
331
- t.integer "event_export_file_size"
311
+ t.bigint "event_export_file_size"
332
312
  t.datetime "event_export_updated_at"
333
313
  t.datetime "executed_at"
334
314
  t.datetime "created_at"
@@ -336,7 +316,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
336
316
  t.index ["user_id"], name: "index_event_export_files_on_user_id"
337
317
  end
338
318
 
339
- create_table "event_import_file_transitions", force: :cascade do |t|
319
+ create_table "event_import_file_transitions", id: :serial, force: :cascade do |t|
340
320
  t.string "to_state"
341
321
  t.text "metadata", default: "{}"
342
322
  t.integer "sort_key"
@@ -349,7 +329,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
349
329
  t.index ["sort_key", "event_import_file_id"], name: "index_event_import_file_transitions_on_sort_key_and_file_id", unique: true
350
330
  end
351
331
 
352
- create_table "event_import_files", force: :cascade do |t|
332
+ create_table "event_import_files", id: :serial, force: :cascade do |t|
353
333
  t.integer "parent_id"
354
334
  t.string "content_type"
355
335
  t.integer "size"
@@ -372,7 +352,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
372
352
  t.index ["user_id"], name: "index_event_import_files_on_user_id"
373
353
  end
374
354
 
375
- create_table "event_import_results", force: :cascade do |t|
355
+ create_table "event_import_results", id: :serial, force: :cascade do |t|
376
356
  t.integer "event_import_file_id"
377
357
  t.integer "event_id"
378
358
  t.text "body"
@@ -380,7 +360,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
380
360
  t.datetime "updated_at"
381
361
  end
382
362
 
383
- create_table "events", force: :cascade do |t|
363
+ create_table "events", id: :serial, force: :cascade do |t|
384
364
  t.integer "library_id", null: false
385
365
  t.integer "event_category_id", null: false
386
366
  t.string "name"
@@ -393,40 +373,33 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
393
373
  t.datetime "created_at"
394
374
  t.datetime "updated_at"
395
375
  t.integer "place_id"
376
+ t.jsonb "display_name_translations", default: {}, null: false
396
377
  t.index ["event_category_id"], name: "index_events_on_event_category_id"
397
378
  t.index ["library_id"], name: "index_events_on_library_id"
398
379
  t.index ["place_id"], name: "index_events_on_place_id"
399
380
  end
400
381
 
401
- create_table "exemplifies", force: :cascade do |t|
402
- t.integer "manifestation_id", null: false
403
- t.integer "item_id", null: false
404
- t.integer "position"
405
- t.datetime "created_at"
406
- t.datetime "updated_at"
407
- t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true
408
- t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
409
- end
410
-
411
- create_table "form_of_works", force: :cascade do |t|
382
+ create_table "form_of_works", id: :serial, force: :cascade do |t|
412
383
  t.string "name", null: false
413
384
  t.text "display_name"
414
385
  t.text "note"
415
- t.integer "position", default: 1, null: false
386
+ t.integer "position"
416
387
  t.datetime "created_at"
417
388
  t.datetime "updated_at"
389
+ t.jsonb "display_name_translations", default: {}, null: false
418
390
  end
419
391
 
420
- create_table "frequencies", force: :cascade do |t|
392
+ create_table "frequencies", id: :serial, force: :cascade do |t|
421
393
  t.string "name", null: false
422
394
  t.text "display_name"
423
395
  t.text "note"
424
- t.integer "position", default: 1, null: false
396
+ t.integer "position"
425
397
  t.datetime "created_at"
426
398
  t.datetime "updated_at"
399
+ t.jsonb "display_name_translations", default: {}, null: false
427
400
  end
428
401
 
429
- create_table "identifier_types", force: :cascade do |t|
402
+ create_table "identifier_types", id: :serial, force: :cascade do |t|
430
403
  t.string "name"
431
404
  t.text "display_name"
432
405
  t.text "note"
@@ -435,7 +408,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
435
408
  t.datetime "updated_at"
436
409
  end
437
410
 
438
- create_table "identifiers", force: :cascade do |t|
411
+ create_table "identifiers", id: :serial, force: :cascade do |t|
439
412
  t.string "body", null: false
440
413
  t.integer "identifier_type_id", null: false
441
414
  t.integer "manifestation_id"
@@ -447,20 +420,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
447
420
  t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
448
421
  end
449
422
 
450
- create_table "identities", force: :cascade do |t|
451
- t.string "name"
452
- t.string "email"
453
- t.string "password_digest"
454
- t.integer "profile_id"
455
- t.datetime "created_at", null: false
456
- t.datetime "updated_at", null: false
457
- t.string "provider"
458
- t.index ["email"], name: "index_identities_on_email"
459
- t.index ["name"], name: "index_identities_on_name"
460
- t.index ["profile_id"], name: "index_identities_on_profile_id"
461
- end
462
-
463
- create_table "import_request_transitions", force: :cascade do |t|
423
+ create_table "import_request_transitions", id: :serial, force: :cascade do |t|
464
424
  t.string "to_state"
465
425
  t.text "metadata", default: "{}"
466
426
  t.integer "sort_key"
@@ -473,7 +433,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
473
433
  t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
474
434
  end
475
435
 
476
- create_table "import_requests", force: :cascade do |t|
436
+ create_table "import_requests", id: :serial, force: :cascade do |t|
477
437
  t.string "isbn"
478
438
  t.integer "manifestation_id"
479
439
  t.integer "user_id"
@@ -484,37 +444,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
484
444
  t.index ["user_id"], name: "index_import_requests_on_user_id"
485
445
  end
486
446
 
487
- create_table "isbn_records", force: :cascade do |t|
488
- t.string "body", null: false
489
- t.string "isbn_type"
490
- t.string "source"
491
- t.datetime "created_at", null: false
492
- t.datetime "updated_at", null: false
493
- t.index ["body"], name: "index_isbn_records_on_body", unique: true
494
- end
495
-
496
- create_table "item_custom_properties", force: :cascade do |t|
497
- t.string "name", null: false
498
- t.text "display_name", null: false
499
- t.text "note"
500
- t.integer "position", default: 1, null: false
501
- t.datetime "created_at", null: false
502
- t.datetime "updated_at", null: false
503
- t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
504
- end
505
-
506
- create_table "item_custom_values", force: :cascade do |t|
507
- t.integer "item_custom_property_id", null: false
508
- t.integer "item_id", null: false
509
- t.text "value"
510
- t.datetime "created_at", null: false
511
- t.datetime "updated_at", null: false
512
- t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
513
- t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
514
- t.index ["item_id"], name: "index_item_custom_values_on_item_id"
515
- end
516
-
517
- create_table "items", force: :cascade do |t|
447
+ create_table "items", id: :serial, force: :cascade do |t|
518
448
  t.string "call_number"
519
449
  t.string "item_identifier"
520
450
  t.datetime "created_at"
@@ -535,7 +465,6 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
535
465
  t.string "binding_call_number"
536
466
  t.datetime "binded_at"
537
467
  t.integer "manifestation_id", null: false
538
- t.text "memo"
539
468
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
540
469
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
541
470
  t.index ["item_identifier"], name: "index_items_on_item_identifier"
@@ -544,7 +473,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
544
473
  t.index ["shelf_id"], name: "index_items_on_shelf_id"
545
474
  end
546
475
 
547
- create_table "languages", force: :cascade do |t|
476
+ create_table "languages", id: :serial, force: :cascade do |t|
548
477
  t.string "name", null: false
549
478
  t.string "native_name"
550
479
  t.text "display_name"
@@ -553,27 +482,14 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
553
482
  t.string "iso_639_3"
554
483
  t.text "note"
555
484
  t.integer "position"
485
+ t.jsonb "display_name_translations", default: {}, null: false
556
486
  t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
557
487
  t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
558
488
  t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
559
489
  t.index ["name"], name: "index_languages_on_name", unique: true
560
490
  end
561
491
 
562
- create_table "lending_policies", force: :cascade do |t|
563
- t.integer "item_id", null: false
564
- t.integer "user_group_id", null: false
565
- t.integer "loan_period", default: 0, null: false
566
- t.datetime "fixed_due_date"
567
- t.integer "renewal", default: 0, null: false
568
- t.integer "fine", default: 0, null: false
569
- t.text "note"
570
- t.integer "position"
571
- t.datetime "created_at"
572
- t.datetime "updated_at"
573
- t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
574
- end
575
-
576
- create_table "libraries", force: :cascade do |t|
492
+ create_table "libraries", id: :serial, force: :cascade do |t|
577
493
  t.string "name", null: false
578
494
  t.text "display_name"
579
495
  t.string "short_display_name", null: false
@@ -589,7 +505,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
589
505
  t.string "call_number_delimiter", default: "|", null: false
590
506
  t.integer "library_group_id", null: false
591
507
  t.integer "users_count", default: 0, null: false
592
- t.integer "position", default: 1, null: false
508
+ t.integer "position"
593
509
  t.integer "country_id"
594
510
  t.datetime "created_at"
595
511
  t.datetime "updated_at"
@@ -598,22 +514,12 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
598
514
  t.string "isil"
599
515
  t.float "latitude"
600
516
  t.float "longitude"
517
+ t.jsonb "display_name_translations", default: {}, null: false
601
518
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
602
519
  t.index ["name"], name: "index_libraries_on_name"
603
520
  end
604
521
 
605
- create_table "library_group_translations", force: :cascade do |t|
606
- t.integer "library_group_id", null: false
607
- t.string "locale", null: false
608
- t.datetime "created_at", null: false
609
- t.datetime "updated_at", null: false
610
- t.text "login_banner"
611
- t.text "footer_banner"
612
- t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
613
- t.index ["locale"], name: "index_library_group_translations_on_locale"
614
- end
615
-
616
- create_table "library_groups", force: :cascade do |t|
522
+ create_table "library_groups", id: :serial, force: :cascade do |t|
617
523
  t.string "name", null: false
618
524
  t.text "display_name"
619
525
  t.string "short_name", null: false
@@ -621,7 +527,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
621
527
  t.text "old_login_banner"
622
528
  t.text "note"
623
529
  t.integer "country_id"
624
- t.integer "position", default: 1, null: false
530
+ t.integer "position"
625
531
  t.datetime "created_at"
626
532
  t.datetime "updated_at"
627
533
  t.text "admin_networks"
@@ -635,55 +541,37 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
635
541
  t.boolean "csv_charset_conversion", default: false, null: false
636
542
  t.string "header_logo_file_name"
637
543
  t.string "header_logo_content_type"
638
- t.integer "header_logo_file_size"
544
+ t.bigint "header_logo_file_size"
639
545
  t.datetime "header_logo_updated_at"
640
546
  t.text "header_logo_meta"
641
- t.json "login_banner_translations", default: "\"{}\"", null: false
642
- t.json "footer_banner_translations", default: "\"{}\"", null: false
547
+ t.jsonb "display_name_translations", default: {}, null: false
548
+ t.jsonb "login_banner_translations", default: {}, null: false
549
+ t.jsonb "footer_banner_translations", default: {}, null: false
643
550
  t.index ["short_name"], name: "index_library_groups_on_short_name"
644
551
  t.index ["user_id"], name: "index_library_groups_on_user_id"
645
552
  end
646
553
 
647
- create_table "licenses", force: :cascade do |t|
554
+ create_table "licenses", id: :serial, force: :cascade do |t|
648
555
  t.string "name", null: false
649
556
  t.string "display_name"
650
557
  t.text "note"
651
- t.integer "position", default: 1, null: false
558
+ t.integer "position"
652
559
  t.datetime "created_at"
653
560
  t.datetime "updated_at"
561
+ t.jsonb "display_name_translations", default: {}, null: false
654
562
  end
655
563
 
656
- create_table "manifestation_custom_properties", force: :cascade do |t|
657
- t.string "name", null: false
658
- t.text "display_name", null: false
659
- t.text "note"
660
- t.integer "position", default: 1, null: false
661
- t.datetime "created_at", null: false
662
- t.datetime "updated_at", null: false
663
- t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
664
- end
665
-
666
- create_table "manifestation_custom_values", force: :cascade do |t|
667
- t.integer "manifestation_custom_property_id", null: false
668
- t.integer "manifestation_id", null: false
669
- t.text "value"
670
- t.datetime "created_at", null: false
671
- t.datetime "updated_at", null: false
672
- t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
673
- t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
674
- t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
675
- end
676
-
677
- create_table "manifestation_relationship_types", force: :cascade do |t|
564
+ create_table "manifestation_relationship_types", id: :serial, force: :cascade do |t|
678
565
  t.string "name", null: false
679
566
  t.text "display_name"
680
567
  t.text "note"
681
568
  t.integer "position"
682
569
  t.datetime "created_at"
683
570
  t.datetime "updated_at"
571
+ t.jsonb "display_name_translations", default: {}, null: false
684
572
  end
685
573
 
686
- create_table "manifestation_relationships", force: :cascade do |t|
574
+ create_table "manifestation_relationships", id: :serial, force: :cascade do |t|
687
575
  t.integer "parent_id"
688
576
  t.integer "child_id"
689
577
  t.integer "manifestation_relationship_type_id"
@@ -694,7 +582,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
694
582
  t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
695
583
  end
696
584
 
697
- create_table "manifestations", force: :cascade do |t|
585
+ create_table "manifestations", id: :serial, force: :cascade do |t|
698
586
  t.text "original_title", null: false
699
587
  t.text "title_alternative"
700
588
  t.text "title_transcription"
@@ -748,30 +636,28 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
748
636
  t.text "attachment_meta"
749
637
  t.integer "month_of_publication"
750
638
  t.boolean "fulltext_content"
751
- t.string "doi"
752
639
  t.boolean "serial"
753
640
  t.text "statement_of_responsibility"
754
641
  t.text "publication_place"
755
642
  t.text "extent"
756
643
  t.text "dimensions"
757
- t.text "memo"
758
644
  t.index ["access_address"], name: "index_manifestations_on_access_address"
759
645
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
760
- t.index ["doi"], name: "index_manifestations_on_doi"
761
646
  t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
762
647
  t.index ["updated_at"], name: "index_manifestations_on_updated_at"
763
648
  end
764
649
 
765
- create_table "medium_of_performances", force: :cascade do |t|
650
+ create_table "medium_of_performances", id: :serial, force: :cascade do |t|
766
651
  t.string "name", null: false
767
652
  t.text "display_name"
768
653
  t.text "note"
769
654
  t.integer "position"
770
655
  t.datetime "created_at"
771
656
  t.datetime "updated_at"
657
+ t.jsonb "display_name_translations", default: {}, null: false
772
658
  end
773
659
 
774
- create_table "message_request_transitions", force: :cascade do |t|
660
+ create_table "message_request_transitions", id: :serial, force: :cascade do |t|
775
661
  t.string "to_state"
776
662
  t.text "metadata", default: "{}"
777
663
  t.integer "sort_key"
@@ -784,7 +670,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
784
670
  t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
785
671
  end
786
672
 
787
- create_table "message_requests", force: :cascade do |t|
673
+ create_table "message_requests", id: :serial, force: :cascade do |t|
788
674
  t.integer "sender_id"
789
675
  t.integer "receiver_id"
790
676
  t.integer "message_template_id"
@@ -795,7 +681,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
795
681
  t.datetime "updated_at"
796
682
  end
797
683
 
798
- create_table "message_templates", force: :cascade do |t|
684
+ create_table "message_templates", id: :serial, force: :cascade do |t|
799
685
  t.string "status", null: false
800
686
  t.text "title", null: false
801
687
  t.text "body", null: false
@@ -806,7 +692,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
806
692
  t.index ["status"], name: "index_message_templates_on_status", unique: true
807
693
  end
808
694
 
809
- create_table "message_transitions", force: :cascade do |t|
695
+ create_table "message_transitions", id: :serial, force: :cascade do |t|
810
696
  t.string "to_state"
811
697
  t.text "metadata", default: "{}"
812
698
  t.integer "sort_key"
@@ -819,10 +705,10 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
819
705
  t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
820
706
  end
821
707
 
822
- create_table "messages", force: :cascade do |t|
708
+ create_table "messages", id: :serial, force: :cascade do |t|
823
709
  t.datetime "read_at"
824
- t.integer "receiver_id"
825
710
  t.integer "sender_id"
711
+ t.integer "receiver_id"
826
712
  t.string "subject", null: false
827
713
  t.text "body"
828
714
  t.integer "message_request_id"
@@ -838,17 +724,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
838
724
  t.index ["sender_id"], name: "index_messages_on_sender_id"
839
725
  end
840
726
 
841
- create_table "owns", force: :cascade do |t|
727
+ create_table "owns", id: :serial, force: :cascade do |t|
842
728
  t.integer "agent_id", null: false
843
729
  t.integer "item_id", null: false
844
- t.integer "position", default: 1, null: false
730
+ t.integer "position"
845
731
  t.datetime "created_at"
846
732
  t.datetime "updated_at"
847
733
  t.index ["agent_id"], name: "index_owns_on_agent_id"
848
734
  t.index ["item_id"], name: "index_owns_on_item_id"
849
735
  end
850
736
 
851
- create_table "participates", force: :cascade do |t|
737
+ create_table "participates", id: :serial, force: :cascade do |t|
852
738
  t.integer "agent_id", null: false
853
739
  t.integer "event_id", null: false
854
740
  t.integer "position"
@@ -858,15 +744,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
858
744
  t.index ["event_id"], name: "index_participates_on_event_id"
859
745
  end
860
746
 
861
- create_table "periodicals", force: :cascade do |t|
862
- t.text "original_title", null: false
863
- t.integer "frequency_id", null: false
864
- t.datetime "created_at", null: false
865
- t.datetime "updated_at", null: false
866
- t.index ["frequency_id"], name: "index_periodicals_on_frequency_id"
867
- end
868
-
869
- create_table "picture_files", force: :cascade do |t|
747
+ create_table "picture_files", id: :serial, force: :cascade do |t|
870
748
  t.integer "picture_attachable_id"
871
749
  t.string "picture_attachable_type"
872
750
  t.string "content_type"
@@ -886,7 +764,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
886
764
  t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
887
765
  end
888
766
 
889
- create_table "places", force: :cascade do |t|
767
+ create_table "places", id: :serial, force: :cascade do |t|
890
768
  t.string "term"
891
769
  t.text "city"
892
770
  t.integer "country_id"
@@ -898,28 +776,28 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
898
776
  t.index ["term"], name: "index_places_on_term"
899
777
  end
900
778
 
901
- create_table "produce_types", force: :cascade do |t|
779
+ create_table "produce_types", id: :serial, force: :cascade do |t|
902
780
  t.string "name"
903
781
  t.text "display_name"
904
782
  t.text "note"
905
783
  t.integer "position"
906
784
  t.datetime "created_at"
907
785
  t.datetime "updated_at"
786
+ t.jsonb "display_name_translations", default: {}, null: false
908
787
  end
909
788
 
910
- create_table "produces", force: :cascade do |t|
789
+ create_table "produces", id: :serial, force: :cascade do |t|
911
790
  t.integer "agent_id", null: false
912
791
  t.integer "manifestation_id", null: false
913
- t.integer "position", default: 1, null: false
792
+ t.integer "position"
914
793
  t.datetime "created_at"
915
794
  t.datetime "updated_at"
916
795
  t.integer "produce_type_id"
917
- t.json "full_name_translations", default: {}
918
796
  t.index ["agent_id"], name: "index_produces_on_agent_id"
919
797
  t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
920
798
  end
921
799
 
922
- create_table "profiles", force: :cascade do |t|
800
+ create_table "profiles", id: :serial, force: :cascade do |t|
923
801
  t.integer "user_id"
924
802
  t.integer "user_group_id"
925
803
  t.integer "library_id"
@@ -934,52 +812,55 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
934
812
  t.datetime "expired_at"
935
813
  t.text "full_name_transcription"
936
814
  t.datetime "date_of_birth"
815
+ t.jsonb "full_name_translations", default: {}, null: false
937
816
  t.index ["library_id"], name: "index_profiles_on_library_id"
938
817
  t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
939
818
  t.index ["user_id"], name: "index_profiles_on_user_id"
940
819
  t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
941
820
  end
942
821
 
943
- create_table "realize_types", force: :cascade do |t|
822
+ create_table "realize_types", id: :serial, force: :cascade do |t|
944
823
  t.string "name"
945
824
  t.text "display_name"
946
825
  t.text "note"
947
826
  t.integer "position"
948
827
  t.datetime "created_at"
949
828
  t.datetime "updated_at"
829
+ t.jsonb "display_name_translations", default: {}, null: false
950
830
  end
951
831
 
952
- create_table "realizes", force: :cascade do |t|
832
+ create_table "realizes", id: :serial, force: :cascade do |t|
953
833
  t.integer "agent_id", null: false
954
834
  t.integer "expression_id", null: false
955
- t.integer "position", default: 1, null: false
835
+ t.integer "position"
956
836
  t.datetime "created_at"
957
837
  t.datetime "updated_at"
958
838
  t.integer "realize_type_id"
959
- t.json "full_name_translations", default: {}
960
839
  t.index ["agent_id"], name: "index_realizes_on_agent_id"
961
840
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
962
841
  end
963
842
 
964
- create_table "request_status_types", force: :cascade do |t|
843
+ create_table "request_status_types", id: :serial, force: :cascade do |t|
965
844
  t.string "name", null: false
966
845
  t.text "display_name"
967
846
  t.text "note"
968
- t.integer "position", default: 1, null: false
847
+ t.integer "position"
969
848
  t.datetime "created_at"
970
849
  t.datetime "updated_at"
850
+ t.jsonb "display_name_translations", default: {}, null: false
971
851
  end
972
852
 
973
- create_table "request_types", force: :cascade do |t|
853
+ create_table "request_types", id: :serial, force: :cascade do |t|
974
854
  t.string "name", null: false
975
855
  t.text "display_name"
976
856
  t.text "note"
977
- t.integer "position", default: 1, null: false
857
+ t.integer "position"
978
858
  t.datetime "created_at"
979
859
  t.datetime "updated_at"
860
+ t.jsonb "display_name_translations", default: {}, null: false
980
861
  end
981
862
 
982
- create_table "resource_export_file_transitions", force: :cascade do |t|
863
+ create_table "resource_export_file_transitions", id: :serial, force: :cascade do |t|
983
864
  t.string "to_state"
984
865
  t.text "metadata", default: "{}"
985
866
  t.integer "sort_key"
@@ -992,18 +873,18 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
992
873
  t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
993
874
  end
994
875
 
995
- create_table "resource_export_files", force: :cascade do |t|
876
+ create_table "resource_export_files", id: :serial, force: :cascade do |t|
996
877
  t.integer "user_id"
997
878
  t.string "resource_export_file_name"
998
879
  t.string "resource_export_content_type"
999
- t.integer "resource_export_file_size"
880
+ t.bigint "resource_export_file_size"
1000
881
  t.datetime "resource_export_updated_at"
1001
882
  t.datetime "executed_at"
1002
883
  t.datetime "created_at"
1003
884
  t.datetime "updated_at"
1004
885
  end
1005
886
 
1006
- create_table "resource_import_file_transitions", force: :cascade do |t|
887
+ create_table "resource_import_file_transitions", id: :serial, force: :cascade do |t|
1007
888
  t.string "to_state"
1008
889
  t.text "metadata", default: "{}"
1009
890
  t.integer "sort_key"
@@ -1016,7 +897,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1016
897
  t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
1017
898
  end
1018
899
 
1019
- create_table "resource_import_files", force: :cascade do |t|
900
+ create_table "resource_import_files", id: :serial, force: :cascade do |t|
1020
901
  t.integer "parent_id"
1021
902
  t.string "content_type"
1022
903
  t.integer "size"
@@ -1038,7 +919,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1038
919
  t.index ["user_id"], name: "index_resource_import_files_on_user_id"
1039
920
  end
1040
921
 
1041
- create_table "resource_import_results", force: :cascade do |t|
922
+ create_table "resource_import_results", id: :serial, force: :cascade do |t|
1042
923
  t.integer "resource_import_file_id"
1043
924
  t.integer "manifestation_id"
1044
925
  t.integer "item_id"
@@ -1051,7 +932,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1051
932
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
1052
933
  end
1053
934
 
1054
- create_table "roles", force: :cascade do |t|
935
+ create_table "roles", id: :serial, force: :cascade do |t|
1055
936
  t.string "name", null: false
1056
937
  t.string "display_name"
1057
938
  t.text "note"
@@ -1059,9 +940,10 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1059
940
  t.datetime "updated_at"
1060
941
  t.integer "score", default: 0, null: false
1061
942
  t.integer "position"
943
+ t.jsonb "display_name_translations", default: {}, null: false
1062
944
  end
1063
945
 
1064
- create_table "search_engines", force: :cascade do |t|
946
+ create_table "search_engines", id: :serial, force: :cascade do |t|
1065
947
  t.string "name", null: false
1066
948
  t.text "display_name"
1067
949
  t.string "url", null: false
@@ -1070,18 +952,19 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1070
952
  t.text "query_param", null: false
1071
953
  t.text "additional_param"
1072
954
  t.text "note"
1073
- t.integer "position", default: 1, null: false
955
+ t.integer "position"
1074
956
  t.datetime "created_at"
1075
957
  t.datetime "updated_at"
958
+ t.jsonb "display_name_translations", default: {}, null: false
1076
959
  end
1077
960
 
1078
- create_table "series_statement_merge_lists", force: :cascade do |t|
961
+ create_table "series_statement_merge_lists", id: :serial, force: :cascade do |t|
1079
962
  t.string "title"
1080
963
  t.datetime "created_at"
1081
964
  t.datetime "updated_at"
1082
965
  end
1083
966
 
1084
- create_table "series_statement_merges", force: :cascade do |t|
967
+ create_table "series_statement_merges", id: :serial, force: :cascade do |t|
1085
968
  t.integer "series_statement_id", null: false
1086
969
  t.integer "series_statement_merge_list_id", null: false
1087
970
  t.datetime "created_at"
@@ -1090,7 +973,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1090
973
  t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
1091
974
  end
1092
975
 
1093
- create_table "series_statements", force: :cascade do |t|
976
+ create_table "series_statements", id: :serial, force: :cascade do |t|
1094
977
  t.text "original_title"
1095
978
  t.text "numbering"
1096
979
  t.text "title_subseries"
@@ -1114,21 +997,22 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1114
997
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
1115
998
  end
1116
999
 
1117
- create_table "shelves", force: :cascade do |t|
1000
+ create_table "shelves", id: :serial, force: :cascade do |t|
1118
1001
  t.string "name", null: false
1119
1002
  t.text "display_name"
1120
1003
  t.text "note"
1121
1004
  t.integer "library_id", null: false
1122
1005
  t.integer "items_count", default: 0, null: false
1123
- t.integer "position", default: 1, null: false
1006
+ t.integer "position"
1124
1007
  t.datetime "created_at"
1125
1008
  t.datetime "updated_at"
1126
1009
  t.datetime "deleted_at"
1127
1010
  t.boolean "closed", default: false, null: false
1011
+ t.jsonb "display_name_translations", default: {}, null: false
1128
1012
  t.index ["library_id"], name: "index_shelves_on_library_id"
1129
1013
  end
1130
1014
 
1131
- create_table "subscribes", force: :cascade do |t|
1015
+ create_table "subscribes", id: :serial, force: :cascade do |t|
1132
1016
  t.integer "subscription_id", null: false
1133
1017
  t.integer "work_id", null: false
1134
1018
  t.datetime "start_at", null: false
@@ -1139,7 +1023,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1139
1023
  t.index ["work_id"], name: "index_subscribes_on_work_id"
1140
1024
  end
1141
1025
 
1142
- create_table "subscriptions", force: :cascade do |t|
1026
+ create_table "subscriptions", id: :serial, force: :cascade do |t|
1143
1027
  t.text "title", null: false
1144
1028
  t.text "note"
1145
1029
  t.integer "user_id"
@@ -1152,7 +1036,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1152
1036
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1153
1037
  end
1154
1038
 
1155
- create_table "user_export_file_transitions", force: :cascade do |t|
1039
+ create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1156
1040
  t.string "to_state"
1157
1041
  t.text "metadata", default: "{}"
1158
1042
  t.integer "sort_key"
@@ -1166,11 +1050,11 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1166
1050
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1167
1051
  end
1168
1052
 
1169
- create_table "user_export_files", force: :cascade do |t|
1053
+ create_table "user_export_files", id: :serial, force: :cascade do |t|
1170
1054
  t.integer "user_id"
1171
1055
  t.string "user_export_file_name"
1172
1056
  t.string "user_export_content_type"
1173
- t.integer "user_export_file_size"
1057
+ t.bigint "user_export_file_size"
1174
1058
  t.datetime "user_export_updated_at"
1175
1059
  t.datetime "executed_at"
1176
1060
  t.datetime "created_at"
@@ -1178,22 +1062,20 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1178
1062
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1179
1063
  end
1180
1064
 
1181
- create_table "user_groups", force: :cascade do |t|
1065
+ create_table "user_groups", id: :serial, force: :cascade do |t|
1182
1066
  t.string "name"
1183
1067
  t.text "display_name"
1184
1068
  t.text "note"
1185
- t.integer "position", default: 1, null: false
1069
+ t.integer "position"
1186
1070
  t.datetime "created_at"
1187
1071
  t.datetime "updated_at"
1188
1072
  t.datetime "deleted_at"
1189
1073
  t.integer "valid_period_for_new_user", default: 0, null: false
1190
1074
  t.datetime "expired_at"
1191
- t.integer "number_of_day_to_notify_overdue", default: 1, null: false
1192
- t.integer "number_of_day_to_notify_due_date", default: 7, null: false
1193
- t.integer "number_of_time_to_notify_overdue", default: 3, null: false
1075
+ t.jsonb "display_name_translations", default: {}, null: false
1194
1076
  end
1195
1077
 
1196
- create_table "user_has_roles", force: :cascade do |t|
1078
+ create_table "user_has_roles", id: :serial, force: :cascade do |t|
1197
1079
  t.integer "user_id", null: false
1198
1080
  t.integer "role_id", null: false
1199
1081
  t.datetime "created_at"
@@ -1202,7 +1084,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1202
1084
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1203
1085
  end
1204
1086
 
1205
- create_table "user_import_file_transitions", force: :cascade do |t|
1087
+ create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1206
1088
  t.string "to_state"
1207
1089
  t.text "metadata", default: "{}"
1208
1090
  t.integer "sort_key"
@@ -1215,7 +1097,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1215
1097
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1216
1098
  end
1217
1099
 
1218
- create_table "user_import_files", force: :cascade do |t|
1100
+ create_table "user_import_files", id: :serial, force: :cascade do |t|
1219
1101
  t.integer "user_id"
1220
1102
  t.text "note"
1221
1103
  t.datetime "executed_at"
@@ -1234,7 +1116,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1234
1116
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1235
1117
  end
1236
1118
 
1237
- create_table "user_import_results", force: :cascade do |t|
1119
+ create_table "user_import_results", id: :serial, force: :cascade do |t|
1238
1120
  t.integer "user_import_file_id"
1239
1121
  t.integer "user_id"
1240
1122
  t.text "body"
@@ -1245,7 +1127,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1245
1127
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1246
1128
  end
1247
1129
 
1248
- create_table "users", force: :cascade do |t|
1130
+ create_table "users", id: :serial, force: :cascade do |t|
1249
1131
  t.string "email", default: "", null: false
1250
1132
  t.string "encrypted_password", default: "", null: false
1251
1133
  t.string "reset_password_token"
@@ -1265,23 +1147,15 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1265
1147
  t.string "unlock_token"
1266
1148
  t.datetime "locked_at"
1267
1149
  t.datetime "confirmed_at"
1150
+ t.bigint "profile_id"
1268
1151
  t.index ["email"], name: "index_users_on_email"
1152
+ t.index ["profile_id"], name: "index_users_on_profile_id"
1269
1153
  t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1270
1154
  t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1271
1155
  t.index ["username"], name: "index_users_on_username", unique: true
1272
1156
  end
1273
1157
 
1274
- create_table "versions", force: :cascade do |t|
1275
- t.string "item_type", null: false
1276
- t.integer "item_id", null: false
1277
- t.string "event", null: false
1278
- t.string "whodunnit"
1279
- t.text "object"
1280
- t.datetime "created_at"
1281
- t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1282
- end
1283
-
1284
- create_table "withdraws", force: :cascade do |t|
1158
+ create_table "withdraws", id: :serial, force: :cascade do |t|
1285
1159
  t.integer "basket_id"
1286
1160
  t.integer "item_id"
1287
1161
  t.integer "librarian_id"
@@ -1292,4 +1166,12 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1292
1166
  t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1293
1167
  end
1294
1168
 
1169
+ add_foreign_key "events", "event_categories"
1170
+ add_foreign_key "items", "manifestations"
1171
+ add_foreign_key "libraries", "library_groups"
1172
+ add_foreign_key "library_groups", "users"
1173
+ add_foreign_key "profiles", "users"
1174
+ add_foreign_key "user_has_roles", "roles"
1175
+ add_foreign_key "user_has_roles", "users"
1176
+ add_foreign_key "users", "profiles"
1295
1177
  end