enju_library 0.3.11 → 0.4.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -3
  3. data/app/controllers/accepts_controller.rb +2 -2
  4. data/app/controllers/concerns/enju_library/controller.rb +7 -7
  5. data/app/controllers/libraries_controller.rb +4 -1
  6. data/app/controllers/library_groups_controller.rb +7 -1
  7. data/app/controllers/request_status_types_controller.rb +6 -1
  8. data/app/controllers/request_types_controller.rb +6 -1
  9. data/app/controllers/shelves_controller.rb +4 -1
  10. data/app/controllers/user_groups_controller.rb +3 -0
  11. data/app/controllers/user_import_results_controller.rb +1 -1
  12. data/app/controllers/withdraws_controller.rb +2 -2
  13. data/app/helpers/enju_library/application_helper.rb +18 -0
  14. data/app/models/budget_type.rb +9 -7
  15. data/app/models/concerns/enju_library/enju_user.rb +10 -0
  16. data/app/models/library.rb +29 -43
  17. data/app/models/library_group.rb +10 -11
  18. data/app/models/request_status_type.rb +9 -7
  19. data/app/models/request_type.rb +9 -7
  20. data/app/models/search_engine.rb +14 -18
  21. data/app/models/shelf.rb +13 -11
  22. data/app/models/user_export_file.rb +2 -2
  23. data/app/models/user_export_file_state_machine.rb +1 -1
  24. data/app/models/user_group.rb +2 -0
  25. data/app/models/user_import_file.rb +28 -27
  26. data/app/models/user_import_file_state_machine.rb +1 -1
  27. data/app/models/withdraw.rb +6 -0
  28. data/app/policies/shelf_policy.rb +1 -1
  29. data/app/views/accepts/_list.html.erb +2 -2
  30. data/app/views/accepts/index.html.erb +2 -2
  31. data/app/views/accepts/{index.text.erb → index.txt.csv} +0 -0
  32. data/app/views/budget_types/_form.html.erb +1 -1
  33. data/app/views/budget_types/index.html.erb +1 -1
  34. data/app/views/budget_types/show.html.erb +1 -1
  35. data/app/views/libraries/_calendar.html.erb +1 -1
  36. data/app/views/libraries/_form.html.erb +2 -12
  37. data/app/views/libraries/_map.html+phone.erb +2 -2
  38. data/app/views/libraries/_map.html.erb +23 -10
  39. data/app/views/libraries/index.html.erb +1 -1
  40. data/app/views/libraries/show.html+phone.erb +1 -1
  41. data/app/views/libraries/show.html+phone.slim +1 -1
  42. data/app/views/libraries/show.html.erb +2 -2
  43. data/app/views/library_groups/_form.html.erb +14 -13
  44. data/app/views/library_groups/index.html.erb +1 -1
  45. data/app/views/library_groups/show.html.erb +2 -2
  46. data/app/views/picture_files/_index_shelf.html.erb +1 -1
  47. data/app/views/request_status_types/_form.html.erb +1 -1
  48. data/app/views/request_status_types/index.html.erb +1 -1
  49. data/app/views/request_status_types/show.html.erb +1 -1
  50. data/app/views/request_types/_form.html.erb +1 -1
  51. data/app/views/request_types/index.html.erb +2 -2
  52. data/app/views/request_types/show.html.erb +1 -1
  53. data/app/views/shelves/_form.html.erb +1 -1
  54. data/app/views/shelves/_select_form.html.erb +1 -1
  55. data/app/views/shelves/index.html.erb +3 -3
  56. data/app/views/shelves/show.html+phone.erb +1 -1
  57. data/app/views/shelves/show.html+phone.slim +1 -1
  58. data/app/views/shelves/show.html.erb +2 -2
  59. data/app/views/user_groups/_form.html.erb +1 -1
  60. data/app/views/user_groups/index.html.erb +1 -1
  61. data/app/views/user_groups/show.html.erb +2 -2
  62. data/app/views/user_import_files/_results.html.erb +0 -5
  63. data/app/views/user_import_files/new.html.erb +2 -2
  64. data/app/views/user_import_files/show.html.erb +2 -2
  65. data/app/views/user_import_results/index.html.erb +11 -0
  66. data/app/views/user_import_results/{index.text.erb → index.txt.erb} +0 -0
  67. data/app/views/withdraws/_list.html.erb +2 -2
  68. data/app/views/withdraws/index.html.erb +3 -3
  69. data/app/views/withdraws/{index.text.erb → index.txt.csv} +0 -0
  70. data/app/views/withdraws/new.html.erb +1 -1
  71. data/config/locales/translation_en.yml +2 -4
  72. data/config/locales/translation_ja.yml +2 -4
  73. data/db/migrate/20160813191647_add_max_number_of_results_to_library_group.rb +1 -1
  74. data/db/migrate/20190630113817_add_display_name_translations_to_library_group.rb +12 -0
  75. data/db/migrate/20190630115523_add_login_banner_translations_to_library_group.rb +6 -0
  76. data/lib/enju_library/version.rb +1 -1
  77. data/lib/generators/enju_library/setup/setup_generator.rb +2 -7
  78. data/lib/generators/enju_library/setup/templates/db/fixtures/budget_types.yml +4 -0
  79. data/lib/generators/enju_library/setup/templates/db/fixtures/libraries.yml +2 -2
  80. data/lib/generators/enju_library/setup/templates/db/fixtures/library_groups.yml +11 -5
  81. data/lib/generators/enju_library/setup/templates/db/fixtures/user_groups.yml +1 -2
  82. data/spec/controllers/budget_types_controller_spec.rb +1 -1
  83. data/spec/controllers/items_controller_spec.rb +35 -0
  84. data/spec/dummy/app/helpers/application_helper.rb +1 -0
  85. data/spec/dummy/app/models/user.rb +1 -2
  86. data/spec/dummy/bin/bundle +1 -1
  87. data/spec/dummy/bin/setup +1 -3
  88. data/spec/dummy/bin/update +4 -2
  89. data/spec/dummy/bin/yarn +3 -3
  90. data/spec/dummy/config/application.rb +1 -0
  91. data/spec/dummy/config/database.yml +70 -9
  92. data/spec/dummy/config/initializers/assets.rb +1 -1
  93. data/spec/dummy/config/storage.yml +34 -0
  94. data/spec/dummy/db/development.sqlite3 +0 -0
  95. data/spec/dummy/db/migrate/113_create_events.rb +2 -4
  96. data/spec/dummy/db/migrate/20081028093607_create_event_import_files.rb +2 -4
  97. data/spec/dummy/db/migrate/20090519203307_create_participates.rb +2 -4
  98. data/spec/dummy/db/migrate/20100925074639_create_event_import_results.rb +2 -2
  99. data/spec/dummy/db/migrate/20140720192418_add_default_library_id_to_event_import_file.rb +1 -1
  100. data/spec/dummy/db/migrate/20140812152348_create_event_export_files.rb +1 -1
  101. data/spec/dummy/db/migrate/20140814070854_add_default_event_category_id_to_event_import_file.rb +1 -1
  102. data/spec/dummy/db/migrate/20151128142913_create_places.rb +14 -0
  103. data/spec/dummy/db/migrate/20151201163718_add_place_id_to_event.rb +5 -0
  104. data/spec/dummy/db/migrate/20160319144230_create_issn_records.rb +11 -0
  105. data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
  106. data/spec/dummy/db/migrate/20160703184258_add_most_recent_to_event_import_file_transitions.rb +9 -0
  107. data/spec/dummy/db/migrate/20160703184311_add_most_recent_to_event_export_file_transitions.rb +9 -0
  108. data/spec/dummy/db/migrate/20170116134107_create_issn_record_and_manifestations.rb +11 -0
  109. data/spec/dummy/db/migrate/20170116134120_create_isbn_record_and_manifestations.rb +11 -0
  110. data/spec/dummy/db/migrate/20170116150432_create_jpno_records.rb +10 -0
  111. data/spec/dummy/db/migrate/20171126072934_create_ndla_records.rb +10 -0
  112. data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +13 -0
  113. data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +13 -0
  114. data/spec/dummy/db/migrate/20180107164558_add_constraints_to_most_recent_for_event_import_file_transitions.rb +13 -0
  115. data/spec/dummy/db/migrate/20180107164617_add_constraints_to_most_recent_for_event_export_file_transitions.rb +13 -0
  116. data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +14 -0
  117. data/spec/dummy/db/migrate/20181119170645_add_foreign_key_to_events_referencing_event_categories.rb +5 -0
  118. data/spec/dummy/db/migrate/20190102034126_create_doi_records.rb +13 -0
  119. data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +27 -0
  120. data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +10 -0
  121. data/spec/dummy/db/migrate/20190312033839_create_periodical_and_manifestations.rb +11 -0
  122. data/spec/dummy/db/migrate/20190314151124_add_full_name_translations_to_create.rb +7 -0
  123. data/spec/dummy/db/migrate/20190501043418_create_ndl_bib_id_records.rb +10 -0
  124. data/spec/dummy/db/migrate/20190508160525_create_retains.rb +10 -0
  125. data/spec/dummy/db/migrate/20190512133459_upgrade_enju_event_to_enju_leaf20.rb +115 -0
  126. data/spec/dummy/db/migrate/20190629134017_rename_user_group_has_checkout_type_due_date_before_to_due_date_after.rb +5 -0
  127. data/spec/dummy/db/migrate/20190630151446_add_display_name_translations_to_role.rb +5 -0
  128. data/spec/dummy/db/migrate/20190630153136_add_display_name_translations_to_event.rb +6 -0
  129. data/spec/dummy/db/migrate/20190706052525_add_display_name_translations_to_circulation_status.rb +5 -0
  130. data/spec/dummy/db/migrate/20190712163038_add_display_name_translations_to_carrier_type.rb +21 -0
  131. data/spec/dummy/db/migrate/20190713114724_add_checkout_id_to_checkin.rb +6 -0
  132. data/spec/dummy/db/migrate/20190713114940_add_profile_id_to_user.rb +5 -0
  133. data/spec/dummy/db/migrate/20190713115451_add_full_name_translations_to_profile.rb +5 -0
  134. data/spec/dummy/db/migrate/20190814120827_add_display_name_translations_to_checkout_type.rb +5 -0
  135. data/spec/dummy/db/schema.rb +402 -204
  136. data/spec/dummy/db/test.sqlite3 +0 -0
  137. data/spec/factories/budget_types.rb +8 -7
  138. data/spec/factories/profile.rb +9 -2
  139. data/spec/factories/user.rb +25 -31
  140. data/spec/factories/user_export_file.rb +5 -0
  141. data/spec/factories/user_import_file.rb +7 -0
  142. data/spec/factories/user_import_result.rb +6 -0
  143. data/spec/fixtures/agent_relationship_types.yml +34 -0
  144. data/spec/fixtures/agent_types.yml +11 -11
  145. data/spec/fixtures/agents.yml +27 -27
  146. data/spec/fixtures/baskets.yml +1 -0
  147. data/spec/fixtures/bookstores.yml +1 -0
  148. data/spec/fixtures/budget_types.yml +9 -7
  149. data/spec/fixtures/carrier_type_has_checkout_types.yml +5 -5
  150. data/spec/fixtures/carrier_types.yml +28 -24
  151. data/spec/fixtures/checked_items.yml +6 -6
  152. data/spec/fixtures/checkins.yml +4 -11
  153. data/spec/fixtures/checkout_stat_has_manifestations.yml +5 -5
  154. data/spec/fixtures/checkout_stat_has_users.yml +6 -6
  155. data/spec/fixtures/checkout_types.yml +11 -11
  156. data/spec/fixtures/checkouts.yml +16 -17
  157. data/spec/fixtures/circulation_statuses.yml +29 -38
  158. data/spec/fixtures/classification_types.yml +63 -0
  159. data/spec/fixtures/content_types.yml +20 -31
  160. data/spec/fixtures/create_types.yml +43 -0
  161. data/spec/fixtures/event_categories.yml +23 -23
  162. data/spec/fixtures/frequencies.yml +17 -25
  163. data/spec/fixtures/identifier_types.yml +42 -0
  164. data/spec/fixtures/item_has_use_restrictions.yml +11 -11
  165. data/spec/fixtures/items.yml +28 -17
  166. data/spec/fixtures/languages.yml +12 -13
  167. data/spec/fixtures/lending_policies.yml +8 -15
  168. data/spec/fixtures/libraries.yml +30 -29
  169. data/spec/fixtures/library_groups.yml +12 -9
  170. data/spec/fixtures/manifestation_checkout_stats.yml +4 -3
  171. data/spec/fixtures/manifestation_relationship_types.yml +29 -0
  172. data/spec/fixtures/manifestation_reserve_stats.yml +4 -3
  173. data/spec/fixtures/manifestations.yml +60 -50
  174. data/spec/fixtures/message_requests.yml +3 -3
  175. data/spec/fixtures/produce_types.yml +29 -0
  176. data/spec/fixtures/profiles.yml +11 -6
  177. data/spec/fixtures/realize_types.yml +36 -0
  178. data/spec/fixtures/request_status_types.yml +14 -13
  179. data/spec/fixtures/request_types.yml +13 -12
  180. data/spec/fixtures/reserve_stat_has_manifestations.yml +5 -5
  181. data/spec/fixtures/reserve_stat_has_users.yml +5 -5
  182. data/spec/fixtures/reserve_transitions.yml +8 -7
  183. data/spec/fixtures/reserves.yml +44 -64
  184. data/spec/fixtures/roles.yml +22 -5
  185. data/spec/fixtures/search_engines.yml +13 -12
  186. data/spec/fixtures/shelves.yml +16 -15
  187. data/spec/fixtures/subject_heading_types.yml +39 -0
  188. data/spec/fixtures/subject_types.yml +28 -0
  189. data/spec/fixtures/use_restrictions.yml +4 -4
  190. data/spec/fixtures/user_checkout_stats.yml +4 -4
  191. data/spec/fixtures/user_export_files.yml +1 -1
  192. data/spec/fixtures/user_group_has_checkout_types.yml +19 -19
  193. data/spec/fixtures/user_groups.yml +4 -3
  194. data/spec/fixtures/user_has_roles.yml +3 -4
  195. data/spec/fixtures/user_reserve_stats.yml +5 -4
  196. data/spec/models/budget_type_spec.rb +8 -7
  197. data/spec/models/library_group_spec.rb +5 -14
  198. data/spec/models/library_spec.rb +26 -25
  199. data/spec/models/request_status_type_spec.rb +8 -7
  200. data/spec/models/request_type_spec.rb +8 -7
  201. data/spec/models/search_engine_spec.rb +13 -12
  202. data/spec/models/shelf_spec.rb +12 -11
  203. data/spec/models/user_export_file_spec.rb +2 -2
  204. data/spec/models/user_group_spec.rb +1 -6
  205. data/spec/models/user_import_file_spec.rb +23 -23
  206. data/spec/rails_helper.rb +10 -2
  207. data/spec/system/libraries_spec.rb +5 -5
  208. metadata +476 -491
  209. data/app/helpers/shelves_helper.rb +0 -16
  210. data/app/views/layouts/libraries.html.erb +0 -31
  211. data/app/views/libraries/_map_header.html.erb +0 -6
  212. data/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -18
  213. data/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +0 -22
  214. data/lib/generators/enju_library/setup/templates/db/fixtures/library_group/translations.yml +0 -12
  215. data/spec/dummy/app/assets/config/manifest.js +0 -5
  216. data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +0 -5
  217. data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +0 -5
  218. data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +0 -12
  219. data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +0 -12
  220. data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +0 -12
  221. data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.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: 2020_04_25_074822) do
13
+ ActiveRecord::Schema.define(version: 2019_08_14_120827) 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,7 +27,28 @@ 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 "agent_import_file_transitions", force: :cascade do |t|
30
+ create_table "active_storage_attachments", force: :cascade do |t|
31
+ t.string "name", null: false
32
+ t.string "record_type", null: false
33
+ t.bigint "record_id", null: false
34
+ t.bigint "blob_id", null: false
35
+ t.datetime "created_at", null: false
36
+ t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
37
+ t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
38
+ end
39
+
40
+ create_table "active_storage_blobs", force: :cascade do |t|
41
+ t.string "key", null: false
42
+ t.string "filename", null: false
43
+ t.string "content_type"
44
+ t.text "metadata"
45
+ t.bigint "byte_size", null: false
46
+ t.string "checksum", null: false
47
+ t.datetime "created_at", null: false
48
+ t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
49
+ end
50
+
51
+ create_table "agent_import_file_transitions", id: :serial, force: :cascade do |t|
27
52
  t.string "to_state"
28
53
  t.text "metadata", default: "{}"
29
54
  t.integer "sort_key"
@@ -36,7 +61,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
36
61
  t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
37
62
  end
38
63
 
39
- create_table "agent_import_files", force: :cascade do |t|
64
+ create_table "agent_import_files", id: :serial, force: :cascade do |t|
40
65
  t.integer "parent_id"
41
66
  t.string "content_type"
42
67
  t.integer "size"
@@ -57,7 +82,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
57
82
  t.index ["user_id"], name: "index_agent_import_files_on_user_id"
58
83
  end
59
84
 
60
- create_table "agent_import_results", force: :cascade do |t|
85
+ create_table "agent_import_results", id: :serial, force: :cascade do |t|
61
86
  t.integer "agent_import_file_id"
62
87
  t.integer "agent_id"
63
88
  t.text "body"
@@ -65,13 +90,13 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
65
90
  t.datetime "updated_at"
66
91
  end
67
92
 
68
- create_table "agent_merge_lists", force: :cascade do |t|
93
+ create_table "agent_merge_lists", id: :serial, force: :cascade do |t|
69
94
  t.string "title"
70
95
  t.datetime "created_at"
71
96
  t.datetime "updated_at"
72
97
  end
73
98
 
74
- create_table "agent_merges", force: :cascade do |t|
99
+ create_table "agent_merges", id: :serial, force: :cascade do |t|
75
100
  t.integer "agent_id", null: false
76
101
  t.integer "agent_merge_list_id", null: false
77
102
  t.datetime "created_at"
@@ -80,16 +105,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
80
105
  t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
81
106
  end
82
107
 
83
- create_table "agent_relationship_types", force: :cascade do |t|
108
+ create_table "agent_relationship_types", id: :serial, force: :cascade do |t|
84
109
  t.string "name", null: false
85
110
  t.text "display_name"
86
111
  t.text "note"
87
112
  t.integer "position"
88
113
  t.datetime "created_at"
89
114
  t.datetime "updated_at"
115
+ t.jsonb "display_name_translations", default: {}, null: false
90
116
  end
91
117
 
92
- create_table "agent_relationships", force: :cascade do |t|
118
+ create_table "agent_relationships", id: :serial, force: :cascade do |t|
93
119
  t.integer "parent_id"
94
120
  t.integer "child_id"
95
121
  t.integer "agent_relationship_type_id"
@@ -100,16 +126,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
100
126
  t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
101
127
  end
102
128
 
103
- create_table "agent_types", force: :cascade do |t|
129
+ create_table "agent_types", id: :serial, force: :cascade do |t|
104
130
  t.string "name", null: false
105
131
  t.text "display_name"
106
132
  t.text "note"
107
- t.integer "position"
133
+ t.integer "position", default: 1, null: false
108
134
  t.datetime "created_at"
109
135
  t.datetime "updated_at"
136
+ t.jsonb "display_name_translations", default: {}, null: false
110
137
  end
111
138
 
112
- create_table "agents", force: :cascade do |t|
139
+ create_table "agents", id: :serial, force: :cascade do |t|
113
140
  t.string "last_name"
114
141
  t.string "middle_name"
115
142
  t.string "first_name"
@@ -164,7 +191,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
164
191
  t.index ["required_role_id"], name: "index_agents_on_required_role_id"
165
192
  end
166
193
 
167
- create_table "baskets", force: :cascade do |t|
194
+ create_table "baskets", id: :serial, force: :cascade do |t|
168
195
  t.integer "user_id"
169
196
  t.text "note"
170
197
  t.integer "lock_version", default: 0, null: false
@@ -173,7 +200,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
173
200
  t.index ["user_id"], name: "index_baskets_on_user_id"
174
201
  end
175
202
 
176
- create_table "bookmark_stat_has_manifestations", force: :cascade do |t|
203
+ create_table "bookmark_stat_has_manifestations", id: :serial, force: :cascade do |t|
177
204
  t.integer "bookmark_stat_id", null: false
178
205
  t.integer "manifestation_id", null: false
179
206
  t.integer "bookmarks_count"
@@ -183,7 +210,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
183
210
  t.index ["manifestation_id"], name: "index_bookmark_stat_has_manifestations_on_manifestation_id"
184
211
  end
185
212
 
186
- create_table "bookmark_stat_transitions", force: :cascade do |t|
213
+ create_table "bookmark_stat_transitions", id: :serial, force: :cascade do |t|
187
214
  t.string "to_state"
188
215
  t.text "metadata", default: "{}"
189
216
  t.integer "sort_key"
@@ -194,7 +221,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
194
221
  t.index ["sort_key", "bookmark_stat_id"], name: "index_bookmark_stat_transitions_on_sort_key_and_stat_id", unique: true
195
222
  end
196
223
 
197
- create_table "bookmark_stats", force: :cascade do |t|
224
+ create_table "bookmark_stats", id: :serial, force: :cascade do |t|
198
225
  t.datetime "start_date"
199
226
  t.datetime "end_date"
200
227
  t.datetime "started_at"
@@ -204,7 +231,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
204
231
  t.datetime "updated_at"
205
232
  end
206
233
 
207
- create_table "bookmarks", force: :cascade do |t|
234
+ create_table "bookmarks", id: :serial, force: :cascade do |t|
208
235
  t.integer "user_id", null: false
209
236
  t.integer "manifestation_id"
210
237
  t.text "title"
@@ -218,7 +245,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
218
245
  t.index ["user_id"], name: "index_bookmarks_on_user_id"
219
246
  end
220
247
 
221
- create_table "bookstores", force: :cascade do |t|
248
+ create_table "bookstores", id: :serial, force: :cascade do |t|
222
249
  t.text "name", null: false
223
250
  t.string "zip_code"
224
251
  t.text "address"
@@ -232,16 +259,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
232
259
  t.datetime "updated_at"
233
260
  end
234
261
 
235
- create_table "budget_types", force: :cascade do |t|
262
+ create_table "budget_types", id: :serial, force: :cascade do |t|
236
263
  t.string "name"
237
264
  t.text "display_name"
238
265
  t.text "note"
239
266
  t.integer "position"
240
267
  t.datetime "created_at"
241
268
  t.datetime "updated_at"
269
+ t.jsonb "display_name_translations", default: {}, null: false
242
270
  end
243
271
 
244
- create_table "carrier_type_has_checkout_types", force: :cascade do |t|
272
+ create_table "carrier_type_has_checkout_types", id: :serial, force: :cascade do |t|
245
273
  t.integer "carrier_type_id", null: false
246
274
  t.integer "checkout_type_id", null: false
247
275
  t.text "note"
@@ -252,20 +280,21 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
252
280
  t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
253
281
  end
254
282
 
255
- create_table "carrier_types", force: :cascade do |t|
283
+ create_table "carrier_types", id: :serial, force: :cascade do |t|
256
284
  t.string "name", null: false
257
285
  t.text "display_name"
258
286
  t.text "note"
259
- t.integer "position"
287
+ t.integer "position", default: 1, null: false
260
288
  t.datetime "created_at"
261
289
  t.datetime "updated_at"
262
290
  t.string "attachment_file_name"
263
291
  t.string "attachment_content_type"
264
- t.integer "attachment_file_size"
292
+ t.bigint "attachment_file_size"
265
293
  t.datetime "attachment_updated_at"
294
+ t.jsonb "display_name_translations", default: {}, null: false
266
295
  end
267
296
 
268
- create_table "checked_items", force: :cascade do |t|
297
+ create_table "checked_items", id: :serial, force: :cascade do |t|
269
298
  t.integer "item_id", null: false
270
299
  t.integer "basket_id", null: false
271
300
  t.integer "librarian_id"
@@ -279,19 +308,21 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
279
308
  t.index ["user_id"], name: "index_checked_items_on_user_id"
280
309
  end
281
310
 
282
- create_table "checkins", force: :cascade do |t|
283
- t.integer "item_id", null: false
311
+ create_table "checkins", id: :serial, force: :cascade do |t|
312
+ t.integer "item_id"
284
313
  t.integer "librarian_id"
285
314
  t.integer "basket_id"
286
315
  t.datetime "created_at"
287
316
  t.datetime "updated_at"
288
317
  t.integer "lock_version", default: 0, null: false
318
+ t.bigint "checkout_id"
289
319
  t.index ["basket_id"], name: "index_checkins_on_basket_id"
320
+ t.index ["checkout_id"], name: "index_checkins_on_checkout_id"
290
321
  t.index ["item_id"], name: "index_checkins_on_item_id"
291
322
  t.index ["librarian_id"], name: "index_checkins_on_librarian_id"
292
323
  end
293
324
 
294
- create_table "checkout_stat_has_manifestations", force: :cascade do |t|
325
+ create_table "checkout_stat_has_manifestations", id: :serial, force: :cascade do |t|
295
326
  t.integer "manifestation_checkout_stat_id", null: false
296
327
  t.integer "manifestation_id", null: false
297
328
  t.integer "checkouts_count"
@@ -301,7 +332,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
301
332
  t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
302
333
  end
303
334
 
304
- create_table "checkout_stat_has_users", force: :cascade do |t|
335
+ create_table "checkout_stat_has_users", id: :serial, force: :cascade do |t|
305
336
  t.integer "user_checkout_stat_id", null: false
306
337
  t.integer "user_id", null: false
307
338
  t.integer "checkouts_count", default: 0, null: false
@@ -311,17 +342,18 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
311
342
  t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
312
343
  end
313
344
 
314
- create_table "checkout_types", force: :cascade do |t|
345
+ create_table "checkout_types", id: :serial, force: :cascade do |t|
315
346
  t.string "name", null: false
316
347
  t.text "display_name"
317
348
  t.text "note"
318
349
  t.integer "position"
319
350
  t.datetime "created_at"
320
351
  t.datetime "updated_at"
352
+ t.jsonb "display_name_translations", default: {}, null: false
321
353
  t.index ["name"], name: "index_checkout_types_on_name"
322
354
  end
323
355
 
324
- create_table "checkouts", force: :cascade do |t|
356
+ create_table "checkouts", id: :serial, force: :cascade do |t|
325
357
  t.integer "user_id"
326
358
  t.integer "item_id", null: false
327
359
  t.integer "checkin_id"
@@ -344,16 +376,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
344
376
  t.index ["user_id"], name: "index_checkouts_on_user_id"
345
377
  end
346
378
 
347
- create_table "circulation_statuses", force: :cascade do |t|
379
+ create_table "circulation_statuses", id: :serial, force: :cascade do |t|
348
380
  t.string "name", null: false
349
381
  t.text "display_name"
350
382
  t.text "note"
351
383
  t.integer "position"
352
384
  t.datetime "created_at"
353
385
  t.datetime "updated_at"
386
+ t.jsonb "display_name_translations", default: {}, null: false
354
387
  end
355
388
 
356
- create_table "classification_types", force: :cascade do |t|
389
+ create_table "classification_types", id: :serial, force: :cascade do |t|
357
390
  t.string "name", null: false
358
391
  t.text "display_name"
359
392
  t.text "note"
@@ -362,7 +395,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
362
395
  t.datetime "updated_at"
363
396
  end
364
397
 
365
- create_table "classifications", force: :cascade do |t|
398
+ create_table "classifications", id: :serial, force: :cascade do |t|
366
399
  t.integer "parent_id"
367
400
  t.string "category", null: false
368
401
  t.text "note"
@@ -380,7 +413,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
380
413
  t.index ["parent_id"], name: "index_classifications_on_parent_id"
381
414
  end
382
415
 
383
- create_table "colors", force: :cascade do |t|
416
+ create_table "colors", id: :serial, force: :cascade do |t|
384
417
  t.integer "library_group_id"
385
418
  t.string "property"
386
419
  t.string "code"
@@ -390,16 +423,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
390
423
  t.index ["library_group_id"], name: "index_colors_on_library_group_id"
391
424
  end
392
425
 
393
- create_table "content_types", force: :cascade do |t|
426
+ create_table "content_types", id: :serial, force: :cascade do |t|
394
427
  t.string "name", null: false
395
428
  t.text "display_name"
396
429
  t.text "note"
397
- t.integer "position"
430
+ t.integer "position", default: 1, null: false
398
431
  t.datetime "created_at"
399
432
  t.datetime "updated_at"
433
+ t.jsonb "display_name_translations", default: {}, null: false
400
434
  end
401
435
 
402
- create_table "countries", force: :cascade do |t|
436
+ create_table "countries", id: :serial, force: :cascade do |t|
403
437
  t.string "name", null: false
404
438
  t.text "display_name"
405
439
  t.string "alpha_2"
@@ -413,27 +447,29 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
413
447
  t.index ["numeric_3"], name: "index_countries_on_numeric_3"
414
448
  end
415
449
 
416
- create_table "create_types", force: :cascade do |t|
450
+ create_table "create_types", id: :serial, force: :cascade do |t|
417
451
  t.string "name"
418
452
  t.text "display_name"
419
453
  t.text "note"
420
454
  t.integer "position"
421
455
  t.datetime "created_at"
422
456
  t.datetime "updated_at"
457
+ t.jsonb "display_name_translations", default: {}, null: false
423
458
  end
424
459
 
425
- create_table "creates", force: :cascade do |t|
460
+ create_table "creates", id: :serial, force: :cascade do |t|
426
461
  t.integer "agent_id", null: false
427
462
  t.integer "work_id", null: false
428
- t.integer "position"
463
+ t.integer "position", default: 1, null: false
429
464
  t.datetime "created_at"
430
465
  t.datetime "updated_at"
431
466
  t.integer "create_type_id"
467
+ t.jsonb "full_name_translations", default: {}
432
468
  t.index ["agent_id"], name: "index_creates_on_agent_id"
433
469
  t.index ["work_id"], name: "index_creates_on_work_id"
434
470
  end
435
471
 
436
- create_table "demands", force: :cascade do |t|
472
+ create_table "demands", id: :serial, force: :cascade do |t|
437
473
  t.integer "user_id"
438
474
  t.integer "item_id"
439
475
  t.integer "message_id"
@@ -444,7 +480,19 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
444
480
  t.index ["user_id"], name: "index_demands_on_user_id"
445
481
  end
446
482
 
447
- create_table "donates", force: :cascade do |t|
483
+ create_table "doi_records", force: :cascade do |t|
484
+ t.string "body", null: false
485
+ t.string "display_body", null: false
486
+ t.string "source"
487
+ t.jsonb "response", default: {}, null: false
488
+ t.bigint "manifestation_id", null: false
489
+ t.datetime "created_at", null: false
490
+ t.datetime "updated_at", null: false
491
+ t.index ["body"], name: "index_doi_records_on_body", unique: true
492
+ t.index ["manifestation_id"], name: "index_doi_records_on_manifestation_id"
493
+ end
494
+
495
+ create_table "donates", id: :serial, force: :cascade do |t|
448
496
  t.integer "agent_id", null: false
449
497
  t.integer "item_id", null: false
450
498
  t.datetime "created_at"
@@ -453,53 +501,59 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
453
501
  t.index ["item_id"], name: "index_donates_on_item_id"
454
502
  end
455
503
 
456
- create_table "event_categories", force: :cascade do |t|
504
+ create_table "event_categories", id: :serial, force: :cascade do |t|
457
505
  t.string "name", null: false
458
506
  t.text "display_name"
459
507
  t.text "note"
460
- t.integer "position"
508
+ t.integer "position", default: 1, null: false
461
509
  t.datetime "created_at"
462
510
  t.datetime "updated_at"
511
+ t.jsonb "display_name_translations", default: {}, null: false
463
512
  end
464
513
 
465
- create_table "event_export_file_transitions", force: :cascade do |t|
514
+ create_table "event_export_file_transitions", id: :serial, force: :cascade do |t|
466
515
  t.string "to_state"
467
516
  t.text "metadata", default: "{}"
468
517
  t.integer "sort_key"
469
- t.integer "event_export_file_id"
518
+ t.bigint "event_export_file_id"
470
519
  t.datetime "created_at"
471
520
  t.datetime "updated_at"
472
- t.index ["event_export_file_id"], name: "index_event_export_file_transitions_on_file_id"
521
+ t.boolean "most_recent", null: false
522
+ t.index ["event_export_file_id", "most_recent"], name: "index_event_export_file_transitions_parent_most_recent", unique: true, where: "most_recent"
523
+ t.index ["event_export_file_id"], name: "index_event_export_file_transitions_on_event_export_file_id"
473
524
  t.index ["sort_key", "event_export_file_id"], name: "index_event_export_file_transitions_on_sort_key_and_file_id", unique: true
474
525
  end
475
526
 
476
- create_table "event_export_files", force: :cascade do |t|
477
- t.integer "user_id"
527
+ create_table "event_export_files", id: :serial, force: :cascade do |t|
528
+ t.bigint "user_id"
478
529
  t.string "event_export_file_name"
479
530
  t.string "event_export_content_type"
480
- t.integer "event_export_file_size"
531
+ t.bigint "event_export_file_size"
481
532
  t.datetime "event_export_updated_at"
482
533
  t.datetime "executed_at"
483
534
  t.datetime "created_at"
484
535
  t.datetime "updated_at"
536
+ t.index ["user_id"], name: "index_event_export_files_on_user_id"
485
537
  end
486
538
 
487
- create_table "event_import_file_transitions", force: :cascade do |t|
539
+ create_table "event_import_file_transitions", id: :serial, force: :cascade do |t|
488
540
  t.string "to_state"
489
541
  t.text "metadata", default: "{}"
490
542
  t.integer "sort_key"
491
- t.integer "event_import_file_id"
543
+ t.bigint "event_import_file_id"
492
544
  t.datetime "created_at"
493
545
  t.datetime "updated_at"
546
+ t.boolean "most_recent", null: false
547
+ t.index ["event_import_file_id", "most_recent"], name: "index_event_import_file_transitions_parent_most_recent", unique: true, where: "most_recent"
494
548
  t.index ["event_import_file_id"], name: "index_event_import_file_transitions_on_event_import_file_id"
495
549
  t.index ["sort_key", "event_import_file_id"], name: "index_event_import_file_transitions_on_sort_key_and_file_id", unique: true
496
550
  end
497
551
 
498
- create_table "event_import_files", force: :cascade do |t|
552
+ create_table "event_import_files", id: :serial, force: :cascade do |t|
499
553
  t.integer "parent_id"
500
554
  t.string "content_type"
501
555
  t.integer "size"
502
- t.integer "user_id"
556
+ t.bigint "user_id"
503
557
  t.text "note"
504
558
  t.datetime "executed_at"
505
559
  t.string "event_import_file_name"
@@ -512,24 +566,28 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
512
566
  t.string "event_import_fingerprint"
513
567
  t.text "error_message"
514
568
  t.string "user_encoding"
515
- t.integer "default_library_id"
516
- t.integer "default_event_category_id"
569
+ t.bigint "default_library_id"
570
+ t.bigint "default_event_category_id"
571
+ t.index ["default_event_category_id"], name: "index_event_import_files_on_default_event_category_id"
572
+ t.index ["default_library_id"], name: "index_event_import_files_on_default_library_id"
517
573
  t.index ["parent_id"], name: "index_event_import_files_on_parent_id"
518
574
  t.index ["user_id"], name: "index_event_import_files_on_user_id"
519
575
  end
520
576
 
521
- create_table "event_import_results", force: :cascade do |t|
522
- t.integer "event_import_file_id"
523
- t.integer "event_id"
577
+ create_table "event_import_results", id: :serial, force: :cascade do |t|
578
+ t.bigint "event_import_file_id"
579
+ t.bigint "event_id"
524
580
  t.text "body"
525
581
  t.datetime "created_at"
526
582
  t.datetime "updated_at"
583
+ t.index ["event_id"], name: "index_event_import_results_on_event_id"
584
+ t.index ["event_import_file_id"], name: "index_event_import_results_on_event_import_file_id"
527
585
  end
528
586
 
529
- create_table "events", force: :cascade do |t|
530
- t.integer "library_id", null: false
531
- t.integer "event_category_id", null: false
532
- t.string "name"
587
+ create_table "events", id: :serial, force: :cascade do |t|
588
+ t.bigint "library_id", null: false
589
+ t.bigint "event_category_id", null: false
590
+ t.string "name", null: false
533
591
  t.text "note"
534
592
  t.datetime "start_at"
535
593
  t.datetime "end_at"
@@ -538,11 +596,14 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
538
596
  t.text "display_name"
539
597
  t.datetime "created_at"
540
598
  t.datetime "updated_at"
599
+ t.bigint "place_id"
600
+ t.jsonb "display_name_translations", default: {}, null: false
541
601
  t.index ["event_category_id"], name: "index_events_on_event_category_id"
542
602
  t.index ["library_id"], name: "index_events_on_library_id"
603
+ t.index ["place_id"], name: "index_events_on_place_id"
543
604
  end
544
605
 
545
- create_table "exemplifies", force: :cascade do |t|
606
+ create_table "exemplifies", id: :serial, force: :cascade do |t|
546
607
  t.integer "manifestation_id", null: false
547
608
  t.integer "item_id", null: false
548
609
  t.integer "position"
@@ -552,7 +613,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
552
613
  t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
553
614
  end
554
615
 
555
- create_table "extents", force: :cascade do |t|
616
+ create_table "extents", id: :serial, force: :cascade do |t|
556
617
  t.string "name", null: false
557
618
  t.text "display_name"
558
619
  t.text "note"
@@ -561,25 +622,27 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
561
622
  t.datetime "updated_at"
562
623
  end
563
624
 
564
- create_table "form_of_works", force: :cascade do |t|
625
+ create_table "form_of_works", id: :serial, force: :cascade do |t|
565
626
  t.string "name", null: false
566
627
  t.text "display_name"
567
628
  t.text "note"
568
- t.integer "position"
629
+ t.integer "position", default: 1, null: false
569
630
  t.datetime "created_at"
570
631
  t.datetime "updated_at"
632
+ t.jsonb "display_name_translations", default: {}, null: false
571
633
  end
572
634
 
573
- create_table "frequencies", force: :cascade do |t|
635
+ create_table "frequencies", id: :serial, force: :cascade do |t|
574
636
  t.string "name", null: false
575
637
  t.text "display_name"
576
638
  t.text "note"
577
- t.integer "position"
639
+ t.integer "position", default: 1, null: false
578
640
  t.datetime "created_at"
579
641
  t.datetime "updated_at"
642
+ t.jsonb "display_name_translations", default: {}, null: false
580
643
  end
581
644
 
582
- create_table "identifier_types", force: :cascade do |t|
645
+ create_table "identifier_types", id: :serial, force: :cascade do |t|
583
646
  t.string "name"
584
647
  t.text "display_name"
585
648
  t.text "note"
@@ -588,7 +651,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
588
651
  t.datetime "updated_at"
589
652
  end
590
653
 
591
- create_table "identifiers", force: :cascade do |t|
654
+ create_table "identifiers", id: :serial, force: :cascade do |t|
592
655
  t.string "body", null: false
593
656
  t.integer "identifier_type_id", null: false
594
657
  t.integer "manifestation_id"
@@ -600,7 +663,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
600
663
  t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
601
664
  end
602
665
 
603
- create_table "identities", force: :cascade do |t|
666
+ create_table "identities", id: :serial, force: :cascade do |t|
604
667
  t.string "name"
605
668
  t.string "email"
606
669
  t.string "password_digest"
@@ -613,7 +676,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
613
676
  t.index ["profile_id"], name: "index_identities_on_profile_id"
614
677
  end
615
678
 
616
- create_table "import_request_transitions", force: :cascade do |t|
679
+ create_table "import_request_transitions", id: :serial, force: :cascade do |t|
617
680
  t.string "to_state"
618
681
  t.text "metadata", default: "{}"
619
682
  t.integer "sort_key"
@@ -626,7 +689,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
626
689
  t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
627
690
  end
628
691
 
629
- create_table "import_requests", force: :cascade do |t|
692
+ create_table "import_requests", id: :serial, force: :cascade do |t|
630
693
  t.string "isbn"
631
694
  t.integer "manifestation_id"
632
695
  t.integer "user_id"
@@ -637,28 +700,45 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
637
700
  t.index ["user_id"], name: "index_import_requests_on_user_id"
638
701
  end
639
702
 
640
- create_table "item_custom_properties", force: :cascade do |t|
641
- t.string "name", null: false
642
- t.text "display_name", null: false
643
- t.text "note"
644
- t.integer "position", default: 1, null: false
703
+ create_table "isbn_record_and_manifestations", force: :cascade do |t|
704
+ t.bigint "isbn_record_id", null: false
705
+ t.bigint "manifestation_id", null: false
706
+ t.integer "position"
645
707
  t.datetime "created_at", null: false
646
708
  t.datetime "updated_at", null: false
647
- t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
709
+ t.index ["isbn_record_id"], name: "index_isbn_record_and_manifestations_on_isbn_record_id"
710
+ t.index ["manifestation_id"], name: "index_isbn_record_and_manifestations_on_manifestation_id"
648
711
  end
649
712
 
650
- create_table "item_custom_values", force: :cascade do |t|
651
- t.integer "item_custom_property_id", null: false
652
- t.integer "item_id", null: false
653
- t.text "value"
713
+ create_table "isbn_records", force: :cascade do |t|
714
+ t.string "body", null: false
715
+ t.string "isbn_type"
716
+ t.string "source"
654
717
  t.datetime "created_at", null: false
655
718
  t.datetime "updated_at", null: false
656
- t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
657
- t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
658
- t.index ["item_id"], name: "index_item_custom_values_on_item_id"
719
+ t.index ["body"], name: "index_isbn_records_on_body", unique: true
659
720
  end
660
721
 
661
- create_table "item_has_use_restrictions", force: :cascade do |t|
722
+ create_table "issn_record_and_manifestations", force: :cascade do |t|
723
+ t.bigint "issn_record_id", null: false
724
+ t.bigint "manifestation_id", null: false
725
+ t.integer "position"
726
+ t.datetime "created_at", null: false
727
+ t.datetime "updated_at", null: false
728
+ t.index ["issn_record_id"], name: "index_issn_record_and_manifestations_on_issn_record_id"
729
+ t.index ["manifestation_id"], name: "index_issn_record_and_manifestations_on_manifestation_id"
730
+ end
731
+
732
+ create_table "issn_records", force: :cascade do |t|
733
+ t.string "body", null: false
734
+ t.string "issn_type"
735
+ t.string "source"
736
+ t.datetime "created_at", null: false
737
+ t.datetime "updated_at", null: false
738
+ t.index ["body"], name: "index_issn_records_on_body", unique: true
739
+ end
740
+
741
+ create_table "item_has_use_restrictions", id: :serial, force: :cascade do |t|
662
742
  t.integer "item_id", null: false
663
743
  t.integer "use_restriction_id", null: false
664
744
  t.datetime "created_at"
@@ -667,7 +747,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
667
747
  t.index ["use_restriction_id"], name: "index_item_has_use_restrictions_on_use_restriction_id"
668
748
  end
669
749
 
670
- create_table "items", force: :cascade do |t|
750
+ create_table "items", id: :serial, force: :cascade do |t|
671
751
  t.string "call_number"
672
752
  t.string "item_identifier"
673
753
  t.datetime "created_at"
@@ -690,7 +770,6 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
690
770
  t.string "binding_call_number"
691
771
  t.datetime "binded_at"
692
772
  t.integer "manifestation_id", null: false
693
- t.text "memo"
694
773
  t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
695
774
  t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
696
775
  t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
@@ -701,7 +780,16 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
701
780
  t.index ["shelf_id"], name: "index_items_on_shelf_id"
702
781
  end
703
782
 
704
- create_table "languages", force: :cascade do |t|
783
+ create_table "jpno_records", force: :cascade do |t|
784
+ t.string "body", null: false
785
+ t.bigint "manifestation_id", null: false
786
+ t.datetime "created_at", null: false
787
+ t.datetime "updated_at", null: false
788
+ t.index ["body"], name: "index_jpno_records_on_body", unique: true
789
+ t.index ["manifestation_id"], name: "index_jpno_records_on_manifestation_id"
790
+ end
791
+
792
+ create_table "languages", id: :serial, force: :cascade do |t|
705
793
  t.string "name", null: false
706
794
  t.string "native_name"
707
795
  t.text "display_name"
@@ -710,13 +798,14 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
710
798
  t.string "iso_639_3"
711
799
  t.text "note"
712
800
  t.integer "position"
801
+ t.jsonb "display_name_translations", default: {}, null: false
713
802
  t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
714
803
  t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
715
804
  t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
716
805
  t.index ["name"], name: "index_languages_on_name", unique: true
717
806
  end
718
807
 
719
- create_table "lending_policies", force: :cascade do |t|
808
+ create_table "lending_policies", id: :serial, force: :cascade do |t|
720
809
  t.integer "item_id", null: false
721
810
  t.integer "user_group_id", null: false
722
811
  t.integer "loan_period", default: 0, null: false
@@ -730,7 +819,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
730
819
  t.index ["item_id", "user_group_id"], name: "index_lending_policies_on_item_id_and_user_group_id", unique: true
731
820
  end
732
821
 
733
- create_table "libraries", force: :cascade do |t|
822
+ create_table "libraries", id: :serial, force: :cascade do |t|
734
823
  t.string "name", null: false
735
824
  t.text "display_name"
736
825
  t.string "short_display_name", null: false
@@ -755,22 +844,12 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
755
844
  t.string "isil"
756
845
  t.float "latitude"
757
846
  t.float "longitude"
847
+ t.jsonb "display_name_translations", default: {}, null: false
758
848
  t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
759
849
  t.index ["name"], name: "index_libraries_on_name"
760
850
  end
761
851
 
762
- create_table "library_group_translations", force: :cascade do |t|
763
- t.integer "library_group_id", null: false
764
- t.string "locale", null: false
765
- t.datetime "created_at", null: false
766
- t.datetime "updated_at", null: false
767
- t.text "login_banner"
768
- t.text "footer_banner"
769
- t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
770
- t.index ["locale"], name: "index_library_group_translations_on_locale"
771
- end
772
-
773
- create_table "library_groups", force: :cascade do |t|
852
+ create_table "library_groups", id: :serial, force: :cascade do |t|
774
853
  t.string "name", null: false
775
854
  t.text "display_name"
776
855
  t.string "short_name", null: false
@@ -787,7 +866,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
787
866
  t.text "settings"
788
867
  t.text "html_snippet"
789
868
  t.string "book_jacket_source"
790
- t.integer "max_number_of_results", default: 1000
869
+ t.integer "max_number_of_results", default: 500
791
870
  t.boolean "family_name_first", default: true
792
871
  t.string "screenshot_generator"
793
872
  t.integer "pub_year_facet_range_interval", default: 10
@@ -795,23 +874,27 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
795
874
  t.boolean "csv_charset_conversion", default: false, null: false
796
875
  t.string "header_logo_file_name"
797
876
  t.string "header_logo_content_type"
798
- t.integer "header_logo_file_size"
877
+ t.bigint "header_logo_file_size"
799
878
  t.datetime "header_logo_updated_at"
800
879
  t.text "header_logo_meta"
880
+ t.jsonb "display_name_translations", default: {}, null: false
881
+ t.jsonb "login_banner_translations", default: {}, null: false
882
+ t.jsonb "footer_banner_translations", default: {}, null: false
801
883
  t.index ["short_name"], name: "index_library_groups_on_short_name"
802
884
  t.index ["user_id"], name: "index_library_groups_on_user_id"
803
885
  end
804
886
 
805
- create_table "licenses", force: :cascade do |t|
887
+ create_table "licenses", id: :serial, force: :cascade do |t|
806
888
  t.string "name", null: false
807
889
  t.string "display_name"
808
890
  t.text "note"
809
- t.integer "position"
891
+ t.integer "position", default: 1, null: false
810
892
  t.datetime "created_at"
811
893
  t.datetime "updated_at"
894
+ t.jsonb "display_name_translations", default: {}, null: false
812
895
  end
813
896
 
814
- create_table "manifestation_checkout_stat_transitions", force: :cascade do |t|
897
+ create_table "manifestation_checkout_stat_transitions", id: :serial, force: :cascade do |t|
815
898
  t.string "to_state"
816
899
  t.text "metadata", default: "{}"
817
900
  t.integer "sort_key"
@@ -824,7 +907,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
824
907
  t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
825
908
  end
826
909
 
827
- create_table "manifestation_checkout_stats", force: :cascade do |t|
910
+ create_table "manifestation_checkout_stats", id: :serial, force: :cascade do |t|
828
911
  t.datetime "start_date"
829
912
  t.datetime "end_date"
830
913
  t.text "note"
@@ -836,37 +919,17 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
836
919
  t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
837
920
  end
838
921
 
839
- create_table "manifestation_custom_properties", force: :cascade do |t|
840
- t.string "name", null: false
841
- t.text "display_name", null: false
842
- t.text "note"
843
- t.integer "position", default: 1, null: false
844
- t.datetime "created_at", null: false
845
- t.datetime "updated_at", null: false
846
- t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
847
- end
848
-
849
- create_table "manifestation_custom_values", force: :cascade do |t|
850
- t.integer "manifestation_custom_property_id", null: false
851
- t.integer "manifestation_id", null: false
852
- t.text "value"
853
- t.datetime "created_at", null: false
854
- t.datetime "updated_at", null: false
855
- t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
856
- t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
857
- t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
858
- end
859
-
860
- create_table "manifestation_relationship_types", force: :cascade do |t|
922
+ create_table "manifestation_relationship_types", id: :serial, force: :cascade do |t|
861
923
  t.string "name", null: false
862
924
  t.text "display_name"
863
925
  t.text "note"
864
926
  t.integer "position"
865
927
  t.datetime "created_at"
866
928
  t.datetime "updated_at"
929
+ t.jsonb "display_name_translations", default: {}, null: false
867
930
  end
868
931
 
869
- create_table "manifestation_relationships", force: :cascade do |t|
932
+ create_table "manifestation_relationships", id: :serial, force: :cascade do |t|
870
933
  t.integer "parent_id"
871
934
  t.integer "child_id"
872
935
  t.integer "manifestation_relationship_type_id"
@@ -877,7 +940,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
877
940
  t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
878
941
  end
879
942
 
880
- create_table "manifestation_reserve_stat_transitions", force: :cascade do |t|
943
+ create_table "manifestation_reserve_stat_transitions", id: :serial, force: :cascade do |t|
881
944
  t.string "to_state"
882
945
  t.text "metadata", default: "{}"
883
946
  t.integer "sort_key"
@@ -890,7 +953,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
890
953
  t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
891
954
  end
892
955
 
893
- create_table "manifestation_reserve_stats", force: :cascade do |t|
956
+ create_table "manifestation_reserve_stats", id: :serial, force: :cascade do |t|
894
957
  t.datetime "start_date"
895
958
  t.datetime "end_date"
896
959
  t.text "note"
@@ -902,7 +965,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
902
965
  t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
903
966
  end
904
967
 
905
- create_table "manifestations", force: :cascade do |t|
968
+ create_table "manifestations", id: :serial, force: :cascade do |t|
906
969
  t.text "original_title", null: false
907
970
  t.text "title_alternative"
908
971
  t.text "title_transcription"
@@ -962,7 +1025,6 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
962
1025
  t.text "publication_place"
963
1026
  t.text "extent"
964
1027
  t.text "dimensions"
965
- t.text "memo"
966
1028
  t.index ["access_address"], name: "index_manifestations_on_access_address"
967
1029
  t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
968
1030
  t.index ["doi"], name: "index_manifestations_on_doi"
@@ -970,28 +1032,30 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
970
1032
  t.index ["updated_at"], name: "index_manifestations_on_updated_at"
971
1033
  end
972
1034
 
973
- create_table "medium_of_performances", force: :cascade do |t|
1035
+ create_table "medium_of_performances", id: :serial, force: :cascade do |t|
974
1036
  t.string "name", null: false
975
1037
  t.text "display_name"
976
1038
  t.text "note"
977
1039
  t.integer "position"
978
1040
  t.datetime "created_at"
979
1041
  t.datetime "updated_at"
1042
+ t.jsonb "display_name_translations", default: {}, null: false
980
1043
  end
981
1044
 
982
- create_table "message_request_transitions", force: :cascade do |t|
1045
+ create_table "message_request_transitions", id: :serial, force: :cascade do |t|
983
1046
  t.string "to_state"
984
1047
  t.text "metadata", default: "{}"
985
1048
  t.integer "sort_key"
986
1049
  t.integer "message_request_id"
987
1050
  t.datetime "created_at"
988
1051
  t.datetime "updated_at"
989
- t.boolean "most_recent"
1052
+ t.boolean "most_recent", null: false
1053
+ t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
990
1054
  t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
991
1055
  t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
992
1056
  end
993
1057
 
994
- create_table "message_requests", force: :cascade do |t|
1058
+ create_table "message_requests", id: :serial, force: :cascade do |t|
995
1059
  t.integer "sender_id"
996
1060
  t.integer "receiver_id"
997
1061
  t.integer "message_template_id"
@@ -1002,7 +1066,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1002
1066
  t.datetime "updated_at"
1003
1067
  end
1004
1068
 
1005
- create_table "message_templates", force: :cascade do |t|
1069
+ create_table "message_templates", id: :serial, force: :cascade do |t|
1006
1070
  t.string "status", null: false
1007
1071
  t.text "title", null: false
1008
1072
  t.text "body", null: false
@@ -1013,19 +1077,20 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1013
1077
  t.index ["status"], name: "index_message_templates_on_status", unique: true
1014
1078
  end
1015
1079
 
1016
- create_table "message_transitions", force: :cascade do |t|
1080
+ create_table "message_transitions", id: :serial, force: :cascade do |t|
1017
1081
  t.string "to_state"
1018
1082
  t.text "metadata", default: "{}"
1019
1083
  t.integer "sort_key"
1020
1084
  t.integer "message_id"
1021
1085
  t.datetime "created_at"
1022
1086
  t.datetime "updated_at"
1023
- t.boolean "most_recent"
1087
+ t.boolean "most_recent", null: false
1088
+ t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
1024
1089
  t.index ["message_id"], name: "index_message_transitions_on_message_id"
1025
1090
  t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
1026
1091
  end
1027
1092
 
1028
- create_table "messages", force: :cascade do |t|
1093
+ create_table "messages", id: :serial, force: :cascade do |t|
1029
1094
  t.datetime "read_at"
1030
1095
  t.integer "receiver_id"
1031
1096
  t.integer "sender_id"
@@ -1044,27 +1109,64 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1044
1109
  t.index ["sender_id"], name: "index_messages_on_sender_id"
1045
1110
  end
1046
1111
 
1047
- create_table "owns", force: :cascade do |t|
1112
+ create_table "ndl_bib_id_records", force: :cascade do |t|
1113
+ t.string "body", null: false
1114
+ t.bigint "manifestation_id", null: false
1115
+ t.datetime "created_at", null: false
1116
+ t.datetime "updated_at", null: false
1117
+ t.index ["body"], name: "index_ndl_bib_id_records_on_body", unique: true
1118
+ t.index ["manifestation_id"], name: "index_ndl_bib_id_records_on_manifestation_id"
1119
+ end
1120
+
1121
+ create_table "ndla_records", force: :cascade do |t|
1122
+ t.bigint "agent_id"
1123
+ t.string "body", null: false
1124
+ t.datetime "created_at", null: false
1125
+ t.datetime "updated_at", null: false
1126
+ t.index ["agent_id"], name: "index_ndla_records_on_agent_id"
1127
+ t.index ["body"], name: "index_ndla_records_on_body", unique: true
1128
+ end
1129
+
1130
+ create_table "owns", id: :serial, force: :cascade do |t|
1048
1131
  t.integer "agent_id", null: false
1049
1132
  t.integer "item_id", null: false
1050
- t.integer "position"
1133
+ t.integer "position", default: 1, null: false
1051
1134
  t.datetime "created_at"
1052
1135
  t.datetime "updated_at"
1053
1136
  t.index ["agent_id"], name: "index_owns_on_agent_id"
1054
1137
  t.index ["item_id"], name: "index_owns_on_item_id"
1055
1138
  end
1056
1139
 
1057
- create_table "participates", force: :cascade do |t|
1058
- t.integer "agent_id", null: false
1059
- t.integer "event_id", null: false
1060
- t.integer "position"
1140
+ create_table "participates", id: :serial, force: :cascade do |t|
1141
+ t.bigint "agent_id", null: false
1142
+ t.bigint "event_id", null: false
1143
+ t.integer "position", default: 1, null: false
1061
1144
  t.datetime "created_at"
1062
1145
  t.datetime "updated_at"
1063
1146
  t.index ["agent_id"], name: "index_participates_on_agent_id"
1064
1147
  t.index ["event_id"], name: "index_participates_on_event_id"
1065
1148
  end
1066
1149
 
1067
- create_table "picture_files", force: :cascade do |t|
1150
+ create_table "periodical_and_manifestations", force: :cascade do |t|
1151
+ t.bigint "periodical_id", null: false
1152
+ t.bigint "manifestation_id", null: false
1153
+ t.boolean "periodical_master", default: false, null: false
1154
+ t.datetime "created_at", null: false
1155
+ t.datetime "updated_at", null: false
1156
+ t.index ["manifestation_id"], name: "index_periodical_and_manifestations_on_manifestation_id"
1157
+ t.index ["periodical_id"], name: "index_periodical_and_manifestations_on_periodical_id"
1158
+ t.index ["periodical_master"], name: "index_periodical_and_manifestations_on_periodical_master", unique: true, where: "(periodical_master IS TRUE)"
1159
+ end
1160
+
1161
+ create_table "periodicals", force: :cascade do |t|
1162
+ t.text "original_title", null: false
1163
+ t.bigint "frequency_id", null: false
1164
+ t.datetime "created_at", null: false
1165
+ t.datetime "updated_at", null: false
1166
+ t.index ["frequency_id"], name: "index_periodicals_on_frequency_id"
1167
+ end
1168
+
1169
+ create_table "picture_files", id: :serial, force: :cascade do |t|
1068
1170
  t.integer "picture_attachable_id"
1069
1171
  t.string "picture_attachable_type"
1070
1172
  t.string "content_type"
@@ -1084,27 +1186,41 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1084
1186
  t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
1085
1187
  end
1086
1188
 
1087
- create_table "produce_types", force: :cascade do |t|
1189
+ create_table "places", id: :serial, force: :cascade do |t|
1190
+ t.string "term"
1191
+ t.text "city"
1192
+ t.bigint "country_id"
1193
+ t.float "latitude"
1194
+ t.float "longitude"
1195
+ t.datetime "created_at", null: false
1196
+ t.datetime "updated_at", null: false
1197
+ t.index ["country_id"], name: "index_places_on_country_id"
1198
+ t.index ["term"], name: "index_places_on_term"
1199
+ end
1200
+
1201
+ create_table "produce_types", id: :serial, force: :cascade do |t|
1088
1202
  t.string "name"
1089
1203
  t.text "display_name"
1090
1204
  t.text "note"
1091
1205
  t.integer "position"
1092
1206
  t.datetime "created_at"
1093
1207
  t.datetime "updated_at"
1208
+ t.jsonb "display_name_translations", default: {}, null: false
1094
1209
  end
1095
1210
 
1096
- create_table "produces", force: :cascade do |t|
1211
+ create_table "produces", id: :serial, force: :cascade do |t|
1097
1212
  t.integer "agent_id", null: false
1098
1213
  t.integer "manifestation_id", null: false
1099
- t.integer "position"
1214
+ t.integer "position", default: 1, null: false
1100
1215
  t.datetime "created_at"
1101
1216
  t.datetime "updated_at"
1102
1217
  t.integer "produce_type_id"
1218
+ t.jsonb "full_name_translations", default: {}
1103
1219
  t.index ["agent_id"], name: "index_produces_on_agent_id"
1104
1220
  t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
1105
1221
  end
1106
1222
 
1107
- create_table "profiles", force: :cascade do |t|
1223
+ create_table "profiles", id: :serial, force: :cascade do |t|
1108
1224
  t.integer "user_id"
1109
1225
  t.integer "user_group_id"
1110
1226
  t.integer "library_id"
@@ -1123,6 +1239,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1123
1239
  t.boolean "share_bookmarks"
1124
1240
  t.text "full_name_transcription"
1125
1241
  t.datetime "date_of_birth"
1242
+ t.jsonb "full_name_translations", default: {}, null: false
1126
1243
  t.index ["checkout_icalendar_token"], name: "index_profiles_on_checkout_icalendar_token", unique: true
1127
1244
  t.index ["library_id"], name: "index_profiles_on_library_id"
1128
1245
  t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
@@ -1130,45 +1247,49 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1130
1247
  t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
1131
1248
  end
1132
1249
 
1133
- create_table "realize_types", force: :cascade do |t|
1250
+ create_table "realize_types", id: :serial, force: :cascade do |t|
1134
1251
  t.string "name"
1135
1252
  t.text "display_name"
1136
1253
  t.text "note"
1137
1254
  t.integer "position"
1138
1255
  t.datetime "created_at"
1139
1256
  t.datetime "updated_at"
1257
+ t.jsonb "display_name_translations", default: {}, null: false
1140
1258
  end
1141
1259
 
1142
- create_table "realizes", force: :cascade do |t|
1260
+ create_table "realizes", id: :serial, force: :cascade do |t|
1143
1261
  t.integer "agent_id", null: false
1144
1262
  t.integer "expression_id", null: false
1145
- t.integer "position"
1263
+ t.integer "position", default: 1, null: false
1146
1264
  t.datetime "created_at"
1147
1265
  t.datetime "updated_at"
1148
1266
  t.integer "realize_type_id"
1267
+ t.jsonb "full_name_translations", default: {}
1149
1268
  t.index ["agent_id"], name: "index_realizes_on_agent_id"
1150
1269
  t.index ["expression_id"], name: "index_realizes_on_expression_id"
1151
1270
  end
1152
1271
 
1153
- create_table "request_status_types", force: :cascade do |t|
1272
+ create_table "request_status_types", id: :serial, force: :cascade do |t|
1154
1273
  t.string "name", null: false
1155
1274
  t.text "display_name"
1156
1275
  t.text "note"
1157
1276
  t.integer "position"
1158
1277
  t.datetime "created_at"
1159
1278
  t.datetime "updated_at"
1279
+ t.jsonb "display_name_translations", default: {}, null: false
1160
1280
  end
1161
1281
 
1162
- create_table "request_types", force: :cascade do |t|
1282
+ create_table "request_types", id: :serial, force: :cascade do |t|
1163
1283
  t.string "name", null: false
1164
1284
  t.text "display_name"
1165
1285
  t.text "note"
1166
1286
  t.integer "position"
1167
1287
  t.datetime "created_at"
1168
1288
  t.datetime "updated_at"
1289
+ t.jsonb "display_name_translations", default: {}, null: false
1169
1290
  end
1170
1291
 
1171
- create_table "reserve_stat_has_manifestations", force: :cascade do |t|
1292
+ create_table "reserve_stat_has_manifestations", id: :serial, force: :cascade do |t|
1172
1293
  t.integer "manifestation_reserve_stat_id", null: false
1173
1294
  t.integer "manifestation_id", null: false
1174
1295
  t.integer "reserves_count"
@@ -1178,7 +1299,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1178
1299
  t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
1179
1300
  end
1180
1301
 
1181
- create_table "reserve_stat_has_users", force: :cascade do |t|
1302
+ create_table "reserve_stat_has_users", id: :serial, force: :cascade do |t|
1182
1303
  t.integer "user_reserve_stat_id", null: false
1183
1304
  t.integer "user_id", null: false
1184
1305
  t.integer "reserves_count"
@@ -1188,7 +1309,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1188
1309
  t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
1189
1310
  end
1190
1311
 
1191
- create_table "reserve_transitions", force: :cascade do |t|
1312
+ create_table "reserve_transitions", id: :serial, force: :cascade do |t|
1192
1313
  t.string "to_state"
1193
1314
  t.text "metadata", default: "{}"
1194
1315
  t.integer "sort_key"
@@ -1201,7 +1322,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1201
1322
  t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
1202
1323
  end
1203
1324
 
1204
- create_table "reserves", force: :cascade do |t|
1325
+ create_table "reserves", id: :serial, force: :cascade do |t|
1205
1326
  t.integer "user_id", null: false
1206
1327
  t.integer "manifestation_id", null: false
1207
1328
  t.integer "item_id"
@@ -1224,7 +1345,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1224
1345
  t.index ["user_id"], name: "index_reserves_on_user_id"
1225
1346
  end
1226
1347
 
1227
- create_table "resource_export_file_transitions", force: :cascade do |t|
1348
+ create_table "resource_export_file_transitions", id: :serial, force: :cascade do |t|
1228
1349
  t.string "to_state"
1229
1350
  t.text "metadata", default: "{}"
1230
1351
  t.integer "sort_key"
@@ -1237,18 +1358,18 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1237
1358
  t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
1238
1359
  end
1239
1360
 
1240
- create_table "resource_export_files", force: :cascade do |t|
1361
+ create_table "resource_export_files", id: :serial, force: :cascade do |t|
1241
1362
  t.integer "user_id"
1242
1363
  t.string "resource_export_file_name"
1243
1364
  t.string "resource_export_content_type"
1244
- t.integer "resource_export_file_size"
1365
+ t.bigint "resource_export_file_size"
1245
1366
  t.datetime "resource_export_updated_at"
1246
1367
  t.datetime "executed_at"
1247
1368
  t.datetime "created_at"
1248
1369
  t.datetime "updated_at"
1249
1370
  end
1250
1371
 
1251
- create_table "resource_import_file_transitions", force: :cascade do |t|
1372
+ create_table "resource_import_file_transitions", id: :serial, force: :cascade do |t|
1252
1373
  t.string "to_state"
1253
1374
  t.text "metadata", default: "{}"
1254
1375
  t.integer "sort_key"
@@ -1261,7 +1382,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1261
1382
  t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
1262
1383
  end
1263
1384
 
1264
- create_table "resource_import_files", force: :cascade do |t|
1385
+ create_table "resource_import_files", id: :serial, force: :cascade do |t|
1265
1386
  t.integer "parent_id"
1266
1387
  t.string "content_type"
1267
1388
  t.integer "size"
@@ -1283,7 +1404,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1283
1404
  t.index ["user_id"], name: "index_resource_import_files_on_user_id"
1284
1405
  end
1285
1406
 
1286
- create_table "resource_import_results", force: :cascade do |t|
1407
+ create_table "resource_import_results", id: :serial, force: :cascade do |t|
1287
1408
  t.integer "resource_import_file_id"
1288
1409
  t.integer "manifestation_id"
1289
1410
  t.integer "item_id"
@@ -1296,7 +1417,16 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1296
1417
  t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
1297
1418
  end
1298
1419
 
1299
- create_table "roles", force: :cascade do |t|
1420
+ create_table "retains", force: :cascade do |t|
1421
+ t.bigint "reserve_id", null: false
1422
+ t.bigint "item_id", null: false
1423
+ t.datetime "created_at", null: false
1424
+ t.datetime "updated_at", null: false
1425
+ t.index ["item_id"], name: "index_retains_on_item_id"
1426
+ t.index ["reserve_id"], name: "index_retains_on_reserve_id"
1427
+ end
1428
+
1429
+ create_table "roles", id: :serial, force: :cascade do |t|
1300
1430
  t.string "name", null: false
1301
1431
  t.string "display_name"
1302
1432
  t.text "note"
@@ -1304,9 +1434,10 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1304
1434
  t.datetime "updated_at"
1305
1435
  t.integer "score", default: 0, null: false
1306
1436
  t.integer "position"
1437
+ t.jsonb "display_name_translations", default: {}, null: false
1307
1438
  end
1308
1439
 
1309
- create_table "search_engines", force: :cascade do |t|
1440
+ create_table "search_engines", id: :serial, force: :cascade do |t|
1310
1441
  t.string "name", null: false
1311
1442
  t.text "display_name"
1312
1443
  t.string "url", null: false
@@ -1318,9 +1449,10 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1318
1449
  t.integer "position"
1319
1450
  t.datetime "created_at"
1320
1451
  t.datetime "updated_at"
1452
+ t.jsonb "display_name_translations", default: {}, null: false
1321
1453
  end
1322
1454
 
1323
- create_table "search_histories", force: :cascade do |t|
1455
+ create_table "search_histories", id: :serial, force: :cascade do |t|
1324
1456
  t.integer "user_id"
1325
1457
  t.string "operation", default: "searchRetrieve"
1326
1458
  t.float "sru_version", default: 1.2
@@ -1345,13 +1477,13 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1345
1477
  t.index ["user_id"], name: "index_search_histories_on_user_id"
1346
1478
  end
1347
1479
 
1348
- create_table "series_statement_merge_lists", force: :cascade do |t|
1480
+ create_table "series_statement_merge_lists", id: :serial, force: :cascade do |t|
1349
1481
  t.string "title"
1350
1482
  t.datetime "created_at"
1351
1483
  t.datetime "updated_at"
1352
1484
  end
1353
1485
 
1354
- create_table "series_statement_merges", force: :cascade do |t|
1486
+ create_table "series_statement_merges", id: :serial, force: :cascade do |t|
1355
1487
  t.integer "series_statement_id", null: false
1356
1488
  t.integer "series_statement_merge_list_id", null: false
1357
1489
  t.datetime "created_at"
@@ -1360,7 +1492,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1360
1492
  t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
1361
1493
  end
1362
1494
 
1363
- create_table "series_statements", force: :cascade do |t|
1495
+ create_table "series_statements", id: :serial, force: :cascade do |t|
1364
1496
  t.text "original_title"
1365
1497
  t.text "numbering"
1366
1498
  t.text "title_subseries"
@@ -1384,7 +1516,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1384
1516
  t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
1385
1517
  end
1386
1518
 
1387
- create_table "shelves", force: :cascade do |t|
1519
+ create_table "shelves", id: :serial, force: :cascade do |t|
1388
1520
  t.string "name", null: false
1389
1521
  t.text "display_name"
1390
1522
  t.text "note"
@@ -1395,10 +1527,11 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1395
1527
  t.datetime "updated_at"
1396
1528
  t.datetime "deleted_at"
1397
1529
  t.boolean "closed", default: false, null: false
1530
+ t.jsonb "display_name_translations", default: {}, null: false
1398
1531
  t.index ["library_id"], name: "index_shelves_on_library_id"
1399
1532
  end
1400
1533
 
1401
- create_table "subject_heading_types", force: :cascade do |t|
1534
+ create_table "subject_heading_types", id: :serial, force: :cascade do |t|
1402
1535
  t.string "name", null: false
1403
1536
  t.text "display_name"
1404
1537
  t.text "note"
@@ -1407,7 +1540,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1407
1540
  t.datetime "updated_at"
1408
1541
  end
1409
1542
 
1410
- create_table "subject_types", force: :cascade do |t|
1543
+ create_table "subject_types", id: :serial, force: :cascade do |t|
1411
1544
  t.string "name", null: false
1412
1545
  t.text "display_name"
1413
1546
  t.text "note"
@@ -1416,7 +1549,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1416
1549
  t.datetime "updated_at"
1417
1550
  end
1418
1551
 
1419
- create_table "subjects", force: :cascade do |t|
1552
+ create_table "subjects", id: :serial, force: :cascade do |t|
1420
1553
  t.integer "parent_id"
1421
1554
  t.integer "use_term_id"
1422
1555
  t.string "term"
@@ -1440,7 +1573,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1440
1573
  t.index ["use_term_id"], name: "index_subjects_on_use_term_id"
1441
1574
  end
1442
1575
 
1443
- create_table "subscribes", force: :cascade do |t|
1576
+ create_table "subscribes", id: :serial, force: :cascade do |t|
1444
1577
  t.integer "subscription_id", null: false
1445
1578
  t.integer "work_id", null: false
1446
1579
  t.datetime "start_at", null: false
@@ -1451,7 +1584,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1451
1584
  t.index ["work_id"], name: "index_subscribes_on_work_id"
1452
1585
  end
1453
1586
 
1454
- create_table "subscriptions", force: :cascade do |t|
1587
+ create_table "subscriptions", id: :serial, force: :cascade do |t|
1455
1588
  t.text "title", null: false
1456
1589
  t.text "note"
1457
1590
  t.integer "user_id"
@@ -1464,7 +1597,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1464
1597
  t.index ["user_id"], name: "index_subscriptions_on_user_id"
1465
1598
  end
1466
1599
 
1467
- create_table "taggings", force: :cascade do |t|
1600
+ create_table "taggings", id: :serial, force: :cascade do |t|
1468
1601
  t.integer "tag_id"
1469
1602
  t.string "taggable_type"
1470
1603
  t.integer "taggable_id"
@@ -1476,14 +1609,14 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1476
1609
  t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
1477
1610
  end
1478
1611
 
1479
- create_table "tags", force: :cascade do |t|
1612
+ create_table "tags", id: :serial, force: :cascade do |t|
1480
1613
  t.string "name"
1481
1614
  t.string "name_transcription"
1482
1615
  t.datetime "created_at"
1483
1616
  t.datetime "updated_at"
1484
1617
  end
1485
1618
 
1486
- create_table "use_restrictions", force: :cascade do |t|
1619
+ create_table "use_restrictions", id: :serial, force: :cascade do |t|
1487
1620
  t.string "name", null: false
1488
1621
  t.text "display_name"
1489
1622
  t.text "note"
@@ -1492,7 +1625,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1492
1625
  t.datetime "updated_at"
1493
1626
  end
1494
1627
 
1495
- create_table "user_checkout_stat_transitions", force: :cascade do |t|
1628
+ create_table "user_checkout_stat_transitions", id: :serial, force: :cascade do |t|
1496
1629
  t.string "to_state"
1497
1630
  t.text "metadata", default: "{}"
1498
1631
  t.integer "sort_key"
@@ -1505,7 +1638,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1505
1638
  t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
1506
1639
  end
1507
1640
 
1508
- create_table "user_checkout_stats", force: :cascade do |t|
1641
+ create_table "user_checkout_stats", id: :serial, force: :cascade do |t|
1509
1642
  t.datetime "start_date"
1510
1643
  t.datetime "end_date"
1511
1644
  t.text "note"
@@ -1517,7 +1650,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1517
1650
  t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
1518
1651
  end
1519
1652
 
1520
- create_table "user_export_file_transitions", force: :cascade do |t|
1653
+ create_table "user_export_file_transitions", id: :serial, force: :cascade do |t|
1521
1654
  t.string "to_state"
1522
1655
  t.text "metadata", default: "{}"
1523
1656
  t.integer "sort_key"
@@ -1531,11 +1664,11 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1531
1664
  t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_user_export_file_id"
1532
1665
  end
1533
1666
 
1534
- create_table "user_export_files", force: :cascade do |t|
1667
+ create_table "user_export_files", id: :serial, force: :cascade do |t|
1535
1668
  t.integer "user_id"
1536
1669
  t.string "user_export_file_name"
1537
1670
  t.string "user_export_content_type"
1538
- t.integer "user_export_file_size"
1671
+ t.bigint "user_export_file_size"
1539
1672
  t.datetime "user_export_updated_at"
1540
1673
  t.datetime "executed_at"
1541
1674
  t.datetime "created_at"
@@ -1543,7 +1676,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1543
1676
  t.index ["user_id"], name: "index_user_export_files_on_user_id"
1544
1677
  end
1545
1678
 
1546
- create_table "user_group_has_checkout_types", force: :cascade do |t|
1679
+ create_table "user_group_has_checkout_types", id: :serial, force: :cascade do |t|
1547
1680
  t.integer "user_group_id", null: false
1548
1681
  t.integer "checkout_type_id", null: false
1549
1682
  t.integer "checkout_limit", default: 0, null: false
@@ -1551,7 +1684,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1551
1684
  t.integer "checkout_renewal_limit", default: 0, null: false
1552
1685
  t.integer "reservation_limit", default: 0, null: false
1553
1686
  t.integer "reservation_expired_period", default: 7, null: false
1554
- t.boolean "set_due_date_before_closing_day", default: false, null: false
1687
+ t.boolean "set_due_date_after_closing_day", default: false, null: false
1555
1688
  t.datetime "fixed_due_date"
1556
1689
  t.text "note"
1557
1690
  t.integer "position"
@@ -1562,7 +1695,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1562
1695
  t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
1563
1696
  end
1564
1697
 
1565
- create_table "user_groups", force: :cascade do |t|
1698
+ create_table "user_groups", id: :serial, force: :cascade do |t|
1566
1699
  t.string "name"
1567
1700
  t.text "display_name"
1568
1701
  t.text "note"
@@ -1575,9 +1708,10 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1575
1708
  t.integer "number_of_day_to_notify_overdue", default: 7, null: false
1576
1709
  t.integer "number_of_day_to_notify_due_date", default: 3, null: false
1577
1710
  t.integer "number_of_time_to_notify_overdue", default: 3, null: false
1711
+ t.jsonb "display_name_translations", default: {}, null: false
1578
1712
  end
1579
1713
 
1580
- create_table "user_has_roles", force: :cascade do |t|
1714
+ create_table "user_has_roles", id: :serial, force: :cascade do |t|
1581
1715
  t.integer "user_id", null: false
1582
1716
  t.integer "role_id", null: false
1583
1717
  t.datetime "created_at"
@@ -1586,7 +1720,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1586
1720
  t.index ["user_id"], name: "index_user_has_roles_on_user_id"
1587
1721
  end
1588
1722
 
1589
- create_table "user_import_file_transitions", force: :cascade do |t|
1723
+ create_table "user_import_file_transitions", id: :serial, force: :cascade do |t|
1590
1724
  t.string "to_state"
1591
1725
  t.text "metadata", default: "{}"
1592
1726
  t.integer "sort_key"
@@ -1599,7 +1733,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1599
1733
  t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
1600
1734
  end
1601
1735
 
1602
- create_table "user_import_files", force: :cascade do |t|
1736
+ create_table "user_import_files", id: :serial, force: :cascade do |t|
1603
1737
  t.integer "user_id"
1604
1738
  t.text "note"
1605
1739
  t.datetime "executed_at"
@@ -1618,7 +1752,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1618
1752
  t.index ["user_id"], name: "index_user_import_files_on_user_id"
1619
1753
  end
1620
1754
 
1621
- create_table "user_import_results", force: :cascade do |t|
1755
+ create_table "user_import_results", id: :serial, force: :cascade do |t|
1622
1756
  t.integer "user_import_file_id"
1623
1757
  t.integer "user_id"
1624
1758
  t.text "body"
@@ -1629,7 +1763,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1629
1763
  t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
1630
1764
  end
1631
1765
 
1632
- create_table "user_reserve_stat_transitions", force: :cascade do |t|
1766
+ create_table "user_reserve_stat_transitions", id: :serial, force: :cascade do |t|
1633
1767
  t.string "to_state"
1634
1768
  t.text "metadata", default: "{}"
1635
1769
  t.integer "sort_key"
@@ -1642,7 +1776,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1642
1776
  t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
1643
1777
  end
1644
1778
 
1645
- create_table "user_reserve_stats", force: :cascade do |t|
1779
+ create_table "user_reserve_stats", id: :serial, force: :cascade do |t|
1646
1780
  t.datetime "start_date"
1647
1781
  t.datetime "end_date"
1648
1782
  t.text "note"
@@ -1654,7 +1788,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1654
1788
  t.index ["user_id"], name: "index_user_reserve_stats_on_user_id"
1655
1789
  end
1656
1790
 
1657
- create_table "users", force: :cascade do |t|
1791
+ create_table "users", id: :serial, force: :cascade do |t|
1658
1792
  t.string "email", default: "", null: false
1659
1793
  t.string "encrypted_password", default: "", null: false
1660
1794
  t.string "reset_password_token"
@@ -1677,14 +1811,16 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1677
1811
  t.string "unlock_token"
1678
1812
  t.datetime "locked_at"
1679
1813
  t.datetime "confirmed_at"
1814
+ t.bigint "profile_id"
1680
1815
  t.index ["checkout_icalendar_token"], name: "index_users_on_checkout_icalendar_token", unique: true
1681
1816
  t.index ["email"], name: "index_users_on_email"
1817
+ t.index ["profile_id"], name: "index_users_on_profile_id"
1682
1818
  t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1683
1819
  t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1684
1820
  t.index ["username"], name: "index_users_on_username", unique: true
1685
1821
  end
1686
1822
 
1687
- create_table "versions", force: :cascade do |t|
1823
+ create_table "versions", id: :serial, force: :cascade do |t|
1688
1824
  t.string "item_type", null: false
1689
1825
  t.integer "item_id", null: false
1690
1826
  t.string "event", null: false
@@ -1694,7 +1830,7 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1694
1830
  t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1695
1831
  end
1696
1832
 
1697
- create_table "withdraws", force: :cascade do |t|
1833
+ create_table "withdraws", id: :serial, force: :cascade do |t|
1698
1834
  t.integer "basket_id"
1699
1835
  t.integer "item_id"
1700
1836
  t.integer "librarian_id"
@@ -1705,4 +1841,66 @@ ActiveRecord::Schema.define(version: 2020_04_25_074822) do
1705
1841
  t.index ["librarian_id"], name: "index_withdraws_on_librarian_id"
1706
1842
  end
1707
1843
 
1844
+ add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
1845
+ add_foreign_key "carrier_type_has_checkout_types", "carrier_types"
1846
+ add_foreign_key "carrier_type_has_checkout_types", "checkout_types"
1847
+ add_foreign_key "checked_items", "baskets"
1848
+ add_foreign_key "checked_items", "items"
1849
+ add_foreign_key "checked_items", "users"
1850
+ add_foreign_key "checkins", "checkouts"
1851
+ add_foreign_key "checkins", "items"
1852
+ add_foreign_key "checkout_stat_has_manifestations", "manifestations"
1853
+ add_foreign_key "checkout_stat_has_users", "user_checkout_stats"
1854
+ add_foreign_key "checkout_stat_has_users", "users"
1855
+ add_foreign_key "checkouts", "checkins"
1856
+ add_foreign_key "checkouts", "items"
1857
+ add_foreign_key "checkouts", "libraries"
1858
+ add_foreign_key "checkouts", "shelves"
1859
+ add_foreign_key "checkouts", "users"
1860
+ add_foreign_key "demands", "items"
1861
+ add_foreign_key "demands", "messages"
1862
+ add_foreign_key "demands", "users"
1863
+ add_foreign_key "doi_records", "manifestations"
1864
+ add_foreign_key "event_export_files", "users"
1865
+ add_foreign_key "event_import_files", "event_categories", column: "default_event_category_id"
1866
+ add_foreign_key "event_import_files", "libraries", column: "default_library_id"
1867
+ add_foreign_key "event_import_files", "users"
1868
+ add_foreign_key "events", "event_categories"
1869
+ add_foreign_key "events", "libraries"
1870
+ add_foreign_key "events", "places"
1871
+ add_foreign_key "isbn_record_and_manifestations", "isbn_records"
1872
+ add_foreign_key "isbn_record_and_manifestations", "manifestations"
1873
+ add_foreign_key "issn_record_and_manifestations", "issn_records"
1874
+ add_foreign_key "issn_record_and_manifestations", "manifestations"
1875
+ add_foreign_key "item_has_use_restrictions", "items"
1876
+ add_foreign_key "item_has_use_restrictions", "use_restrictions"
1877
+ add_foreign_key "items", "manifestations"
1878
+ add_foreign_key "jpno_records", "manifestations"
1879
+ add_foreign_key "lending_policies", "items"
1880
+ add_foreign_key "lending_policies", "user_groups"
1881
+ add_foreign_key "libraries", "library_groups"
1882
+ add_foreign_key "library_groups", "users"
1883
+ add_foreign_key "manifestation_checkout_stats", "users"
1884
+ add_foreign_key "manifestation_reserve_stats", "users"
1885
+ add_foreign_key "ndl_bib_id_records", "manifestations"
1886
+ add_foreign_key "ndla_records", "agents"
1887
+ add_foreign_key "participates", "events"
1888
+ add_foreign_key "periodical_and_manifestations", "manifestations"
1889
+ add_foreign_key "periodical_and_manifestations", "periodicals"
1890
+ add_foreign_key "periodicals", "frequencies"
1891
+ add_foreign_key "profiles", "users"
1892
+ add_foreign_key "reserve_stat_has_manifestations", "manifestations"
1893
+ add_foreign_key "reserve_stat_has_users", "user_reserve_stats"
1894
+ add_foreign_key "reserve_stat_has_users", "users"
1895
+ add_foreign_key "reserves", "manifestations"
1896
+ add_foreign_key "reserves", "users"
1897
+ add_foreign_key "retains", "items"
1898
+ add_foreign_key "retains", "reserves"
1899
+ add_foreign_key "user_checkout_stats", "users"
1900
+ add_foreign_key "user_group_has_checkout_types", "checkout_types"
1901
+ add_foreign_key "user_group_has_checkout_types", "user_groups"
1902
+ add_foreign_key "user_has_roles", "roles"
1903
+ add_foreign_key "user_has_roles", "users"
1904
+ add_foreign_key "user_reserve_stats", "users"
1905
+ add_foreign_key "users", "profiles"
1708
1906
  end