enju_event 0.3.2 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/app/controllers/concerns/enju_event/enju_libraries_controller.rb +17 -0
- data/app/controllers/event_categories_controller.rb +1 -1
- data/app/controllers/event_export_files_controller.rb +1 -1
- data/app/controllers/event_import_files_controller.rb +3 -2
- data/app/controllers/event_import_results_controller.rb +4 -4
- data/app/controllers/events_controller.rb +8 -2
- data/app/controllers/participates_controller.rb +1 -1
- data/app/controllers/places_controller.rb +1 -1
- data/app/jobs/event_export_file_job.rb +1 -1
- data/app/jobs/event_import_file_job.rb +1 -1
- data/app/mailers/event_export_mailer.rb +17 -0
- data/app/mailers/event_import_mailer.rb +17 -0
- data/app/models/concerns/enju_event/enju_library.rb +15 -0
- data/app/models/event.rb +37 -24
- data/app/models/event_category.rb +1 -1
- data/app/models/event_export_file.rb +15 -10
- data/app/models/event_export_file_transition.rb +1 -1
- data/app/models/event_import_file.rb +18 -12
- data/app/models/event_import_file_transition.rb +1 -1
- data/app/models/event_import_result.rb +7 -2
- data/app/models/participate.rb +1 -1
- data/app/models/place.rb +1 -1
- data/app/views/event_categories/_form.html.erb +1 -1
- data/app/views/event_export_mailer/completed.en.text.erb +9 -0
- data/app/views/event_export_mailer/completed.ja.text.erb +9 -0
- data/app/views/event_export_mailer/failed.en.text.erb +9 -0
- data/app/views/event_export_mailer/failed.ja.text.erb +9 -0
- data/app/views/event_import_files/_results.html.erb +26 -0
- data/app/views/event_import_files/show.html.erb +70 -74
- data/app/views/event_import_mailer/completed.en.text.erb +9 -0
- data/app/views/event_import_mailer/completed.ja.text.erb +9 -0
- data/app/views/event_import_mailer/failed.en.text.erb +9 -0
- data/app/views/event_import_mailer/failed.ja.text.erb +9 -0
- data/app/views/event_import_results/index.html.erb +0 -11
- data/app/views/event_import_results/index.text.ruby +5 -0
- data/app/views/events/index.html.erb +22 -22
- data/app/views/events/index.text.ruby +7 -0
- data/app/views/layouts/mailer.html.erb +13 -0
- data/app/views/layouts/mailer.text.erb +1 -0
- data/config/brakeman.ignore +66 -0
- data/config/locales/translation_en.yml +12 -0
- data/config/locales/translation_ja.yml +12 -0
- data/lib/enju_event/engine.rb +0 -1
- data/lib/enju_event/version.rb +1 -1
- data/lib/generators/enju_event/setup/setup_generator.rb +1 -1
- data/spec/controllers/event_import_files_controller_spec.rb +2 -2
- data/spec/controllers/event_import_results_controller_spec.rb +2 -2
- data/spec/controllers/events_controller_spec.rb +2 -2
- data/spec/controllers/libraries_controller_spec.rb +41 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +3 -0
- data/spec/dummy/app/models/user.rb +1 -1
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/initializers/assets.rb +1 -0
- data/spec/dummy/config/initializers/mime_types.rb +1 -0
- data/spec/dummy/config/storage.yml +34 -0
- data/spec/dummy/db/migrate/20081025083323_create_countries.rb +4 -4
- data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +2 -4
- data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +4 -5
- data/spec/dummy/db/migrate/20150421023923_create_identities.rb +14 -0
- data/spec/dummy/db/migrate/20151126005552_add_provider_to_identity.rb +5 -0
- data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +0 -8
- data/spec/dummy/db/migrate/20160506144040_create_isbn_records.rb +11 -0
- data/spec/dummy/db/migrate/20180107162659_add_constraints_to_most_recent_for_message_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20180107162711_add_constraints_to_most_recent_for_message_request_transitions.rb +13 -0
- data/spec/dummy/db/migrate/20181026064038_add_login_banner_to_library_group.rb +6 -0
- data/spec/dummy/db/migrate/20181030072731_add_not_null_to_position_on_carrier_type.rb +14 -0
- data/spec/dummy/db/migrate/20181030074920_add_not_null_to_position_on_library.rb +14 -0
- data/spec/dummy/db/migrate/20190208135957_create_active_storage_tables.active_storage.rb +27 -0
- data/spec/dummy/db/migrate/20190311154610_create_periodicals.rb +10 -0
- data/spec/dummy/db/migrate/20190314151124_add_full_name_translations_to_create.rb +7 -0
- data/spec/dummy/db/migrate/20190818075603_add_memo_to_manifestation.rb +5 -0
- data/spec/dummy/db/migrate/20190818075628_add_memo_to_item.rb +5 -0
- data/spec/dummy/db/migrate/20191219122214_create_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425072340_create_manifestation_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425072349_create_item_custom_properties.rb +12 -0
- data/spec/dummy/db/migrate/20200425074758_create_manifestation_custom_values.rb +12 -0
- data/spec/dummy/db/migrate/20200425074822_create_item_custom_values.rb +12 -0
- data/spec/dummy/db/schema.rb +131 -304
- data/spec/factories/event_export_file.rb +5 -0
- data/spec/factories/event_import_file.rb +7 -0
- data/spec/factories/event_import_result.rb +6 -0
- data/spec/mailers/event_export_spec.rb +5 -0
- data/spec/mailers/event_import_spec.rb +5 -0
- data/spec/mailers/previews/event_export_preview.rb +4 -0
- data/spec/mailers/previews/event_import_preview.rb +4 -0
- data/spec/models/event_export_file_spec.rb +1 -1
- data/spec/models/event_import_file_spec.rb +1 -1
- data/spec/rails_helper.rb +6 -0
- data/spec/system/event_import_results_spec.rb +17 -0
- data/spec/system/events_spec.rb +22 -0
- data/spec/views/event_import_results/index.text.ruby_spec.rb +22 -0
- data/spec/views/events/index.json.jbuilder_spec.rb +22 -0
- metadata +405 -315
- data/README.rdoc +0 -10
- data/app/views/event_import_results/index.txt.erb +0 -3
- data/app/views/events/index.txt.erb +0 -4
- data/spec/dummy/db/migrate/032_create_checkins.rb +0 -17
- data/spec/dummy/db/migrate/033_create_checkouts.rb +0 -25
- data/spec/dummy/db/migrate/035_create_reserves.rb +0 -26
- data/spec/dummy/db/migrate/121_create_checked_items.rb +0 -17
- data/spec/dummy/db/migrate/127_create_use_restrictions.rb +0 -16
- data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +0 -16
- data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +0 -16
- data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +0 -17
- data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +0 -25
- data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +0 -18
- data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +0 -17
- data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +0 -17
- data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +0 -17
- data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -15
- data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +0 -17
- data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -23
- data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +0 -9
- data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +0 -9
- data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +0 -9
- data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +0 -5
- data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +0 -6
- data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +0 -5
- data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +0 -8
- data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +0 -5
- data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +0 -5
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +0 -18
- data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +0 -12
- data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +0 -6
- data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +0 -5
- data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +0 -6
- data/spec/support/resque.rb +0 -32
data/spec/dummy/db/schema.rb
CHANGED
@@ -10,7 +10,7 @@
|
|
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:
|
13
|
+
ActiveRecord::Schema.define(version: 2020_04_25_074822) do
|
14
14
|
|
15
15
|
create_table "accepts", force: :cascade do |t|
|
16
16
|
t.integer "basket_id"
|
@@ -23,6 +23,27 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
23
23
|
t.index ["librarian_id"], name: "index_accepts_on_librarian_id"
|
24
24
|
end
|
25
25
|
|
26
|
+
create_table "active_storage_attachments", force: :cascade do |t|
|
27
|
+
t.string "name", null: false
|
28
|
+
t.string "record_type", null: false
|
29
|
+
t.integer "record_id", null: false
|
30
|
+
t.integer "blob_id", null: false
|
31
|
+
t.datetime "created_at", null: false
|
32
|
+
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
33
|
+
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
34
|
+
end
|
35
|
+
|
36
|
+
create_table "active_storage_blobs", force: :cascade do |t|
|
37
|
+
t.string "key", null: false
|
38
|
+
t.string "filename", null: false
|
39
|
+
t.string "content_type"
|
40
|
+
t.text "metadata"
|
41
|
+
t.bigint "byte_size", null: false
|
42
|
+
t.string "checksum", null: false
|
43
|
+
t.datetime "created_at", null: false
|
44
|
+
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
45
|
+
end
|
46
|
+
|
26
47
|
create_table "agent_import_file_transitions", force: :cascade do |t|
|
27
48
|
t.string "to_state"
|
28
49
|
t.text "metadata", default: "{}"
|
@@ -104,7 +125,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
104
125
|
t.string "name", null: false
|
105
126
|
t.text "display_name"
|
106
127
|
t.text "note"
|
107
|
-
t.integer "position"
|
128
|
+
t.integer "position", default: 1, null: false
|
108
129
|
t.datetime "created_at"
|
109
130
|
t.datetime "updated_at"
|
110
131
|
end
|
@@ -181,7 +202,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
181
202
|
t.string "telephone_number"
|
182
203
|
t.string "fax_number"
|
183
204
|
t.string "url"
|
184
|
-
t.integer "position"
|
205
|
+
t.integer "position", default: 1, null: false
|
185
206
|
t.datetime "deleted_at"
|
186
207
|
t.datetime "created_at"
|
187
208
|
t.datetime "updated_at"
|
@@ -191,27 +212,16 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
191
212
|
t.string "name"
|
192
213
|
t.text "display_name"
|
193
214
|
t.text "note"
|
194
|
-
t.integer "position"
|
215
|
+
t.integer "position", default: 1, null: false
|
195
216
|
t.datetime "created_at"
|
196
217
|
t.datetime "updated_at"
|
197
218
|
end
|
198
219
|
|
199
|
-
create_table "carrier_type_has_checkout_types", force: :cascade do |t|
|
200
|
-
t.integer "carrier_type_id", null: false
|
201
|
-
t.integer "checkout_type_id", null: false
|
202
|
-
t.text "note"
|
203
|
-
t.integer "position"
|
204
|
-
t.datetime "created_at"
|
205
|
-
t.datetime "updated_at"
|
206
|
-
t.index ["carrier_type_id"], name: "index_carrier_type_has_checkout_types_on_m_form_id"
|
207
|
-
t.index ["checkout_type_id"], name: "index_carrier_type_has_checkout_types_on_checkout_type_id"
|
208
|
-
end
|
209
|
-
|
210
220
|
create_table "carrier_types", force: :cascade do |t|
|
211
221
|
t.string "name", null: false
|
212
222
|
t.text "display_name"
|
213
223
|
t.text "note"
|
214
|
-
t.integer "position"
|
224
|
+
t.integer "position", default: 1, null: false
|
215
225
|
t.datetime "created_at"
|
216
226
|
t.datetime "updated_at"
|
217
227
|
t.string "attachment_file_name"
|
@@ -220,94 +230,11 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
220
230
|
t.datetime "attachment_updated_at"
|
221
231
|
end
|
222
232
|
|
223
|
-
create_table "checked_items", force: :cascade do |t|
|
224
|
-
t.integer "item_id", null: false
|
225
|
-
t.integer "basket_id", null: false
|
226
|
-
t.datetime "due_date", null: false
|
227
|
-
t.datetime "created_at"
|
228
|
-
t.datetime "updated_at"
|
229
|
-
t.integer "librarian_id"
|
230
|
-
t.index ["basket_id"], name: "index_checked_items_on_basket_id"
|
231
|
-
t.index ["item_id"], name: "index_checked_items_on_item_id"
|
232
|
-
end
|
233
|
-
|
234
|
-
create_table "checkins", force: :cascade do |t|
|
235
|
-
t.integer "item_id", null: false
|
236
|
-
t.integer "librarian_id"
|
237
|
-
t.integer "basket_id"
|
238
|
-
t.datetime "created_at"
|
239
|
-
t.datetime "updated_at"
|
240
|
-
t.integer "lock_version", default: 0, null: false
|
241
|
-
t.index ["basket_id"], name: "index_checkins_on_basket_id"
|
242
|
-
t.index ["item_id"], name: "index_checkins_on_item_id"
|
243
|
-
t.index ["librarian_id"], name: "index_checkins_on_librarian_id"
|
244
|
-
end
|
245
|
-
|
246
|
-
create_table "checkout_stat_has_manifestations", force: :cascade do |t|
|
247
|
-
t.integer "manifestation_checkout_stat_id", null: false
|
248
|
-
t.integer "manifestation_id", null: false
|
249
|
-
t.integer "checkouts_count"
|
250
|
-
t.datetime "created_at"
|
251
|
-
t.datetime "updated_at"
|
252
|
-
t.index ["manifestation_checkout_stat_id"], name: "index_checkout_stat_has_manifestations_on_checkout_stat_id"
|
253
|
-
t.index ["manifestation_id"], name: "index_checkout_stat_has_manifestations_on_manifestation_id"
|
254
|
-
end
|
255
|
-
|
256
|
-
create_table "checkout_stat_has_users", force: :cascade do |t|
|
257
|
-
t.integer "user_checkout_stat_id", null: false
|
258
|
-
t.integer "user_id", null: false
|
259
|
-
t.integer "checkouts_count", default: 0, null: false
|
260
|
-
t.datetime "created_at"
|
261
|
-
t.datetime "updated_at"
|
262
|
-
t.index ["user_checkout_stat_id"], name: "index_checkout_stat_has_users_on_user_checkout_stat_id"
|
263
|
-
t.index ["user_id"], name: "index_checkout_stat_has_users_on_user_id"
|
264
|
-
end
|
265
|
-
|
266
|
-
create_table "checkout_types", force: :cascade do |t|
|
267
|
-
t.string "name", null: false
|
268
|
-
t.text "display_name"
|
269
|
-
t.text "note"
|
270
|
-
t.integer "position"
|
271
|
-
t.datetime "created_at"
|
272
|
-
t.datetime "updated_at"
|
273
|
-
t.index ["name"], name: "index_checkout_types_on_name"
|
274
|
-
end
|
275
|
-
|
276
|
-
create_table "checkouts", force: :cascade do |t|
|
277
|
-
t.integer "user_id"
|
278
|
-
t.integer "item_id", null: false
|
279
|
-
t.integer "checkin_id"
|
280
|
-
t.integer "librarian_id"
|
281
|
-
t.integer "basket_id"
|
282
|
-
t.datetime "due_date"
|
283
|
-
t.integer "checkout_renewal_count", default: 0, null: false
|
284
|
-
t.integer "lock_version", default: 0, null: false
|
285
|
-
t.datetime "created_at"
|
286
|
-
t.datetime "updated_at"
|
287
|
-
t.integer "shelf_id"
|
288
|
-
t.index ["basket_id"], name: "index_checkouts_on_basket_id"
|
289
|
-
t.index ["checkin_id"], name: "index_checkouts_on_checkin_id"
|
290
|
-
t.index ["item_id", "basket_id"], name: "index_checkouts_on_item_id_and_basket_id", unique: true
|
291
|
-
t.index ["item_id"], name: "index_checkouts_on_item_id"
|
292
|
-
t.index ["librarian_id"], name: "index_checkouts_on_librarian_id"
|
293
|
-
t.index ["shelf_id"], name: "index_checkouts_on_shelf_id"
|
294
|
-
t.index ["user_id"], name: "index_checkouts_on_user_id"
|
295
|
-
end
|
296
|
-
|
297
|
-
create_table "circulation_statuses", force: :cascade do |t|
|
298
|
-
t.string "name", null: false
|
299
|
-
t.text "display_name"
|
300
|
-
t.text "note"
|
301
|
-
t.integer "position"
|
302
|
-
t.datetime "created_at"
|
303
|
-
t.datetime "updated_at"
|
304
|
-
end
|
305
|
-
|
306
233
|
create_table "colors", force: :cascade do |t|
|
307
234
|
t.integer "library_group_id"
|
308
235
|
t.string "property"
|
309
236
|
t.string "code"
|
310
|
-
t.integer "position"
|
237
|
+
t.integer "position", default: 1, null: false
|
311
238
|
t.datetime "created_at"
|
312
239
|
t.datetime "updated_at"
|
313
240
|
t.index ["library_group_id"], name: "index_colors_on_library_group_id"
|
@@ -317,7 +244,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
317
244
|
t.string "name", null: false
|
318
245
|
t.text "display_name"
|
319
246
|
t.text "note"
|
320
|
-
t.integer "position"
|
247
|
+
t.integer "position", default: 1, null: false
|
321
248
|
t.datetime "created_at"
|
322
249
|
t.datetime "updated_at"
|
323
250
|
end
|
@@ -348,14 +275,24 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
348
275
|
create_table "creates", force: :cascade do |t|
|
349
276
|
t.integer "agent_id", null: false
|
350
277
|
t.integer "work_id", null: false
|
351
|
-
t.integer "position"
|
278
|
+
t.integer "position", default: 1, null: false
|
352
279
|
t.datetime "created_at"
|
353
280
|
t.datetime "updated_at"
|
354
281
|
t.integer "create_type_id"
|
282
|
+
t.json "full_name_translations", default: {}
|
355
283
|
t.index ["agent_id"], name: "index_creates_on_agent_id"
|
356
284
|
t.index ["work_id"], name: "index_creates_on_work_id"
|
357
285
|
end
|
358
286
|
|
287
|
+
create_table "custom_properties", force: :cascade do |t|
|
288
|
+
t.integer "resource_id", null: false
|
289
|
+
t.string "resource_type", null: false
|
290
|
+
t.text "label", null: false
|
291
|
+
t.text "value"
|
292
|
+
t.datetime "created_at", null: false
|
293
|
+
t.datetime "updated_at", null: false
|
294
|
+
end
|
295
|
+
|
359
296
|
create_table "donates", force: :cascade do |t|
|
360
297
|
t.integer "agent_id", null: false
|
361
298
|
t.integer "item_id", null: false
|
@@ -475,7 +412,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
475
412
|
t.string "name", null: false
|
476
413
|
t.text "display_name"
|
477
414
|
t.text "note"
|
478
|
-
t.integer "position"
|
415
|
+
t.integer "position", default: 1, null: false
|
479
416
|
t.datetime "created_at"
|
480
417
|
t.datetime "updated_at"
|
481
418
|
end
|
@@ -484,7 +421,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
484
421
|
t.string "name", null: false
|
485
422
|
t.text "display_name"
|
486
423
|
t.text "note"
|
487
|
-
t.integer "position"
|
424
|
+
t.integer "position", default: 1, null: false
|
488
425
|
t.datetime "created_at"
|
489
426
|
t.datetime "updated_at"
|
490
427
|
end
|
@@ -510,6 +447,19 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
510
447
|
t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
|
511
448
|
end
|
512
449
|
|
450
|
+
create_table "identities", force: :cascade do |t|
|
451
|
+
t.string "name"
|
452
|
+
t.string "email"
|
453
|
+
t.string "password_digest"
|
454
|
+
t.integer "profile_id"
|
455
|
+
t.datetime "created_at", null: false
|
456
|
+
t.datetime "updated_at", null: false
|
457
|
+
t.string "provider"
|
458
|
+
t.index ["email"], name: "index_identities_on_email"
|
459
|
+
t.index ["name"], name: "index_identities_on_name"
|
460
|
+
t.index ["profile_id"], name: "index_identities_on_profile_id"
|
461
|
+
end
|
462
|
+
|
513
463
|
create_table "import_request_transitions", force: :cascade do |t|
|
514
464
|
t.string "to_state"
|
515
465
|
t.text "metadata", default: "{}"
|
@@ -534,13 +484,34 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
534
484
|
t.index ["user_id"], name: "index_import_requests_on_user_id"
|
535
485
|
end
|
536
486
|
|
537
|
-
create_table "
|
487
|
+
create_table "isbn_records", force: :cascade do |t|
|
488
|
+
t.string "body", null: false
|
489
|
+
t.string "isbn_type"
|
490
|
+
t.string "source"
|
491
|
+
t.datetime "created_at", null: false
|
492
|
+
t.datetime "updated_at", null: false
|
493
|
+
t.index ["body"], name: "index_isbn_records_on_body", unique: true
|
494
|
+
end
|
495
|
+
|
496
|
+
create_table "item_custom_properties", force: :cascade do |t|
|
497
|
+
t.string "name", null: false
|
498
|
+
t.text "display_name", null: false
|
499
|
+
t.text "note"
|
500
|
+
t.integer "position", default: 1, null: false
|
501
|
+
t.datetime "created_at", null: false
|
502
|
+
t.datetime "updated_at", null: false
|
503
|
+
t.index ["name"], name: "index_item_custom_properties_on_name", unique: true
|
504
|
+
end
|
505
|
+
|
506
|
+
create_table "item_custom_values", force: :cascade do |t|
|
507
|
+
t.integer "item_custom_property_id", null: false
|
538
508
|
t.integer "item_id", null: false
|
539
|
-
t.
|
540
|
-
t.datetime "created_at"
|
541
|
-
t.datetime "updated_at"
|
542
|
-
t.index ["item_id"], name: "
|
543
|
-
t.index ["
|
509
|
+
t.text "value"
|
510
|
+
t.datetime "created_at", null: false
|
511
|
+
t.datetime "updated_at", null: false
|
512
|
+
t.index ["item_custom_property_id", "item_id"], name: "index_item_custom_values_on_custom_item_property_and_item_id", unique: true
|
513
|
+
t.index ["item_custom_property_id"], name: "index_item_custom_values_on_custom_property_id"
|
514
|
+
t.index ["item_id"], name: "index_item_custom_values_on_item_id"
|
544
515
|
end
|
545
516
|
|
546
517
|
create_table "items", force: :cascade do |t|
|
@@ -560,16 +531,13 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
560
531
|
t.datetime "acquired_at"
|
561
532
|
t.integer "bookstore_id"
|
562
533
|
t.integer "budget_type_id"
|
563
|
-
t.integer "circulation_status_id", default: 5, null: false
|
564
|
-
t.integer "checkout_type_id", default: 1, null: false
|
565
534
|
t.string "binding_item_identifier"
|
566
535
|
t.string "binding_call_number"
|
567
536
|
t.datetime "binded_at"
|
568
537
|
t.integer "manifestation_id", null: false
|
538
|
+
t.text "memo"
|
569
539
|
t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
|
570
540
|
t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
|
571
|
-
t.index ["checkout_type_id"], name: "index_items_on_checkout_type_id"
|
572
|
-
t.index ["circulation_status_id"], name: "index_items_on_circulation_status_id"
|
573
541
|
t.index ["item_identifier"], name: "index_items_on_item_identifier"
|
574
542
|
t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
|
575
543
|
t.index ["required_role_id"], name: "index_items_on_required_role_id"
|
@@ -621,7 +589,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
621
589
|
t.string "call_number_delimiter", default: "|", null: false
|
622
590
|
t.integer "library_group_id", null: false
|
623
591
|
t.integer "users_count", default: 0, null: false
|
624
|
-
t.integer "position"
|
592
|
+
t.integer "position", default: 1, null: false
|
625
593
|
t.integer "country_id"
|
626
594
|
t.datetime "created_at"
|
627
595
|
t.datetime "updated_at"
|
@@ -653,7 +621,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
653
621
|
t.text "old_login_banner"
|
654
622
|
t.text "note"
|
655
623
|
t.integer "country_id"
|
656
|
-
t.integer "position"
|
624
|
+
t.integer "position", default: 1, null: false
|
657
625
|
t.datetime "created_at"
|
658
626
|
t.datetime "updated_at"
|
659
627
|
t.text "admin_networks"
|
@@ -670,6 +638,8 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
670
638
|
t.integer "header_logo_file_size"
|
671
639
|
t.datetime "header_logo_updated_at"
|
672
640
|
t.text "header_logo_meta"
|
641
|
+
t.json "login_banner_translations", default: "\"{}\"", null: false
|
642
|
+
t.json "footer_banner_translations", default: "\"{}\"", null: false
|
673
643
|
t.index ["short_name"], name: "index_library_groups_on_short_name"
|
674
644
|
t.index ["user_id"], name: "index_library_groups_on_user_id"
|
675
645
|
end
|
@@ -678,32 +648,30 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
678
648
|
t.string "name", null: false
|
679
649
|
t.string "display_name"
|
680
650
|
t.text "note"
|
681
|
-
t.integer "position"
|
651
|
+
t.integer "position", default: 1, null: false
|
682
652
|
t.datetime "created_at"
|
683
653
|
t.datetime "updated_at"
|
684
654
|
end
|
685
655
|
|
686
|
-
create_table "
|
687
|
-
t.string "
|
688
|
-
t.text "
|
689
|
-
t.
|
690
|
-
t.integer "
|
691
|
-
t.datetime "created_at"
|
692
|
-
t.datetime "updated_at"
|
693
|
-
t.index ["
|
694
|
-
t.index ["sort_key", "manifestation_checkout_stat_id"], name: "index_manifestation_checkout_stat_transitions_on_transition", unique: true
|
656
|
+
create_table "manifestation_custom_properties", force: :cascade do |t|
|
657
|
+
t.string "name", null: false
|
658
|
+
t.text "display_name", null: false
|
659
|
+
t.text "note"
|
660
|
+
t.integer "position", default: 1, null: false
|
661
|
+
t.datetime "created_at", null: false
|
662
|
+
t.datetime "updated_at", null: false
|
663
|
+
t.index ["name"], name: "index_manifestation_custom_properties_on_name", unique: true
|
695
664
|
end
|
696
665
|
|
697
|
-
create_table "
|
698
|
-
t.
|
699
|
-
t.
|
700
|
-
t.text "
|
701
|
-
t.datetime "created_at"
|
702
|
-
t.datetime "updated_at"
|
703
|
-
t.
|
704
|
-
t.
|
705
|
-
t.
|
706
|
-
t.index ["user_id"], name: "index_manifestation_checkout_stats_on_user_id"
|
666
|
+
create_table "manifestation_custom_values", force: :cascade do |t|
|
667
|
+
t.integer "manifestation_custom_property_id", null: false
|
668
|
+
t.integer "manifestation_id", null: false
|
669
|
+
t.text "value"
|
670
|
+
t.datetime "created_at", null: false
|
671
|
+
t.datetime "updated_at", null: false
|
672
|
+
t.index ["manifestation_custom_property_id", "manifestation_id"], name: "index_manifestation_custom_values_on_property_manifestation", unique: true
|
673
|
+
t.index ["manifestation_custom_property_id"], name: "index_manifestation_custom_values_on_custom_property_id"
|
674
|
+
t.index ["manifestation_id"], name: "index_manifestation_custom_values_on_manifestation_id"
|
707
675
|
end
|
708
676
|
|
709
677
|
create_table "manifestation_relationship_types", force: :cascade do |t|
|
@@ -726,29 +694,6 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
726
694
|
t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
|
727
695
|
end
|
728
696
|
|
729
|
-
create_table "manifestation_reserve_stat_transitions", force: :cascade do |t|
|
730
|
-
t.string "to_state"
|
731
|
-
t.text "metadata", default: "{}"
|
732
|
-
t.integer "sort_key"
|
733
|
-
t.integer "manifestation_reserve_stat_id"
|
734
|
-
t.datetime "created_at"
|
735
|
-
t.datetime "updated_at"
|
736
|
-
t.index ["manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_stat_id"
|
737
|
-
t.index ["sort_key", "manifestation_reserve_stat_id"], name: "index_manifestation_reserve_stat_transitions_on_transition", unique: true
|
738
|
-
end
|
739
|
-
|
740
|
-
create_table "manifestation_reserve_stats", force: :cascade do |t|
|
741
|
-
t.datetime "start_date"
|
742
|
-
t.datetime "end_date"
|
743
|
-
t.text "note"
|
744
|
-
t.datetime "created_at"
|
745
|
-
t.datetime "updated_at"
|
746
|
-
t.datetime "started_at"
|
747
|
-
t.datetime "completed_at"
|
748
|
-
t.integer "user_id"
|
749
|
-
t.index ["user_id"], name: "index_manifestation_reserve_stats_on_user_id"
|
750
|
-
end
|
751
|
-
|
752
697
|
create_table "manifestations", force: :cascade do |t|
|
753
698
|
t.text "original_title", null: false
|
754
699
|
t.text "title_alternative"
|
@@ -809,6 +754,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
809
754
|
t.text "publication_place"
|
810
755
|
t.text "extent"
|
811
756
|
t.text "dimensions"
|
757
|
+
t.text "memo"
|
812
758
|
t.index ["access_address"], name: "index_manifestations_on_access_address"
|
813
759
|
t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
|
814
760
|
t.index ["doi"], name: "index_manifestations_on_doi"
|
@@ -832,7 +778,8 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
832
778
|
t.integer "message_request_id"
|
833
779
|
t.datetime "created_at"
|
834
780
|
t.datetime "updated_at"
|
835
|
-
t.boolean "most_recent"
|
781
|
+
t.boolean "most_recent", null: false
|
782
|
+
t.index ["message_request_id", "most_recent"], name: "index_message_request_transitions_parent_most_recent", unique: true, where: "most_recent"
|
836
783
|
t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
|
837
784
|
t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
|
838
785
|
end
|
@@ -866,7 +813,8 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
866
813
|
t.integer "message_id"
|
867
814
|
t.datetime "created_at"
|
868
815
|
t.datetime "updated_at"
|
869
|
-
t.boolean "most_recent"
|
816
|
+
t.boolean "most_recent", null: false
|
817
|
+
t.index ["message_id", "most_recent"], name: "index_message_transitions_parent_most_recent", unique: true, where: "most_recent"
|
870
818
|
t.index ["message_id"], name: "index_message_transitions_on_message_id"
|
871
819
|
t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
|
872
820
|
end
|
@@ -893,7 +841,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
893
841
|
create_table "owns", force: :cascade do |t|
|
894
842
|
t.integer "agent_id", null: false
|
895
843
|
t.integer "item_id", null: false
|
896
|
-
t.integer "position"
|
844
|
+
t.integer "position", default: 1, null: false
|
897
845
|
t.datetime "created_at"
|
898
846
|
t.datetime "updated_at"
|
899
847
|
t.index ["agent_id"], name: "index_owns_on_agent_id"
|
@@ -910,6 +858,14 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
910
858
|
t.index ["event_id"], name: "index_participates_on_event_id"
|
911
859
|
end
|
912
860
|
|
861
|
+
create_table "periodicals", force: :cascade do |t|
|
862
|
+
t.text "original_title", null: false
|
863
|
+
t.integer "frequency_id", null: false
|
864
|
+
t.datetime "created_at", null: false
|
865
|
+
t.datetime "updated_at", null: false
|
866
|
+
t.index ["frequency_id"], name: "index_periodicals_on_frequency_id"
|
867
|
+
end
|
868
|
+
|
913
869
|
create_table "picture_files", force: :cascade do |t|
|
914
870
|
t.integer "picture_attachable_id"
|
915
871
|
t.string "picture_attachable_type"
|
@@ -954,10 +910,11 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
954
910
|
create_table "produces", force: :cascade do |t|
|
955
911
|
t.integer "agent_id", null: false
|
956
912
|
t.integer "manifestation_id", null: false
|
957
|
-
t.integer "position"
|
913
|
+
t.integer "position", default: 1, null: false
|
958
914
|
t.datetime "created_at"
|
959
915
|
t.datetime "updated_at"
|
960
916
|
t.integer "produce_type_id"
|
917
|
+
t.json "full_name_translations", default: {}
|
961
918
|
t.index ["agent_id"], name: "index_produces_on_agent_id"
|
962
919
|
t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
|
963
920
|
end
|
@@ -974,12 +931,11 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
974
931
|
t.integer "required_role_id"
|
975
932
|
t.datetime "created_at"
|
976
933
|
t.datetime "updated_at"
|
977
|
-
t.string "checkout_icalendar_token"
|
978
|
-
t.boolean "save_checkout_history", default: false, null: false
|
979
934
|
t.datetime "expired_at"
|
980
935
|
t.text "full_name_transcription"
|
981
936
|
t.datetime "date_of_birth"
|
982
|
-
t.index ["
|
937
|
+
t.index ["library_id"], name: "index_profiles_on_library_id"
|
938
|
+
t.index ["user_group_id"], name: "index_profiles_on_user_group_id"
|
983
939
|
t.index ["user_id"], name: "index_profiles_on_user_id"
|
984
940
|
t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
|
985
941
|
end
|
@@ -996,10 +952,11 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
996
952
|
create_table "realizes", force: :cascade do |t|
|
997
953
|
t.integer "agent_id", null: false
|
998
954
|
t.integer "expression_id", null: false
|
999
|
-
t.integer "position"
|
955
|
+
t.integer "position", default: 1, null: false
|
1000
956
|
t.datetime "created_at"
|
1001
957
|
t.datetime "updated_at"
|
1002
958
|
t.integer "realize_type_id"
|
959
|
+
t.json "full_name_translations", default: {}
|
1003
960
|
t.index ["agent_id"], name: "index_realizes_on_agent_id"
|
1004
961
|
t.index ["expression_id"], name: "index_realizes_on_expression_id"
|
1005
962
|
end
|
@@ -1008,7 +965,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1008
965
|
t.string "name", null: false
|
1009
966
|
t.text "display_name"
|
1010
967
|
t.text "note"
|
1011
|
-
t.integer "position"
|
968
|
+
t.integer "position", default: 1, null: false
|
1012
969
|
t.datetime "created_at"
|
1013
970
|
t.datetime "updated_at"
|
1014
971
|
end
|
@@ -1017,62 +974,9 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1017
974
|
t.string "name", null: false
|
1018
975
|
t.text "display_name"
|
1019
976
|
t.text "note"
|
1020
|
-
t.integer "position"
|
1021
|
-
t.datetime "created_at"
|
1022
|
-
t.datetime "updated_at"
|
1023
|
-
end
|
1024
|
-
|
1025
|
-
create_table "reserve_stat_has_manifestations", force: :cascade do |t|
|
1026
|
-
t.integer "manifestation_reserve_stat_id", null: false
|
1027
|
-
t.integer "manifestation_id", null: false
|
1028
|
-
t.integer "reserves_count"
|
977
|
+
t.integer "position", default: 1, null: false
|
1029
978
|
t.datetime "created_at"
|
1030
979
|
t.datetime "updated_at"
|
1031
|
-
t.index ["manifestation_id"], name: "index_reserve_stat_has_manifestations_on_manifestation_id"
|
1032
|
-
t.index ["manifestation_reserve_stat_id"], name: "index_reserve_stat_has_manifestations_on_m_reserve_stat_id"
|
1033
|
-
end
|
1034
|
-
|
1035
|
-
create_table "reserve_stat_has_users", force: :cascade do |t|
|
1036
|
-
t.integer "user_reserve_stat_id", null: false
|
1037
|
-
t.integer "user_id", null: false
|
1038
|
-
t.integer "reserves_count"
|
1039
|
-
t.datetime "created_at"
|
1040
|
-
t.datetime "updated_at"
|
1041
|
-
t.index ["user_id"], name: "index_reserve_stat_has_users_on_user_id"
|
1042
|
-
t.index ["user_reserve_stat_id"], name: "index_reserve_stat_has_users_on_user_reserve_stat_id"
|
1043
|
-
end
|
1044
|
-
|
1045
|
-
create_table "reserve_transitions", force: :cascade do |t|
|
1046
|
-
t.string "to_state"
|
1047
|
-
t.text "metadata", default: "{}"
|
1048
|
-
t.integer "sort_key"
|
1049
|
-
t.integer "reserve_id"
|
1050
|
-
t.datetime "created_at"
|
1051
|
-
t.datetime "updated_at"
|
1052
|
-
t.index ["reserve_id"], name: "index_reserve_transitions_on_reserve_id"
|
1053
|
-
t.index ["sort_key", "reserve_id"], name: "index_reserve_transitions_on_sort_key_and_reserve_id", unique: true
|
1054
|
-
end
|
1055
|
-
|
1056
|
-
create_table "reserves", force: :cascade do |t|
|
1057
|
-
t.integer "user_id", null: false
|
1058
|
-
t.integer "manifestation_id", null: false
|
1059
|
-
t.integer "item_id"
|
1060
|
-
t.integer "request_status_type_id", null: false
|
1061
|
-
t.datetime "checked_out_at"
|
1062
|
-
t.datetime "created_at"
|
1063
|
-
t.datetime "updated_at"
|
1064
|
-
t.datetime "canceled_at"
|
1065
|
-
t.datetime "expired_at"
|
1066
|
-
t.datetime "deleted_at"
|
1067
|
-
t.boolean "expiration_notice_to_patron", default: false
|
1068
|
-
t.boolean "expiration_notice_to_library", default: false
|
1069
|
-
t.datetime "retained_at"
|
1070
|
-
t.datetime "postponed_at"
|
1071
|
-
t.integer "lock_version", default: 0, null: false
|
1072
|
-
t.index ["item_id"], name: "index_reserves_on_item_id"
|
1073
|
-
t.index ["manifestation_id"], name: "index_reserves_on_manifestation_id"
|
1074
|
-
t.index ["request_status_type_id"], name: "index_reserves_on_request_status_type_id"
|
1075
|
-
t.index ["user_id"], name: "index_reserves_on_user_id"
|
1076
980
|
end
|
1077
981
|
|
1078
982
|
create_table "resource_export_file_transitions", force: :cascade do |t|
|
@@ -1166,7 +1070,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1166
1070
|
t.text "query_param", null: false
|
1167
1071
|
t.text "additional_param"
|
1168
1072
|
t.text "note"
|
1169
|
-
t.integer "position"
|
1073
|
+
t.integer "position", default: 1, null: false
|
1170
1074
|
t.datetime "created_at"
|
1171
1075
|
t.datetime "updated_at"
|
1172
1076
|
end
|
@@ -1216,7 +1120,7 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1216
1120
|
t.text "note"
|
1217
1121
|
t.integer "library_id", null: false
|
1218
1122
|
t.integer "items_count", default: 0, null: false
|
1219
|
-
t.integer "position"
|
1123
|
+
t.integer "position", default: 1, null: false
|
1220
1124
|
t.datetime "created_at"
|
1221
1125
|
t.datetime "updated_at"
|
1222
1126
|
t.datetime "deleted_at"
|
@@ -1248,38 +1152,6 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1248
1152
|
t.index ["user_id"], name: "index_subscriptions_on_user_id"
|
1249
1153
|
end
|
1250
1154
|
|
1251
|
-
create_table "use_restrictions", force: :cascade do |t|
|
1252
|
-
t.string "name", null: false
|
1253
|
-
t.text "display_name"
|
1254
|
-
t.text "note"
|
1255
|
-
t.integer "position"
|
1256
|
-
t.datetime "created_at"
|
1257
|
-
t.datetime "updated_at"
|
1258
|
-
end
|
1259
|
-
|
1260
|
-
create_table "user_checkout_stat_transitions", force: :cascade do |t|
|
1261
|
-
t.string "to_state"
|
1262
|
-
t.text "metadata", default: "{}"
|
1263
|
-
t.integer "sort_key"
|
1264
|
-
t.integer "user_checkout_stat_id"
|
1265
|
-
t.datetime "created_at"
|
1266
|
-
t.datetime "updated_at"
|
1267
|
-
t.index ["sort_key", "user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1268
|
-
t.index ["user_checkout_stat_id"], name: "index_user_checkout_stat_transitions_on_user_checkout_stat_id"
|
1269
|
-
end
|
1270
|
-
|
1271
|
-
create_table "user_checkout_stats", force: :cascade do |t|
|
1272
|
-
t.datetime "start_date"
|
1273
|
-
t.datetime "end_date"
|
1274
|
-
t.text "note"
|
1275
|
-
t.datetime "created_at"
|
1276
|
-
t.datetime "updated_at"
|
1277
|
-
t.datetime "started_at"
|
1278
|
-
t.datetime "completed_at"
|
1279
|
-
t.integer "user_id"
|
1280
|
-
t.index ["user_id"], name: "index_user_checkout_stats_on_user_id"
|
1281
|
-
end
|
1282
|
-
|
1283
1155
|
create_table "user_export_file_transitions", force: :cascade do |t|
|
1284
1156
|
t.string "to_state"
|
1285
1157
|
t.text "metadata", default: "{}"
|
@@ -1306,30 +1178,11 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1306
1178
|
t.index ["user_id"], name: "index_user_export_files_on_user_id"
|
1307
1179
|
end
|
1308
1180
|
|
1309
|
-
create_table "user_group_has_checkout_types", force: :cascade do |t|
|
1310
|
-
t.integer "user_group_id", null: false
|
1311
|
-
t.integer "checkout_type_id", null: false
|
1312
|
-
t.integer "checkout_limit", default: 0, null: false
|
1313
|
-
t.integer "checkout_period", default: 0, null: false
|
1314
|
-
t.integer "checkout_renewal_limit", default: 0, null: false
|
1315
|
-
t.integer "reservation_limit", default: 0, null: false
|
1316
|
-
t.integer "reservation_expired_period", default: 7, null: false
|
1317
|
-
t.boolean "set_due_date_before_closing_day", default: false, null: false
|
1318
|
-
t.datetime "fixed_due_date"
|
1319
|
-
t.text "note"
|
1320
|
-
t.integer "position"
|
1321
|
-
t.datetime "created_at"
|
1322
|
-
t.datetime "updated_at"
|
1323
|
-
t.integer "current_checkout_count"
|
1324
|
-
t.index ["checkout_type_id"], name: "index_user_group_has_checkout_types_on_checkout_type_id"
|
1325
|
-
t.index ["user_group_id"], name: "index_user_group_has_checkout_types_on_user_group_id"
|
1326
|
-
end
|
1327
|
-
|
1328
1181
|
create_table "user_groups", force: :cascade do |t|
|
1329
1182
|
t.string "name"
|
1330
1183
|
t.text "display_name"
|
1331
1184
|
t.text "note"
|
1332
|
-
t.integer "position"
|
1185
|
+
t.integer "position", default: 1, null: false
|
1333
1186
|
t.datetime "created_at"
|
1334
1187
|
t.datetime "updated_at"
|
1335
1188
|
t.datetime "deleted_at"
|
@@ -1341,8 +1194,8 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1341
1194
|
end
|
1342
1195
|
|
1343
1196
|
create_table "user_has_roles", force: :cascade do |t|
|
1344
|
-
t.integer "user_id"
|
1345
|
-
t.integer "role_id"
|
1197
|
+
t.integer "user_id", null: false
|
1198
|
+
t.integer "role_id", null: false
|
1346
1199
|
t.datetime "created_at"
|
1347
1200
|
t.datetime "updated_at"
|
1348
1201
|
t.index ["role_id"], name: "index_user_has_roles_on_role_id"
|
@@ -1392,29 +1245,6 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1392
1245
|
t.index ["user_import_file_id"], name: "index_user_import_results_on_user_import_file_id"
|
1393
1246
|
end
|
1394
1247
|
|
1395
|
-
create_table "user_reserve_stat_transitions", force: :cascade do |t|
|
1396
|
-
t.string "to_state"
|
1397
|
-
t.text "metadata", default: "{}"
|
1398
|
-
t.integer "sort_key"
|
1399
|
-
t.integer "user_reserve_stat_id"
|
1400
|
-
t.datetime "created_at"
|
1401
|
-
t.datetime "updated_at"
|
1402
|
-
t.index ["sort_key", "user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_sort_key_and_stat_id", unique: true
|
1403
|
-
t.index ["user_reserve_stat_id"], name: "index_user_reserve_stat_transitions_on_user_reserve_stat_id"
|
1404
|
-
end
|
1405
|
-
|
1406
|
-
create_table "user_reserve_stats", force: :cascade do |t|
|
1407
|
-
t.datetime "start_date"
|
1408
|
-
t.datetime "end_date"
|
1409
|
-
t.text "note"
|
1410
|
-
t.datetime "created_at"
|
1411
|
-
t.datetime "updated_at"
|
1412
|
-
t.datetime "started_at"
|
1413
|
-
t.datetime "completed_at"
|
1414
|
-
t.integer "user_id"
|
1415
|
-
t.index ["user_id"], name: "index_user_reserve_stats_on_user_id"
|
1416
|
-
end
|
1417
|
-
|
1418
1248
|
create_table "users", force: :cascade do |t|
|
1419
1249
|
t.string "email", default: "", null: false
|
1420
1250
|
t.string "encrypted_password", default: "", null: false
|
@@ -1428,8 +1258,6 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1428
1258
|
t.string "last_sign_in_ip"
|
1429
1259
|
t.datetime "created_at"
|
1430
1260
|
t.datetime "updated_at"
|
1431
|
-
t.boolean "save_checkout_history", default: false, null: false
|
1432
|
-
t.string "checkout_icalendar_token"
|
1433
1261
|
t.string "username"
|
1434
1262
|
t.datetime "deleted_at"
|
1435
1263
|
t.datetime "expired_at"
|
@@ -1437,7 +1265,6 @@ ActiveRecord::Schema.define(version: 20181119170645) do
|
|
1437
1265
|
t.string "unlock_token"
|
1438
1266
|
t.datetime "locked_at"
|
1439
1267
|
t.datetime "confirmed_at"
|
1440
|
-
t.index ["checkout_icalendar_token"], name: "index_users_on_checkout_icalendar_token", unique: true
|
1441
1268
|
t.index ["email"], name: "index_users_on_email"
|
1442
1269
|
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
|
1443
1270
|
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
|