enju_message 0.3.4 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/Rakefile +1 -1
  4. data/app/controllers/message_requests_controller.rb +2 -2
  5. data/app/models/message.rb +2 -2
  6. data/app/models/message_request.rb +3 -2
  7. data/app/models/message_request_transition.rb +2 -2
  8. data/app/models/message_template.rb +2 -2
  9. data/app/models/message_transition.rb +2 -2
  10. data/app/views/message_requests/edit.html.erb +3 -3
  11. data/app/views/message_requests/index.html.erb +2 -2
  12. data/app/views/message_requests/new.html.erb +1 -1
  13. data/app/views/message_requests/show.html.erb +2 -2
  14. data/db/migrate/149_create_message_templates.rb +8 -3
  15. data/db/migrate/154_create_messages.rb +8 -4
  16. data/db/migrate/20080819181903_create_message_requests.rb +7 -2
  17. data/db/migrate/20110913115320_add_lft_and_rgt_to_message.rb +7 -2
  18. data/db/migrate/20120125050502_add_depth_to_message.rb +2 -1
  19. data/db/migrate/20140518111006_create_message_transitions.rb +8 -3
  20. data/db/migrate/20140518135713_create_message_request_transitions.rb +8 -3
  21. data/db/migrate/20160703185015_add_most_recent_to_message_transitions.rb +1 -1
  22. data/db/migrate/20160814165332_add_most_recent_to_message_request_transitions.rb +1 -1
  23. data/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +1 -1
  24. data/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +1 -1
  25. data/lib/enju_message/version.rb +1 -1
  26. data/spec/controllers/messages_controller_spec.rb +1 -2
  27. data/spec/dummy/config/database.yml +70 -9
  28. data/spec/dummy/db/development.sqlite3 +0 -0
  29. data/spec/dummy/db/migrate/005_create_manifestations.rb +3 -3
  30. data/spec/dummy/db/migrate/113_create_events.rb +21 -0
  31. data/spec/dummy/db/migrate/114_create_event_categories.rb +16 -0
  32. data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +23 -0
  33. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +15 -0
  34. data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +15 -0
  35. data/spec/dummy/db/migrate/20120413051535_add_event_import_fingerprint_to_event_import_file.rb +5 -0
  36. data/spec/dummy/db/migrate/20120413170734_add_error_message_to_event_import_file.rb +5 -0
  37. data/spec/dummy/db/migrate/20120415060342_rename_event_import_file_imported_at_to_executed_at.rb +9 -0
  38. data/spec/dummy/db/migrate/20140523171309_create_event_import_file_transitions.rb +18 -0
  39. data/spec/dummy/db/migrate/20140628071719_add_user_encoding_to_event_import_file.rb +5 -0
  40. data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +5 -0
  41. data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +11 -0
  42. data/spec/dummy/db/migrate/20140812153137_create_event_export_file_transitions.rb +18 -0
  43. data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +5 -0
  44. data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
  45. data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
  46. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +8 -0
  47. data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
  48. data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
  49. data/spec/dummy/db/migrate/20180107161311_add_constraints_to_most_recent_for_agent_import_file_transitions.rb +1 -1
  50. data/spec/dummy/db/migrate/20180107161331_add_constraints_to_most_recent_for_resource_import_file_transitions.rb +1 -1
  51. data/spec/dummy/db/migrate/20180107161347_add_constraints_to_most_recent_for_resource_export_file_transitions.rb +1 -1
  52. data/spec/dummy/db/migrate/20180107161410_add_constraints_to_most_recent_for_import_request_transitions.rb +1 -1
  53. data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
  54. data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
  55. data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
  56. data/spec/dummy/db/migrate/20190102034126_create_doi_records.rb +13 -0
  57. data/spec/dummy/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  58. data/spec/dummy/db/migrate/{20181026064038_add_login_banner_to_library_group.rb → 20190630115523_add_login_banner_translations_to_library_group.rb} +1 -1
  59. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  60. data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  61. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  62. data/spec/dummy/db/schema.rb +265 -133
  63. data/spec/dummy/db/test.sqlite3 +0 -0
  64. data/spec/fixtures/agents.yml +29 -30
  65. data/spec/fixtures/libraries.yml +28 -30
  66. data/spec/fixtures/library_groups.yml +36 -19
  67. data/spec/fixtures/message_request_transitions.yml +2 -2
  68. data/spec/fixtures/message_requests.yml +3 -2
  69. data/spec/fixtures/message_templates.yml +2 -2
  70. data/spec/fixtures/messages.yml +3 -3
  71. data/spec/fixtures/roles.yml +22 -5
  72. data/spec/fixtures/shelves.yml +45 -0
  73. data/spec/fixtures/user_groups.yml +23 -5
  74. data/spec/fixtures/users.yml +1 -1
  75. data/spec/models/message_request_spec.rb +13 -3
  76. data/spec/models/message_spec.rb +2 -2
  77. data/spec/models/message_template_spec.rb +2 -2
  78. data/spec/rails_helper.rb +5 -1
  79. metadata +276 -302
  80. data/spec/dummy/app/jobs/application_job.rb +0 -7
  81. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +0 -14
  82. data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +0 -5
  83. data/spec/dummy/db/migrate/20170114174536_add_profile_id_to_user.rb +0 -5
  84. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  85. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  86. data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +0 -12
@@ -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: 2019_12_19_122214) do
13
+ ActiveRecord::Schema.define(version: 2019_07_12_163038) 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"
@@ -26,8 +30,8 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
26
30
  create_table "active_storage_attachments", force: :cascade do |t|
27
31
  t.string "name", null: false
28
32
  t.string "record_type", null: false
29
- t.integer "record_id", null: false
30
- t.integer "blob_id", null: false
33
+ t.bigint "record_id", null: false
34
+ t.bigint "blob_id", null: false
31
35
  t.datetime "created_at", null: false
32
36
  t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
33
37
  t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
@@ -44,7 +48,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
44
48
  t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
45
49
  end
46
50
 
47
- create_table "agent_import_file_transitions", force: :cascade do |t|
51
+ create_table "agent_import_file_transitions", id: :serial, force: :cascade do |t|
48
52
  t.string "to_state"
49
53
  t.text "metadata", default: "{}"
50
54
  t.integer "sort_key"
@@ -57,7 +61,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
57
61
  t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
58
62
  end
59
63
 
60
- create_table "agent_import_files", force: :cascade do |t|
64
+ create_table "agent_import_files", id: :serial, force: :cascade do |t|
61
65
  t.integer "parent_id"
62
66
  t.string "content_type"
63
67
  t.integer "size"
@@ -78,7 +82,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
78
82
  t.index ["user_id"], name: "index_agent_import_files_on_user_id"
79
83
  end
80
84
 
81
- create_table "agent_import_results", force: :cascade do |t|
85
+ create_table "agent_import_results", id: :serial, force: :cascade do |t|
82
86
  t.integer "agent_import_file_id"
83
87
  t.integer "agent_id"
84
88
  t.text "body"
@@ -86,13 +90,13 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
86
90
  t.datetime "updated_at"
87
91
  end
88
92
 
89
- create_table "agent_merge_lists", force: :cascade do |t|
93
+ create_table "agent_merge_lists", id: :serial, force: :cascade do |t|
90
94
  t.string "title"
91
95
  t.datetime "created_at"
92
96
  t.datetime "updated_at"
93
97
  end
94
98
 
95
- create_table "agent_merges", force: :cascade do |t|
99
+ create_table "agent_merges", id: :serial, force: :cascade do |t|
96
100
  t.integer "agent_id", null: false
97
101
  t.integer "agent_merge_list_id", null: false
98
102
  t.datetime "created_at"
@@ -101,16 +105,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
101
105
  t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
102
106
  end
103
107
 
104
- create_table "agent_relationship_types", force: :cascade do |t|
108
+ create_table "agent_relationship_types", id: :serial, force: :cascade do |t|
105
109
  t.string "name", null: false
106
110
  t.text "display_name"
107
111
  t.text "note"
108
112
  t.integer "position"
109
113
  t.datetime "created_at"
110
114
  t.datetime "updated_at"
115
+ t.jsonb "display_name_translations", default: {}, null: false
111
116
  end
112
117
 
113
- create_table "agent_relationships", force: :cascade do |t|
118
+ create_table "agent_relationships", id: :serial, force: :cascade do |t|
114
119
  t.integer "parent_id"
115
120
  t.integer "child_id"
116
121
  t.integer "agent_relationship_type_id"
@@ -121,16 +126,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
121
126
  t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
122
127
  end
123
128
 
124
- create_table "agent_types", force: :cascade do |t|
129
+ create_table "agent_types", id: :serial, force: :cascade do |t|
125
130
  t.string "name", null: false
126
131
  t.text "display_name"
127
132
  t.text "note"
128
133
  t.integer "position", default: 1, null: false
129
134
  t.datetime "created_at"
130
135
  t.datetime "updated_at"
136
+ t.jsonb "display_name_translations", default: {}, null: false
131
137
  end
132
138
 
133
- create_table "agents", force: :cascade do |t|
139
+ create_table "agents", id: :serial, force: :cascade do |t|
134
140
  t.string "last_name"
135
141
  t.string "middle_name"
136
142
  t.string "first_name"
@@ -185,7 +191,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
185
191
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
186
192
  end
187
193
 
188
- create_table "baskets", force: :cascade do |t|
194
+ create_table "baskets", id: :serial, force: :cascade do |t|
189
195
  t.integer "user_id"
190
196
  t.text "note"
191
197
  t.integer "lock_version", default: 0, null: false
@@ -194,7 +200,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
194
200
  t.index ["user_id"], name: "index_baskets_on_user_id"
195
201
  end
196
202
 
197
- create_table "bookstores", force: :cascade do |t|
203
+ create_table "bookstores", id: :serial, force: :cascade do |t|
198
204
  t.text "name", null: false
199
205
  t.string "zip_code"
200
206
  t.text "address"
@@ -208,16 +214,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
208
214
  t.datetime "updated_at"
209
215
  end
210
216
 
211
- create_table "budget_types", force: :cascade do |t|
217
+ create_table "budget_types", id: :serial, force: :cascade do |t|
212
218
  t.string "name"
213
219
  t.text "display_name"
214
220
  t.text "note"
215
221
  t.integer "position", default: 1, null: false
216
222
  t.datetime "created_at"
217
223
  t.datetime "updated_at"
224
+ t.jsonb "display_name_translations", default: {}, null: false
218
225
  end
219
226
 
220
- create_table "carrier_types", force: :cascade do |t|
227
+ create_table "carrier_types", id: :serial, force: :cascade do |t|
221
228
  t.string "name", null: false
222
229
  t.text "display_name"
223
230
  t.text "note"
@@ -226,11 +233,12 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
226
233
  t.datetime "updated_at"
227
234
  t.string "attachment_file_name"
228
235
  t.string "attachment_content_type"
229
- t.integer "attachment_file_size"
236
+ t.bigint "attachment_file_size"
230
237
  t.datetime "attachment_updated_at"
238
+ t.jsonb "display_name_translations", default: {}, null: false
231
239
  end
232
240
 
233
- create_table "colors", force: :cascade do |t|
241
+ create_table "colors", id: :serial, force: :cascade do |t|
234
242
  t.integer "library_group_id"
235
243
  t.string "property"
236
244
  t.string "code"
@@ -240,16 +248,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
240
248
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
241
249
  end
242
250
 
243
- create_table "content_types", force: :cascade do |t|
251
+ create_table "content_types", id: :serial, force: :cascade do |t|
244
252
  t.string "name", null: false
245
253
  t.text "display_name"
246
254
  t.text "note"
247
255
  t.integer "position", default: 1, null: false
248
256
  t.datetime "created_at"
249
257
  t.datetime "updated_at"
258
+ t.jsonb "display_name_translations", default: {}, null: false
250
259
  end
251
260
 
252
- create_table "countries", force: :cascade do |t|
261
+ create_table "countries", id: :serial, force: :cascade do |t|
253
262
  t.string "name", null: false
254
263
  t.text "display_name"
255
264
  t.string "alpha_2"
@@ -263,16 +272,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
263
272
  t.index ["numeric_3"], name: "index_countries_on_numeric_3"
264
273
  end
265
274
 
266
- create_table "create_types", force: :cascade do |t|
275
+ create_table "create_types", id: :serial, force: :cascade do |t|
267
276
  t.string "name"
268
277
  t.text "display_name"
269
278
  t.text "note"
270
279
  t.integer "position"
271
280
  t.datetime "created_at"
272
281
  t.datetime "updated_at"
282
+ t.jsonb "display_name_translations", default: {}, null: false
273
283
  end
274
284
 
275
- create_table "creates", force: :cascade do |t|
285
+ create_table "creates", id: :serial, force: :cascade do |t|
276
286
  t.integer "agent_id", null: false
277
287
  t.integer "work_id", null: false
278
288
  t.integer "position", default: 1, null: false
@@ -283,16 +293,19 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
283
293
  t.index ["work_id"], name: "index_creates_on_work_id"
284
294
  end
285
295
 
286
- create_table "custom_properties", force: :cascade do |t|
287
- t.integer "resource_id", null: false
288
- t.string "resource_type", null: false
289
- t.text "label", null: false
290
- t.text "value"
296
+ create_table "doi_records", force: :cascade do |t|
297
+ t.string "body", null: false
298
+ t.string "display_body", null: false
299
+ t.string "source"
300
+ t.jsonb "response", default: {}, null: false
301
+ t.bigint "manifestation_id", null: false
291
302
  t.datetime "created_at", null: false
292
303
  t.datetime "updated_at", null: false
304
+ t.index ["body"], name: "index_doi_records_on_body", unique: true
305
+ t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id"
293
306
  end
294
307
 
295
- create_table "donates", force: :cascade do |t|
308
+ create_table "donates", id: :serial, force: :cascade do |t|
296
309
  t.integer "agent_id", null: false
297
310
  t.integer "item_id", null: false
298
311
  t.datetime "created_at"
@@ -301,7 +314,105 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
301
314
  t.index ["item_id"], name: "index_donates_on_item_id"
302
315
  end
303
316
 
304
- create_table "exemplifies", force: :cascade do |t|
317
+ create_table "event_categories", id: :serial, force: :cascade do |t|
318
+ t.string "name", null: false
319
+ t.text "display_name"
320
+ t.text "note"
321
+ t.integer "position"
322
+ t.datetime "created_at"
323
+ t.datetime "updated_at"
324
+ t.jsonb "display_name_translations", default: {}, null: false
325
+ end
326
+
327
+ create_table "event_export_file_transitions", id: :serial, force: :cascade do |t|
328
+ t.string "to_state"
329
+ t.text "metadata", default: "{}"
330
+ t.integer "sort_key"
331
+ t.integer "event_export_file_id"
332
+ t.datetime "created_at"
333
+ t.datetime "updated_at"
334
+ t.boolean "most_recent", null: false
335
+ t.index ["event_export_file_id", "most_recent"], name: "index_event_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
336
+ t.index ["event_export_file_id"], name: "index_event_export_file_transitions_on_file_id"
337
+ t.index ["sort_key", "event_export_file_id"], name: "index_event_export_file_transitions_on_sort_key_and_file_id", unique: true
338
+ end
339
+
340
+ create_table "event_export_files", id: :serial, force: :cascade do |t|
341
+ t.integer "user_id"
342
+ t.string "event_export_file_name"
343
+ t.string "event_export_content_type"
344
+ t.bigint "event_export_file_size"
345
+ t.datetime "event_export_updated_at"
346
+ t.datetime "executed_at"
347
+ t.datetime "created_at"
348
+ t.datetime "updated_at"
349
+ t.index ["user_id"], name: "index_event_export_files_on_user_id"
350
+ end
351
+
352
+ create_table "event_import_file_transitions", id: :serial, force: :cascade do |t|
353
+ t.string "to_state"
354
+ t.text "metadata", default: "{}"
355
+ t.integer "sort_key"
356
+ t.integer "event_import_file_id"
357
+ t.datetime "created_at"
358
+ t.datetime "updated_at"
359
+ t.boolean "most_recent", null: false
360
+ t.index ["event_import_file_id", "most_recent"], name: "index_event_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
361
+ t.index ["event_import_file_id"], name: "index_event_import_file_transitions_on_event_import_file_id"
362
+ t.index ["sort_key", "event_import_file_id"], name: "index_event_import_file_transitions_on_sort_key_and_file_id", unique: true
363
+ end
364
+
365
+ create_table "event_import_files", id: :serial, force: :cascade do |t|
366
+ t.integer "parent_id"
367
+ t.string "content_type"
368
+ t.integer "size"
369
+ t.integer "user_id"
370
+ t.text "note"
371
+ t.datetime "executed_at"
372
+ t.string "event_import_file_name"
373
+ t.string "event_import_content_type"
374
+ t.integer "event_import_file_size"
375
+ t.datetime "event_import_updated_at"
376
+ t.string "edit_mode"
377
+ t.datetime "created_at"
378
+ t.datetime "updated_at"
379
+ t.string "event_import_fingerprint"
380
+ t.text "error_message"
381
+ t.string "user_encoding"
382
+ t.integer "default_library_id"
383
+ t.integer "default_event_category_id"
384
+ t.index ["parent_id"], name: "index_event_import_files_on_parent_id"
385
+ t.index ["user_id"], name: "index_event_import_files_on_user_id"
386
+ end
387
+
388
+ create_table "event_import_results", id: :serial, force: :cascade do |t|
389
+ t.integer "event_import_file_id"
390
+ t.integer "event_id"
391
+ t.text "body"
392
+ t.datetime "created_at"
393
+ t.datetime "updated_at"
394
+ end
395
+
396
+ create_table "events", id: :serial, force: :cascade do |t|
397
+ t.integer "library_id", null: false
398
+ t.integer "event_category_id", null: false
399
+ t.string "name"
400
+ t.text "note"
401
+ t.datetime "start_at"
402
+ t.datetime "end_at"
403
+ t.boolean "all_day", default: false, null: false
404
+ t.datetime "deleted_at"
405
+ t.text "display_name"
406
+ t.datetime "created_at"
407
+ t.datetime "updated_at"
408
+ t.integer "place_id"
409
+ t.jsonb "display_name_translations", default: {}, null: false
410
+ t.index ["event_category_id"], name: "index_events_on_event_category_id"
411
+ t.index ["library_id"], name: "index_events_on_library_id"
412
+ t.index ["place_id"], name: "index_events_on_place_id"
413
+ end
414
+
415
+ create_table "exemplifies", id: :serial, force: :cascade do |t|
305
416
  t.integer "manifestation_id", null: false
306
417
  t.integer "item_id", null: false
307
418
  t.integer "position"
@@ -311,7 +422,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
311
422
  t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
312
423
  end
313
424
 
314
- create_table "extents", force: :cascade do |t|
425
+ create_table "extents", id: :serial, force: :cascade do |t|
315
426
  t.string "name", null: false
316
427
  t.text "display_name"
317
428
  t.text "note"
@@ -320,25 +431,27 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
320
431
  t.datetime "updated_at"
321
432
  end
322
433
 
323
- create_table "form_of_works", force: :cascade do |t|
434
+ create_table "form_of_works", id: :serial, force: :cascade do |t|
324
435
  t.string "name", null: false
325
436
  t.text "display_name"
326
437
  t.text "note"
327
438
  t.integer "position", default: 1, null: false
328
439
  t.datetime "created_at"
329
440
  t.datetime "updated_at"
441
+ t.jsonb "display_name_translations", default: {}, null: false
330
442
  end
331
443
 
332
- create_table "frequencies", force: :cascade do |t|
444
+ create_table "frequencies", id: :serial, force: :cascade do |t|
333
445
  t.string "name", null: false
334
446
  t.text "display_name"
335
447
  t.text "note"
336
448
  t.integer "position", default: 1, null: false
337
449
  t.datetime "created_at"
338
450
  t.datetime "updated_at"
451
+ t.jsonb "display_name_translations", default: {}, null: false
339
452
  end
340
453
 
341
- create_table "identifier_types", force: :cascade do |t|
454
+ create_table "identifier_types", id: :serial, force: :cascade do |t|
342
455
  t.string "name"
343
456
  t.text "display_name"
344
457
  t.text "note"
@@ -347,7 +460,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
347
460
  t.datetime "updated_at"
348
461
  end
349
462
 
350
- create_table "identifiers", force: :cascade do |t|
463
+ create_table "identifiers", id: :serial, force: :cascade do |t|
351
464
  t.string "body", null: false
352
465
  t.integer "identifier_type_id", null: false
353
466
  t.integer "manifestation_id"
@@ -359,20 +472,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
359
472
  t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
360
473
  end
361
474
 
362
- create_table "identities", force: :cascade do |t|
363
- t.string "name"
364
- t.string "email"
365
- t.string "password_digest"
366
- t.integer "profile_id"
367
- t.datetime "created_at", null: false
368
- t.datetime "updated_at", null: false
369
- t.string "provider"
370
- t.index ["email"], name: "index_identities_on_email"
371
- t.index ["name"], name: "index_identities_on_name"
372
- t.index ["profile_id"], name: "index_identities_on_profile_id"
373
- end
374
-
375
- create_table "import_request_transitions", force: :cascade do |t|
475
+ create_table "import_request_transitions", id: :serial, force: :cascade do |t|
376
476
  t.string "to_state"
377
477
  t.text "metadata", default: "{}"
378
478
  t.integer "sort_key"
@@ -385,7 +485,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
385
485
  t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
386
486
  end
387
487
 
388
- create_table "import_requests", force: :cascade do |t|
488
+ create_table "import_requests", id: :serial, force: :cascade do |t|
389
489
  t.string "isbn"
390
490
  t.integer "manifestation_id"
391
491
  t.integer "user_id"
@@ -397,8 +497,8 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
397
497
  end
398
498
 
399
499
  create_table "isbn_record_and_manifestations", force: :cascade do |t|
400
- t.integer "isbn_record_id", null: false
401
- t.integer "manifestation_id", null: false
500
+ t.bigint "isbn_record_id", null: false
501
+ t.bigint "manifestation_id", null: false
402
502
  t.integer "position"
403
503
  t.datetime "created_at", null: false
404
504
  t.datetime "updated_at", null: false
@@ -416,8 +516,8 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
416
516
  end
417
517
 
418
518
  create_table "issn_record_and_manifestations", force: :cascade do |t|
419
- t.integer "issn_record_id", null: false
420
- t.integer "manifestation_id", null: false
519
+ t.bigint "issn_record_id", null: false
520
+ t.bigint "manifestation_id", null: false
421
521
  t.integer "position"
422
522
  t.datetime "created_at", null: false
423
523
  t.datetime "updated_at", null: false
@@ -434,7 +534,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
434
534
  t.index ["body"], name: "index_issn_records_on_body", unique: true
435
535
  end
436
536
 
437
- create_table "items", force: :cascade do |t|
537
+ create_table "items", id: :serial, force: :cascade do |t|
438
538
  t.string "call_number"
439
539
  t.string "item_identifier"
440
540
  t.datetime "created_at"
@@ -455,7 +555,6 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
455
555
  t.string "binding_call_number"
456
556
  t.datetime "binded_at"
457
557
  t.integer "manifestation_id", null: false
458
- t.text "memo"
459
558
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
460
559
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
461
560
  t.index ["item_identifier"], name: "index_items_on_item_identifier"
@@ -464,7 +563,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
464
563
  t.index ["shelf_id"], name: "index_items_on_shelf_id"
465
564
  end
466
565
 
467
- create_table "languages", force: :cascade do |t|
566
+ create_table "languages", id: :serial, force: :cascade do |t|
468
567
  t.string "name", null: false
469
568
  t.string "native_name"
470
569
  t.text "display_name"
@@ -473,13 +572,14 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
473
572
  t.string "iso_639_3"
474
573
  t.text "note"
475
574
  t.integer "position"
575
+ t.jsonb "display_name_translations", default: {}, null: false
476
576
  t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
477
577
  t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
478
578
  t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
479
579
  t.index ["name"], name: "index_languages_on_name", unique: true
480
580
  end
481
581
 
482
- create_table "libraries", force: :cascade do |t|
582
+ create_table "libraries", id: :serial, force: :cascade do |t|
483
583
  t.string "name", null: false
484
584
  t.text "display_name"
485
585
  t.string "short_display_name", null: false
@@ -504,22 +604,12 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
504
604
  t.string "isil"
505
605
  t.float "latitude"
506
606
  t.float "longitude"
607
+ t.jsonb "display_name_translations", default: {}, null: false
507
608
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
508
609
  t.index ["name"], name: "index_libraries_on_name"
509
610
  end
510
611
 
511
- create_table "library_group_translations", force: :cascade do |t|
512
- t.integer "library_group_id", null: false
513
- t.string "locale", null: false
514
- t.datetime "created_at", null: false
515
- t.datetime "updated_at", null: false
516
- t.text "login_banner"
517
- t.text "footer_banner"
518
- t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
519
- t.index ["locale"], name: "index_library_group_translations_on_locale"
520
- end
521
-
522
- create_table "library_groups", force: :cascade do |t|
612
+ create_table "library_groups", id: :serial, force: :cascade do |t|
523
613
  t.string "name", null: false
524
614
  t.text "display_name"
525
615
  t.string "short_name", null: false
@@ -541,34 +631,37 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
541
631
  t.boolean "csv_charset_conversion", default: false, null: false
542
632
  t.string "header_logo_file_name"
543
633
  t.string "header_logo_content_type"
544
- t.integer "header_logo_file_size"
634
+ t.bigint "header_logo_file_size"
545
635
  t.datetime "header_logo_updated_at"
546
636
  t.text "header_logo_meta"
547
- t.json "login_banner_translations", default: "\"{}\"", null: false
548
- t.json "footer_banner_translations", default: "\"{}\"", null: false
637
+ t.jsonb "display_name_translations", default: {}, null: false
638
+ t.jsonb "login_banner_translations", default: {}, null: false
639
+ t.jsonb "footer_banner_translations", default: {}, null: false
549
640
  t.index ["short_name"], name: "index_library_groups_on_short_name"
550
641
  t.index ["user_id"], name: "index_library_groups_on_user_id"
551
642
  end
552
643
 
553
- create_table "licenses", force: :cascade do |t|
644
+ create_table "licenses", id: :serial, force: :cascade do |t|
554
645
  t.string "name", null: false
555
646
  t.string "display_name"
556
647
  t.text "note"
557
648
  t.integer "position", default: 1, null: false
558
649
  t.datetime "created_at"
559
650
  t.datetime "updated_at"
651
+ t.jsonb "display_name_translations", default: {}, null: false
560
652
  end
561
653
 
562
- create_table "manifestation_relationship_types", force: :cascade do |t|
654
+ create_table "manifestation_relationship_types", id: :serial, force: :cascade do |t|
563
655
  t.string "name", null: false
564
656
  t.text "display_name"
565
657
  t.text "note"
566
658
  t.integer "position"
567
659
  t.datetime "created_at"
568
660
  t.datetime "updated_at"
661
+ t.jsonb "display_name_translations", default: {}, null: false
569
662
  end
570
663
 
571
- create_table "manifestation_relationships", force: :cascade do |t|
664
+ create_table "manifestation_relationships", id: :serial, force: :cascade do |t|
572
665
  t.integer "parent_id"
573
666
  t.integer "child_id"
574
667
  t.integer "manifestation_relationship_type_id"
@@ -579,7 +672,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
579
672
  t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
580
673
  end
581
674
 
582
- create_table "manifestations", force: :cascade do |t|
675
+ create_table "manifestations", id: :serial, force: :cascade do |t|
583
676
  t.text "original_title", null: false
584
677
  t.text "title_alternative"
585
678
  t.text "title_transcription"
@@ -639,73 +732,71 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
639
732
  t.text "extent_of_text"
640
733
  t.text "extent"
641
734
  t.text "dimensions"
642
- t.text "memo"
643
735
  t.index ["access_address"], name: "index_manifestations_on_access_address"
644
736
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
645
737
  t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
646
738
  t.index ["updated_at"], name: "index_manifestations_on_updated_at"
647
739
  end
648
740
 
649
- create_table "medium_of_performances", force: :cascade do |t|
741
+ create_table "medium_of_performances", id: :serial, force: :cascade do |t|
650
742
  t.string "name", null: false
651
743
  t.text "display_name"
652
744
  t.text "note"
653
745
  t.integer "position"
654
746
  t.datetime "created_at"
655
747
  t.datetime "updated_at"
748
+ t.jsonb "display_name_translations", default: {}, null: false
656
749
  end
657
750
 
658
- create_table "message_request_transitions", force: :cascade do |t|
751
+ create_table "message_request_transitions", id: :serial, force: :cascade do |t|
659
752
  t.string "to_state"
660
753
  t.text "metadata", default: "{}"
661
754
  t.integer "sort_key"
662
755
  t.integer "message_request_id"
663
- t.datetime "created_at", null: false
664
- t.datetime "updated_at", null: false
756
+ t.datetime "created_at"
757
+ t.datetime "updated_at"
665
758
  t.boolean "most_recent", null: false
666
759
  t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
667
760
  t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
668
761
  t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
669
762
  end
670
763
 
671
- create_table "message_requests", force: :cascade do |t|
764
+ create_table "message_requests", id: :serial, force: :cascade do |t|
672
765
  t.integer "sender_id"
673
766
  t.integer "receiver_id"
674
767
  t.integer "message_template_id"
675
768
  t.datetime "sent_at"
769
+ t.datetime "deleted_at"
676
770
  t.text "body"
677
- t.datetime "created_at", null: false
678
- t.datetime "updated_at", null: false
679
- t.index ["message_template_id"], name: "index_message_requests_on_message_template_id"
680
- t.index ["receiver_id"], name: "index_message_requests_on_receiver_id"
681
- t.index ["sender_id"], name: "index_message_requests_on_sender_id"
771
+ t.datetime "created_at"
772
+ t.datetime "updated_at"
682
773
  end
683
774
 
684
- create_table "message_templates", force: :cascade do |t|
775
+ create_table "message_templates", id: :serial, force: :cascade do |t|
685
776
  t.string "status", null: false
686
777
  t.text "title", null: false
687
778
  t.text "body", null: false
688
779
  t.integer "position"
689
780
  t.string "locale", default: "en"
690
- t.datetime "created_at", null: false
691
- t.datetime "updated_at", null: false
781
+ t.datetime "created_at"
782
+ t.datetime "updated_at"
692
783
  t.index ["status"], name: "index_message_templates_on_status", unique: true
693
784
  end
694
785
 
695
- create_table "message_transitions", force: :cascade do |t|
786
+ create_table "message_transitions", id: :serial, force: :cascade do |t|
696
787
  t.string "to_state"
697
788
  t.text "metadata", default: "{}"
698
789
  t.integer "sort_key"
699
790
  t.integer "message_id"
700
- t.datetime "created_at", null: false
701
- t.datetime "updated_at", null: false
791
+ t.datetime "created_at"
792
+ t.datetime "updated_at"
702
793
  t.boolean "most_recent", null: false
703
794
  t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
704
795
  t.index ["message_id"], name: "index_message_transitions_on_message_id"
705
796
  t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
706
797
  end
707
798
 
708
- create_table "messages", force: :cascade do |t|
799
+ create_table "messages", id: :serial, force: :cascade do |t|
709
800
  t.datetime "read_at"
710
801
  t.integer "sender_id"
711
802
  t.integer "receiver_id"
@@ -713,8 +804,8 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
713
804
  t.text "body"
714
805
  t.integer "message_request_id"
715
806
  t.integer "parent_id"
716
- t.datetime "created_at", null: false
717
- t.datetime "updated_at", null: false
807
+ t.datetime "created_at"
808
+ t.datetime "updated_at"
718
809
  t.integer "lft"
719
810
  t.integer "rgt"
720
811
  t.integer "depth"
@@ -724,7 +815,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
724
815
  t.index ["sender_id"], name: "index_messages_on_sender_id"
725
816
  end
726
817
 
727
- create_table "owns", force: :cascade do |t|
818
+ create_table "owns", id: :serial, force: :cascade do |t|
728
819
  t.integer "agent_id", null: false
729
820
  t.integer "item_id", null: false
730
821
  t.integer "position", default: 1, null: false
@@ -734,7 +825,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
734
825
  t.index ["item_id"], name: "index_owns_on_item_id"
735
826
  end
736
827
 
737
- create_table "picture_files", force: :cascade do |t|
828
+ create_table "participates", id: :serial, force: :cascade do |t|
829
+ t.integer "agent_id", null: false
830
+ t.integer "event_id", null: false
831
+ t.integer "position"
832
+ t.datetime "created_at"
833
+ t.datetime "updated_at"
834
+ t.index ["agent_id"], name: "index_participates_on_agent_id"
835
+ t.index ["event_id"], name: "index_participates_on_event_id"
836
+ end
837
+
838
+ create_table "picture_files", id: :serial, force: :cascade do |t|
738
839
  t.integer "picture_attachable_id"
739
840
  t.string "picture_attachable_type"
740
841
  t.string "content_type"
@@ -754,16 +855,29 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
754
855
  t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
755
856
  end
756
857
 
757
- create_table "produce_types", force: :cascade do |t|
858
+ create_table "places", id: :serial, force: :cascade do |t|
859
+ t.string "term"
860
+ t.text "city"
861
+ t.integer "country_id"
862
+ t.float "latitude"
863
+ t.float "longitude"
864
+ t.datetime "created_at", null: false
865
+ t.datetime "updated_at", null: false
866
+ t.index ["country_id"], name: "index_places_on_country_id"
867
+ t.index ["term"], name: "index_places_on_term"
868
+ end
869
+
870
+ create_table "produce_types", id: :serial, force: :cascade do |t|
758
871
  t.string "name"
759
872
  t.text "display_name"
760
873
  t.text "note"
761
874
  t.integer "position"
762
875
  t.datetime "created_at"
763
876
  t.datetime "updated_at"
877
+ t.jsonb "display_name_translations", default: {}, null: false
764
878
  end
765
879
 
766
- create_table "produces", force: :cascade do |t|
880
+ create_table "produces", id: :serial, force: :cascade do |t|
767
881
  t.integer "agent_id", null: false
768
882
  t.integer "manifestation_id", null: false
769
883
  t.integer "position", default: 1, null: false
@@ -774,7 +888,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
774
888
  t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
775
889
  end
776
890
 
777
- create_table "profiles", force: :cascade do |t|
891
+ create_table "profiles", id: :serial, force: :cascade do |t|
778
892
  t.integer "user_id"
779
893
  t.integer "user_group_id"
780
894
  t.integer "library_id"
@@ -795,16 +909,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
795
909
  t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
796
910
  end
797
911
 
798
- create_table "realize_types", force: :cascade do |t|
912
+ create_table "realize_types", id: :serial, force: :cascade do |t|
799
913
  t.string "name"
800
914
  t.text "display_name"
801
915
  t.text "note"
802
916
  t.integer "position"
803
917
  t.datetime "created_at"
804
918
  t.datetime "updated_at"
919
+ t.jsonb "display_name_translations", default: {}, null: false
805
920
  end
806
921
 
807
- create_table "realizes", force: :cascade do |t|
922
+ create_table "realizes", id: :serial, force: :cascade do |t|
808
923
  t.integer "agent_id", null: false
809
924
  t.integer "expression_id", null: false
810
925
  t.integer "position", default: 1, null: false
@@ -815,25 +930,27 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
815
930
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
816
931
  end
817
932
 
818
- create_table "request_status_types", force: :cascade do |t|
933
+ create_table "request_status_types", id: :serial, force: :cascade do |t|
819
934
  t.string "name", null: false
820
935
  t.text "display_name"
821
936
  t.text "note"
822
937
  t.integer "position", default: 1, null: false
823
938
  t.datetime "created_at"
824
939
  t.datetime "updated_at"
940
+ t.jsonb "display_name_translations", default: {}, null: false
825
941
  end
826
942
 
827
- create_table "request_types", force: :cascade do |t|
943
+ create_table "request_types", id: :serial, force: :cascade do |t|
828
944
  t.string "name", null: false
829
945
  t.text "display_name"
830
946
  t.text "note"
831
947
  t.integer "position", default: 1, null: false
832
948
  t.datetime "created_at"
833
949
  t.datetime "updated_at"
950
+ t.jsonb "display_name_translations", default: {}, null: false
834
951
  end
835
952
 
836
- create_table "resource_export_file_transitions", force: :cascade do |t|
953
+ create_table "resource_export_file_transitions", id: :serial, force: :cascade do |t|
837
954
  t.string "to_state"
838
955
  t.text "metadata", default: "{}"
839
956
  t.integer "sort_key"
@@ -846,18 +963,18 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
846
963
  t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
847
964
  end
848
965
 
849
- create_table "resource_export_files", force: :cascade do |t|
966
+ create_table "resource_export_files", id: :serial, force: :cascade do |t|
850
967
  t.integer "user_id"
851
968
  t.string "resource_export_file_name"
852
969
  t.string "resource_export_content_type"
853
- t.integer "resource_export_file_size"
970
+ t.bigint "resource_export_file_size"
854
971
  t.datetime "resource_export_updated_at"
855
972
  t.datetime "executed_at"
856
973
  t.datetime "created_at"
857
974
  t.datetime "updated_at"
858
975
  end
859
976
 
860
- create_table "resource_import_file_transitions", force: :cascade do |t|
977
+ create_table "resource_import_file_transitions", id: :serial, force: :cascade do |t|
861
978
  t.string "to_state"
862
979
  t.text "metadata", default: "{}"
863
980
  t.integer "sort_key"
@@ -870,7 +987,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
870
987
  t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
871
988
  end
872
989
 
873
- create_table "resource_import_files", force: :cascade do |t|
990
+ create_table "resource_import_files", id: :serial, force: :cascade do |t|
874
991
  t.integer "parent_id"
875
992
  t.string "content_type"
876
993
  t.integer "size"
@@ -892,7 +1009,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
892
1009
  t.index ["user_id"], name: "index_resource_import_files_on_user_id"
893
1010
  end
894
1011
 
895
- create_table "resource_import_results", force: :cascade do |t|
1012
+ create_table "resource_import_results", id: :serial, force: :cascade do |t|
896
1013
  t.integer "resource_import_file_id"
897
1014
  t.integer "manifestation_id"
898
1015
  t.integer "item_id"
@@ -905,7 +1022,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
905
1022
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
906
1023
  end
907
1024
 
908
- create_table "roles", force: :cascade do |t|
1025
+ create_table "roles", id: :serial, force: :cascade do |t|
909
1026
  t.string "name", null: false
910
1027
  t.string "display_name"
911
1028
  t.text "note"
@@ -913,9 +1030,10 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
913
1030
  t.datetime "updated_at"
914
1031
  t.integer "score", default: 0, null: false
915
1032
  t.integer "position"
1033
+ t.jsonb "display_name_translations", default: {}, null: false
916
1034
  end
917
1035
 
918
- create_table "search_engines", force: :cascade do |t|
1036
+ create_table "search_engines", id: :serial, force: :cascade do |t|
919
1037
  t.string "name", null: false
920
1038
  t.text "display_name"
921
1039
  t.string "url", null: false
@@ -927,15 +1045,16 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
927
1045
  t.integer "position", default: 1, null: false
928
1046
  t.datetime "created_at"
929
1047
  t.datetime "updated_at"
1048
+ t.jsonb "display_name_translations", default: {}, null: false
930
1049
  end
931
1050
 
932
- create_table "series_statement_merge_lists", force: :cascade do |t|
1051
+ create_table "series_statement_merge_lists", id: :serial, force: :cascade do |t|
933
1052
  t.string "title"
934
1053
  t.datetime "created_at"
935
1054
  t.datetime "updated_at"
936
1055
  end
937
1056
 
938
- create_table "series_statement_merges", force: :cascade do |t|
1057
+ create_table "series_statement_merges", id: :serial, force: :cascade do |t|
939
1058
  t.integer "series_statement_id", null: false
940
1059
  t.integer "series_statement_merge_list_id", null: false
941
1060
  t.datetime "created_at"
@@ -944,7 +1063,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
944
1063
  t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
945
1064
  end
946
1065
 
947
- create_table "series_statements", force: :cascade do |t|
1066
+ create_table "series_statements", id: :serial, force: :cascade do |t|
948
1067
  t.text "original_title"
949
1068
  t.text "numbering"
950
1069
  t.text "title_subseries"
@@ -968,7 +1087,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
968
1087
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
969
1088
  end
970
1089
 
971
- create_table "shelves", force: :cascade do |t|
1090
+ create_table "shelves", id: :serial, force: :cascade do |t|
972
1091
  t.string "name", null: false
973
1092
  t.text "display_name"
974
1093
  t.text "note"
@@ -979,10 +1098,11 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
979
1098
  t.datetime "updated_at"
980
1099
  t.datetime "deleted_at"
981
1100
  t.boolean "closed", default: false, null: false
1101
+ t.jsonb "display_name_translations", default: {}, null: false
982
1102
  t.index ["library_id"], name: "index_shelves_on_library_id"
983
1103
  end
984
1104
 
985
- create_table "subscribes", force: :cascade do |t|
1105
+ create_table "subscribes", id: :serial, force: :cascade do |t|
986
1106
  t.integer "subscription_id", null: false
987
1107
  t.integer "work_id", null: false
988
1108
  t.datetime "start_at", null: false
@@ -993,7 +1113,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
993
1113
  t.index ["work_id"], name: "index_subscribes_on_work_id"
994
1114
  end
995
1115
 
996
- create_table "subscriptions", force: :cascade do |t|
1116
+ create_table "subscriptions", id: :serial, force: :cascade do |t|
997
1117
  t.text "title", null: false
998
1118
  t.text "note"
999
1119
  t.integer "user_id"
@@ -1006,7 +1126,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1006
1126
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1007
1127
  end
1008
1128
 
1009
- create_table "user_export_file_transitions", force: :cascade do |t|
1129
+ create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1010
1130
  t.string "to_state"
1011
1131
  t.text "metadata", default: "{}"
1012
1132
  t.integer "sort_key"
@@ -1020,11 +1140,11 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1020
1140
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1021
1141
  end
1022
1142
 
1023
- create_table "user_export_files", force: :cascade do |t|
1143
+ create_table "user_export_files", id: :serial, force: :cascade do |t|
1024
1144
  t.integer "user_id"
1025
1145
  t.string "user_export_file_name"
1026
1146
  t.string "user_export_content_type"
1027
- t.integer "user_export_file_size"
1147
+ t.bigint "user_export_file_size"
1028
1148
  t.datetime "user_export_updated_at"
1029
1149
  t.datetime "executed_at"
1030
1150
  t.datetime "created_at"
@@ -1032,7 +1152,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1032
1152
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1033
1153
  end
1034
1154
 
1035
- create_table "user_groups", force: :cascade do |t|
1155
+ create_table "user_groups", id: :serial, force: :cascade do |t|
1036
1156
  t.string "name"
1037
1157
  t.text "display_name"
1038
1158
  t.text "note"
@@ -1042,9 +1162,10 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1042
1162
  t.datetime "deleted_at"
1043
1163
  t.integer "valid_period_for_new_user", default: 0, null: false
1044
1164
  t.datetime "expired_at"
1165
+ t.jsonb "display_name_translations", default: {}, null: false
1045
1166
  end
1046
1167
 
1047
- create_table "user_has_roles", force: :cascade do |t|
1168
+ create_table "user_has_roles", id: :serial, force: :cascade do |t|
1048
1169
  t.integer "user_id", null: false
1049
1170
  t.integer "role_id", null: false
1050
1171
  t.datetime "created_at"
@@ -1053,7 +1174,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1053
1174
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1054
1175
  end
1055
1176
 
1056
- create_table "user_import_file_transitions", force: :cascade do |t|
1177
+ create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1057
1178
  t.string "to_state"
1058
1179
  t.text "metadata", default: "{}"
1059
1180
  t.integer "sort_key"
@@ -1066,7 +1187,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1066
1187
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1067
1188
  end
1068
1189
 
1069
- create_table "user_import_files", force: :cascade do |t|
1190
+ create_table "user_import_files", id: :serial, force: :cascade do |t|
1070
1191
  t.integer "user_id"
1071
1192
  t.text "note"
1072
1193
  t.datetime "executed_at"
@@ -1085,7 +1206,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1085
1206
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1086
1207
  end
1087
1208
 
1088
- create_table "user_import_results", force: :cascade do |t|
1209
+ create_table "user_import_results", id: :serial, force: :cascade do |t|
1089
1210
  t.integer "user_import_file_id"
1090
1211
  t.integer "user_id"
1091
1212
  t.text "body"
@@ -1096,7 +1217,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1096
1217
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1097
1218
  end
1098
1219
 
1099
- create_table "users", force: :cascade do |t|
1220
+ create_table "users", id: :serial, force: :cascade do |t|
1100
1221
  t.string "email", default: "", null: false
1101
1222
  t.string "encrypted_password", default: "", null: false
1102
1223
  t.string "reset_password_token"
@@ -1116,15 +1237,13 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1116
1237
  t.string "unlock_token"
1117
1238
  t.datetime "locked_at"
1118
1239
  t.datetime "confirmed_at"
1119
- t.integer "profile_id"
1120
1240
  t.index ["email"], name: "index_users_on_email"
1121
- t.index ["profile_id"], name: "index_users_on_profile_id"
1122
1241
  t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1123
1242
  t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1124
1243
  t.index ["username"], name: "index_users_on_username", unique: true
1125
1244
  end
1126
1245
 
1127
- create_table "versions", force: :cascade do |t|
1246
+ create_table "versions", id: :serial, force: :cascade do |t|
1128
1247
  t.string "item_type", null: false
1129
1248
  t.integer "item_id", null: false
1130
1249
  t.string "event", null: false
@@ -1134,7 +1253,7 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1134
1253
  t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1135
1254
  end
1136
1255
 
1137
- create_table "withdraws", force: :cascade do |t|
1256
+ create_table "withdraws", id: :serial, force: :cascade do |t|
1138
1257
  t.integer "basket_id"
1139
1258
  t.integer "item_id"
1140
1259
  t.integer "librarian_id"
@@ -1145,4 +1264,17 @@ ActiveRecord::Schema.define(version: 2019_12_19_122214) do
1145
1264
  t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1146
1265
  end
1147
1266
 
1267
+ add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
1268
+ add_foreign_key "doi_records", "manifestations"
1269
+ add_foreign_key "events", "event_categories"
1270
+ add_foreign_key "isbn_record_and_manifestations", "isbn_records"
1271
+ add_foreign_key "isbn_record_and_manifestations", "manifestations"
1272
+ add_foreign_key "issn_record_and_manifestations", "issn_records"
1273
+ add_foreign_key "issn_record_and_manifestations", "manifestations"
1274
+ add_foreign_key "items", "manifestations"
1275
+ add_foreign_key "libraries", "library_groups"
1276
+ add_foreign_key "library_groups", "users"
1277
+ add_foreign_key "profiles", "users"
1278
+ add_foreign_key "user_has_roles", "roles"
1279
+ add_foreign_key "user_has_roles", "users"
1148
1280
  end