enju_message 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -19,11 +18,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
19
18
  t.integer "librarian_id"
20
19
  t.datetime "created_at"
21
20
  t.datetime "updated_at"
21
+ t.index ["basket_id"], name: "index_accepts_on_basket_id"
22
+ t.index ["item_id"], name: "index_accepts_on_item_id"
22
23
  end
23
24
 
24
- add_index "accepts", ["basket_id"], name: "index_accepts_on_basket_id"
25
- add_index "accepts", ["item_id"], name: "index_accepts_on_item_id"
26
-
27
25
  create_table "agent_import_file_transitions", force: :cascade do |t|
28
26
  t.string "to_state"
29
27
  t.text "metadata", default: "{}"
@@ -31,11 +29,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
31
29
  t.integer "agent_import_file_id"
32
30
  t.datetime "created_at"
33
31
  t.datetime "updated_at"
32
+ t.index ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
33
+ t.index ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
34
34
  end
35
35
 
36
- add_index "agent_import_file_transitions", ["agent_import_file_id"], name: "index_agent_import_file_transitions_on_agent_import_file_id"
37
- add_index "agent_import_file_transitions", ["sort_key", "agent_import_file_id"], name: "index_agent_import_file_transitions_on_sort_key_and_file_id", unique: true
38
-
39
36
  create_table "agent_import_files", force: :cascade do |t|
40
37
  t.integer "parent_id"
41
38
  t.string "content_type"
@@ -53,11 +50,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
53
50
  t.text "error_message"
54
51
  t.string "edit_mode"
55
52
  t.string "user_encoding"
53
+ t.index ["parent_id"], name: "index_agent_import_files_on_parent_id"
54
+ t.index ["user_id"], name: "index_agent_import_files_on_user_id"
56
55
  end
57
56
 
58
- add_index "agent_import_files", ["parent_id"], name: "index_agent_import_files_on_parent_id"
59
- add_index "agent_import_files", ["user_id"], name: "index_agent_import_files_on_user_id"
60
-
61
57
  create_table "agent_import_results", force: :cascade do |t|
62
58
  t.integer "agent_import_file_id"
63
59
  t.integer "agent_id"
@@ -77,11 +73,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
77
73
  t.integer "agent_merge_list_id", null: false
78
74
  t.datetime "created_at"
79
75
  t.datetime "updated_at"
76
+ t.index ["agent_id"], name: "index_agent_merges_on_agent_id"
77
+ t.index ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
80
78
  end
81
79
 
82
- add_index "agent_merges", ["agent_id"], name: "index_agent_merges_on_agent_id"
83
- add_index "agent_merges", ["agent_merge_list_id"], name: "index_agent_merges_on_agent_merge_list_id"
84
-
85
80
  create_table "agent_relationship_types", force: :cascade do |t|
86
81
  t.string "name", null: false
87
82
  t.text "display_name"
@@ -98,11 +93,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
98
93
  t.datetime "created_at"
99
94
  t.datetime "updated_at"
100
95
  t.integer "position"
96
+ t.index ["child_id"], name: "index_agent_relationships_on_child_id"
97
+ t.index ["parent_id"], name: "index_agent_relationships_on_parent_id"
101
98
  end
102
99
 
103
- add_index "agent_relationships", ["child_id"], name: "index_agent_relationships_on_child_id"
104
- add_index "agent_relationships", ["parent_id"], name: "index_agent_relationships_on_parent_id"
105
-
106
100
  create_table "agent_types", force: :cascade do |t|
107
101
  t.string "name", null: false
108
102
  t.text "display_name"
@@ -158,24 +152,22 @@ ActiveRecord::Schema.define(version: 20160814165332) do
158
152
  t.string "birth_date"
159
153
  t.string "death_date"
160
154
  t.string "agent_identifier"
155
+ t.index ["agent_identifier"], name: "index_agents_on_agent_identifier"
156
+ t.index ["country_id"], name: "index_agents_on_country_id"
157
+ t.index ["full_name"], name: "index_agents_on_full_name"
158
+ t.index ["language_id"], name: "index_agents_on_language_id"
159
+ t.index ["required_role_id"], name: "index_agents_on_required_role_id"
161
160
  end
162
161
 
163
- add_index "agents", ["agent_identifier"], name: "index_agents_on_agent_identifier"
164
- add_index "agents", ["country_id"], name: "index_agents_on_country_id"
165
- add_index "agents", ["full_name"], name: "index_agents_on_full_name"
166
- add_index "agents", ["language_id"], name: "index_agents_on_language_id"
167
- add_index "agents", ["required_role_id"], name: "index_agents_on_required_role_id"
168
-
169
162
  create_table "baskets", force: :cascade do |t|
170
163
  t.integer "user_id"
171
164
  t.text "note"
172
165
  t.integer "lock_version", default: 0, null: false
173
166
  t.datetime "created_at"
174
167
  t.datetime "updated_at"
168
+ t.index ["user_id"], name: "index_baskets_on_user_id"
175
169
  end
176
170
 
177
- add_index "baskets", ["user_id"], name: "index_baskets_on_user_id"
178
-
179
171
  create_table "bookstores", force: :cascade do |t|
180
172
  t.text "name", null: false
181
173
  t.string "zip_code"
@@ -215,10 +207,9 @@ ActiveRecord::Schema.define(version: 20160814165332) do
215
207
  t.integer "position"
216
208
  t.datetime "created_at"
217
209
  t.datetime "updated_at"
210
+ t.index ["library_group_id"], name: "index_colors_on_library_group_id"
218
211
  end
219
212
 
220
- add_index "colors", ["library_group_id"], name: "index_colors_on_library_group_id"
221
-
222
213
  create_table "content_types", force: :cascade do |t|
223
214
  t.string "name", null: false
224
215
  t.text "display_name"
@@ -236,13 +227,12 @@ ActiveRecord::Schema.define(version: 20160814165332) do
236
227
  t.string "numeric_3"
237
228
  t.text "note"
238
229
  t.integer "position"
230
+ t.index ["alpha_2"], name: "index_countries_on_alpha_2"
231
+ t.index ["alpha_3"], name: "index_countries_on_alpha_3"
232
+ t.index ["name"], name: "index_countries_on_name"
233
+ t.index ["numeric_3"], name: "index_countries_on_numeric_3"
239
234
  end
240
235
 
241
- add_index "countries", ["alpha_2"], name: "index_countries_on_alpha_2"
242
- add_index "countries", ["alpha_3"], name: "index_countries_on_alpha_3"
243
- add_index "countries", ["name"], name: "index_countries_on_name"
244
- add_index "countries", ["numeric_3"], name: "index_countries_on_numeric_3"
245
-
246
236
  create_table "create_types", force: :cascade do |t|
247
237
  t.string "name"
248
238
  t.text "display_name"
@@ -259,32 +249,29 @@ ActiveRecord::Schema.define(version: 20160814165332) do
259
249
  t.datetime "created_at"
260
250
  t.datetime "updated_at"
261
251
  t.integer "create_type_id"
252
+ t.index ["agent_id"], name: "index_creates_on_agent_id"
253
+ t.index ["work_id"], name: "index_creates_on_work_id"
262
254
  end
263
255
 
264
- add_index "creates", ["agent_id"], name: "index_creates_on_agent_id"
265
- add_index "creates", ["work_id"], name: "index_creates_on_work_id"
266
-
267
256
  create_table "donates", force: :cascade do |t|
268
257
  t.integer "agent_id", null: false
269
258
  t.integer "item_id", null: false
270
259
  t.datetime "created_at"
271
260
  t.datetime "updated_at"
261
+ t.index ["agent_id"], name: "index_donates_on_agent_id"
262
+ t.index ["item_id"], name: "index_donates_on_item_id"
272
263
  end
273
264
 
274
- add_index "donates", ["agent_id"], name: "index_donates_on_agent_id"
275
- add_index "donates", ["item_id"], name: "index_donates_on_item_id"
276
-
277
265
  create_table "exemplifies", force: :cascade do |t|
278
266
  t.integer "manifestation_id", null: false
279
267
  t.integer "item_id", null: false
280
268
  t.integer "position"
281
269
  t.datetime "created_at"
282
270
  t.datetime "updated_at"
271
+ t.index ["item_id"], name: "index_exemplifies_on_item_id", unique: true
272
+ t.index ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
283
273
  end
284
274
 
285
- add_index "exemplifies", ["item_id"], name: "index_exemplifies_on_item_id", unique: true
286
- add_index "exemplifies", ["manifestation_id"], name: "index_exemplifies_on_manifestation_id"
287
-
288
275
  create_table "extents", force: :cascade do |t|
289
276
  t.string "name", null: false
290
277
  t.text "display_name"
@@ -329,11 +316,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
329
316
  t.integer "position"
330
317
  t.datetime "created_at"
331
318
  t.datetime "updated_at"
319
+ t.index ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
320
+ t.index ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
332
321
  end
333
322
 
334
- add_index "identifiers", ["body", "identifier_type_id"], name: "index_identifiers_on_body_and_identifier_type_id"
335
- add_index "identifiers", ["manifestation_id"], name: "index_identifiers_on_manifestation_id"
336
-
337
323
  create_table "import_request_transitions", force: :cascade do |t|
338
324
  t.string "to_state"
339
325
  t.text "metadata", default: "{}"
@@ -341,23 +327,21 @@ ActiveRecord::Schema.define(version: 20160814165332) do
341
327
  t.integer "import_request_id"
342
328
  t.datetime "created_at"
343
329
  t.datetime "updated_at"
330
+ t.index ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
331
+ t.index ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
344
332
  end
345
333
 
346
- add_index "import_request_transitions", ["import_request_id"], name: "index_import_request_transitions_on_import_request_id"
347
- add_index "import_request_transitions", ["sort_key", "import_request_id"], name: "index_import_request_transitions_on_sort_key_and_request_id", unique: true
348
-
349
334
  create_table "import_requests", force: :cascade do |t|
350
335
  t.string "isbn"
351
336
  t.integer "manifestation_id"
352
337
  t.integer "user_id"
353
338
  t.datetime "created_at"
354
339
  t.datetime "updated_at"
340
+ t.index ["isbn"], name: "index_import_requests_on_isbn"
341
+ t.index ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
342
+ t.index ["user_id"], name: "index_import_requests_on_user_id"
355
343
  end
356
344
 
357
- add_index "import_requests", ["isbn"], name: "index_import_requests_on_isbn"
358
- add_index "import_requests", ["manifestation_id"], name: "index_import_requests_on_manifestation_id"
359
- add_index "import_requests", ["user_id"], name: "index_import_requests_on_user_id"
360
-
361
345
  create_table "items", force: :cascade do |t|
362
346
  t.string "call_number"
363
347
  t.string "item_identifier"
@@ -379,15 +363,14 @@ ActiveRecord::Schema.define(version: 20160814165332) do
379
363
  t.string "binding_call_number"
380
364
  t.datetime "binded_at"
381
365
  t.integer "manifestation_id"
366
+ t.index ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
367
+ t.index ["bookstore_id"], name: "index_items_on_bookstore_id"
368
+ t.index ["item_identifier"], name: "index_items_on_item_identifier"
369
+ t.index ["manifestation_id"], name: "index_items_on_manifestation_id"
370
+ t.index ["required_role_id"], name: "index_items_on_required_role_id"
371
+ t.index ["shelf_id"], name: "index_items_on_shelf_id"
382
372
  end
383
373
 
384
- add_index "items", ["binding_item_identifier"], name: "index_items_on_binding_item_identifier"
385
- add_index "items", ["bookstore_id"], name: "index_items_on_bookstore_id"
386
- add_index "items", ["item_identifier"], name: "index_items_on_item_identifier"
387
- add_index "items", ["manifestation_id"], name: "index_items_on_manifestation_id"
388
- add_index "items", ["required_role_id"], name: "index_items_on_required_role_id"
389
- add_index "items", ["shelf_id"], name: "index_items_on_shelf_id"
390
-
391
374
  create_table "languages", force: :cascade do |t|
392
375
  t.string "name", null: false
393
376
  t.string "native_name"
@@ -397,13 +380,12 @@ ActiveRecord::Schema.define(version: 20160814165332) do
397
380
  t.string "iso_639_3"
398
381
  t.text "note"
399
382
  t.integer "position"
383
+ t.index ["iso_639_1"], name: "index_languages_on_iso_639_1"
384
+ t.index ["iso_639_2"], name: "index_languages_on_iso_639_2"
385
+ t.index ["iso_639_3"], name: "index_languages_on_iso_639_3"
386
+ t.index ["name"], name: "index_languages_on_name", unique: true
400
387
  end
401
388
 
402
- add_index "languages", ["iso_639_1"], name: "index_languages_on_iso_639_1"
403
- add_index "languages", ["iso_639_2"], name: "index_languages_on_iso_639_2"
404
- add_index "languages", ["iso_639_3"], name: "index_languages_on_iso_639_3"
405
- add_index "languages", ["name"], name: "index_languages_on_name", unique: true
406
-
407
389
  create_table "libraries", force: :cascade do |t|
408
390
  t.string "name", null: false
409
391
  t.text "display_name"
@@ -429,11 +411,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
429
411
  t.string "isil"
430
412
  t.float "latitude"
431
413
  t.float "longitude"
414
+ t.index ["library_group_id"], name: "index_libraries_on_library_group_id"
415
+ t.index ["name"], name: "index_libraries_on_name", unique: true
432
416
  end
433
417
 
434
- add_index "libraries", ["library_group_id"], name: "index_libraries_on_library_group_id"
435
- add_index "libraries", ["name"], name: "index_libraries_on_name", unique: true
436
-
437
418
  create_table "library_group_translations", force: :cascade do |t|
438
419
  t.integer "library_group_id", null: false
439
420
  t.string "locale", null: false
@@ -441,11 +422,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
441
422
  t.datetime "updated_at", null: false
442
423
  t.text "login_banner"
443
424
  t.text "footer_banner"
425
+ t.index ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
426
+ t.index ["locale"], name: "index_library_group_translations_on_locale"
444
427
  end
445
428
 
446
- add_index "library_group_translations", ["library_group_id"], name: "index_library_group_translations_on_library_group_id"
447
- add_index "library_group_translations", ["locale"], name: "index_library_group_translations_on_locale"
448
-
449
429
  create_table "library_groups", force: :cascade do |t|
450
430
  t.string "name", null: false
451
431
  t.text "display_name"
@@ -465,11 +445,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
465
445
  t.boolean "family_name_first", default: true
466
446
  t.integer "pub_year_facet_range_interval", default: 10
467
447
  t.integer "user_id"
448
+ t.index ["short_name"], name: "index_library_groups_on_short_name"
449
+ t.index ["user_id"], name: "index_library_groups_on_user_id"
468
450
  end
469
451
 
470
- add_index "library_groups", ["short_name"], name: "index_library_groups_on_short_name"
471
- add_index "library_groups", ["user_id"], name: "index_library_groups_on_user_id"
472
-
473
452
  create_table "licenses", force: :cascade do |t|
474
453
  t.string "name", null: false
475
454
  t.string "display_name"
@@ -495,11 +474,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
495
474
  t.datetime "created_at"
496
475
  t.datetime "updated_at"
497
476
  t.integer "position"
477
+ t.index ["child_id"], name: "index_manifestation_relationships_on_child_id"
478
+ t.index ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
498
479
  end
499
480
 
500
- add_index "manifestation_relationships", ["child_id"], name: "index_manifestation_relationships_on_child_id"
501
- add_index "manifestation_relationships", ["parent_id"], name: "index_manifestation_relationships_on_parent_id"
502
-
503
481
  create_table "manifestations", force: :cascade do |t|
504
482
  t.text "original_title", null: false
505
483
  t.text "title_alternative"
@@ -560,13 +538,12 @@ ActiveRecord::Schema.define(version: 20160814165332) do
560
538
  t.text "extent_of_text"
561
539
  t.text "extent"
562
540
  t.text "dimensions"
541
+ t.index ["access_address"], name: "index_manifestations_on_access_address"
542
+ t.index ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
543
+ t.index ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
544
+ t.index ["updated_at"], name: "index_manifestations_on_updated_at"
563
545
  end
564
546
 
565
- add_index "manifestations", ["access_address"], name: "index_manifestations_on_access_address"
566
- add_index "manifestations", ["date_of_publication"], name: "index_manifestations_on_date_of_publication"
567
- add_index "manifestations", ["manifestation_identifier"], name: "index_manifestations_on_manifestation_identifier"
568
- add_index "manifestations", ["updated_at"], name: "index_manifestations_on_updated_at"
569
-
570
547
  create_table "medium_of_performances", force: :cascade do |t|
571
548
  t.string "name", null: false
572
549
  t.text "display_name"
@@ -584,11 +561,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
584
561
  t.datetime "created_at"
585
562
  t.datetime "updated_at"
586
563
  t.boolean "most_recent"
564
+ t.index ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
565
+ t.index ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
587
566
  end
588
567
 
589
- add_index "message_request_transitions", ["message_request_id"], name: "index_message_request_transitions_on_message_request_id"
590
- add_index "message_request_transitions", ["sort_key", "message_request_id"], name: "index_message_request_transitions_on_sort_key_and_request_id", unique: true
591
-
592
568
  create_table "message_requests", force: :cascade do |t|
593
569
  t.integer "sender_id"
594
570
  t.integer "receiver_id"
@@ -608,10 +584,9 @@ ActiveRecord::Schema.define(version: 20160814165332) do
608
584
  t.string "locale", default: "en"
609
585
  t.datetime "created_at"
610
586
  t.datetime "updated_at"
587
+ t.index ["status"], name: "index_message_templates_on_status", unique: true
611
588
  end
612
589
 
613
- add_index "message_templates", ["status"], name: "index_message_templates_on_status", unique: true
614
-
615
590
  create_table "message_transitions", force: :cascade do |t|
616
591
  t.string "to_state"
617
592
  t.text "metadata", default: "{}"
@@ -620,11 +595,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
620
595
  t.datetime "created_at"
621
596
  t.datetime "updated_at"
622
597
  t.boolean "most_recent"
598
+ t.index ["message_id"], name: "index_message_transitions_on_message_id"
599
+ t.index ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
623
600
  end
624
601
 
625
- add_index "message_transitions", ["message_id"], name: "index_message_transitions_on_message_id"
626
- add_index "message_transitions", ["sort_key", "message_id"], name: "index_message_transitions_on_sort_key_and_message_id", unique: true
627
-
628
602
  create_table "messages", force: :cascade do |t|
629
603
  t.datetime "read_at"
630
604
  t.integer "sender_id"
@@ -638,24 +612,22 @@ ActiveRecord::Schema.define(version: 20160814165332) do
638
612
  t.integer "lft"
639
613
  t.integer "rgt"
640
614
  t.integer "depth"
615
+ t.index ["message_request_id"], name: "index_messages_on_message_request_id"
616
+ t.index ["parent_id"], name: "index_messages_on_parent_id"
617
+ t.index ["receiver_id"], name: "index_messages_on_receiver_id"
618
+ t.index ["sender_id"], name: "index_messages_on_sender_id"
641
619
  end
642
620
 
643
- add_index "messages", ["message_request_id"], name: "index_messages_on_message_request_id"
644
- add_index "messages", ["parent_id"], name: "index_messages_on_parent_id"
645
- add_index "messages", ["receiver_id"], name: "index_messages_on_receiver_id"
646
- add_index "messages", ["sender_id"], name: "index_messages_on_sender_id"
647
-
648
621
  create_table "owns", force: :cascade do |t|
649
622
  t.integer "agent_id", null: false
650
623
  t.integer "item_id", null: false
651
624
  t.integer "position"
652
625
  t.datetime "created_at"
653
626
  t.datetime "updated_at"
627
+ t.index ["agent_id"], name: "index_owns_on_agent_id"
628
+ t.index ["item_id"], name: "index_owns_on_item_id"
654
629
  end
655
630
 
656
- add_index "owns", ["agent_id"], name: "index_owns_on_agent_id"
657
- add_index "owns", ["item_id"], name: "index_owns_on_item_id"
658
-
659
631
  create_table "picture_files", force: :cascade do |t|
660
632
  t.integer "picture_attachable_id"
661
633
  t.string "picture_attachable_type"
@@ -671,10 +643,9 @@ ActiveRecord::Schema.define(version: 20160814165332) do
671
643
  t.datetime "picture_updated_at"
672
644
  t.text "picture_meta"
673
645
  t.string "picture_fingerprint"
646
+ t.index ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
674
647
  end
675
648
 
676
- add_index "picture_files", ["picture_attachable_id", "picture_attachable_type"], name: "index_picture_files_on_picture_attachable_id_and_type"
677
-
678
649
  create_table "produce_types", force: :cascade do |t|
679
650
  t.string "name"
680
651
  t.text "display_name"
@@ -691,11 +662,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
691
662
  t.datetime "created_at"
692
663
  t.datetime "updated_at"
693
664
  t.integer "produce_type_id"
665
+ t.index ["agent_id"], name: "index_produces_on_agent_id"
666
+ t.index ["manifestation_id"], name: "index_produces_on_manifestation_id"
694
667
  end
695
668
 
696
- add_index "produces", ["agent_id"], name: "index_produces_on_agent_id"
697
- add_index "produces", ["manifestation_id"], name: "index_produces_on_manifestation_id"
698
-
699
669
  create_table "profiles", force: :cascade do |t|
700
670
  t.integer "user_id"
701
671
  t.integer "user_group_id"
@@ -711,11 +681,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
711
681
  t.datetime "expired_at"
712
682
  t.text "full_name_transcription"
713
683
  t.datetime "date_of_birth"
684
+ t.index ["user_id"], name: "index_profiles_on_user_id"
685
+ t.index ["user_number"], name: "index_profiles_on_user_number", unique: true
714
686
  end
715
687
 
716
- add_index "profiles", ["user_id"], name: "index_profiles_on_user_id"
717
- add_index "profiles", ["user_number"], name: "index_profiles_on_user_number", unique: true
718
-
719
688
  create_table "realize_types", force: :cascade do |t|
720
689
  t.string "name"
721
690
  t.text "display_name"
@@ -732,11 +701,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
732
701
  t.datetime "created_at"
733
702
  t.datetime "updated_at"
734
703
  t.integer "realize_type_id"
704
+ t.index ["agent_id"], name: "index_realizes_on_agent_id"
705
+ t.index ["expression_id"], name: "index_realizes_on_expression_id"
735
706
  end
736
707
 
737
- add_index "realizes", ["agent_id"], name: "index_realizes_on_agent_id"
738
- add_index "realizes", ["expression_id"], name: "index_realizes_on_expression_id"
739
-
740
708
  create_table "request_status_types", force: :cascade do |t|
741
709
  t.string "name", null: false
742
710
  t.text "display_name"
@@ -762,11 +730,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
762
730
  t.integer "resource_export_file_id"
763
731
  t.datetime "created_at"
764
732
  t.datetime "updated_at"
733
+ t.index ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
734
+ t.index ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
765
735
  end
766
736
 
767
- add_index "resource_export_file_transitions", ["resource_export_file_id"], name: "index_resource_export_file_transitions_on_file_id"
768
- add_index "resource_export_file_transitions", ["sort_key", "resource_export_file_id"], name: "index_resource_export_file_transitions_on_sort_key_and_file_id", unique: true
769
-
770
737
  create_table "resource_export_files", force: :cascade do |t|
771
738
  t.integer "user_id"
772
739
  t.string "resource_export_file_name"
@@ -785,11 +752,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
785
752
  t.integer "resource_import_file_id"
786
753
  t.datetime "created_at"
787
754
  t.datetime "updated_at"
755
+ t.index ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
756
+ t.index ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
788
757
  end
789
758
 
790
- add_index "resource_import_file_transitions", ["resource_import_file_id"], name: "index_resource_import_file_transitions_on_file_id"
791
- add_index "resource_import_file_transitions", ["sort_key", "resource_import_file_id"], name: "index_resource_import_file_transitions_on_sort_key_and_file_id", unique: true
792
-
793
759
  create_table "resource_import_files", force: :cascade do |t|
794
760
  t.integer "parent_id"
795
761
  t.string "content_type"
@@ -808,11 +774,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
808
774
  t.text "error_message"
809
775
  t.string "user_encoding"
810
776
  t.integer "default_shelf_id"
777
+ t.index ["parent_id"], name: "index_resource_import_files_on_parent_id"
778
+ t.index ["user_id"], name: "index_resource_import_files_on_user_id"
811
779
  end
812
780
 
813
- add_index "resource_import_files", ["parent_id"], name: "index_resource_import_files_on_parent_id"
814
- add_index "resource_import_files", ["user_id"], name: "index_resource_import_files_on_user_id"
815
-
816
781
  create_table "resource_import_results", force: :cascade do |t|
817
782
  t.integer "resource_import_file_id"
818
783
  t.integer "manifestation_id"
@@ -821,12 +786,11 @@ ActiveRecord::Schema.define(version: 20160814165332) do
821
786
  t.datetime "created_at"
822
787
  t.datetime "updated_at"
823
788
  t.text "error_message"
789
+ t.index ["item_id"], name: "index_resource_import_results_on_item_id"
790
+ t.index ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
791
+ t.index ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
824
792
  end
825
793
 
826
- add_index "resource_import_results", ["item_id"], name: "index_resource_import_results_on_item_id"
827
- add_index "resource_import_results", ["manifestation_id"], name: "index_resource_import_results_on_manifestation_id"
828
- add_index "resource_import_results", ["resource_import_file_id"], name: "index_resource_import_results_on_resource_import_file_id"
829
-
830
794
  create_table "roles", force: :cascade do |t|
831
795
  t.string "name", null: false
832
796
  t.string "display_name"
@@ -862,11 +826,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
862
826
  t.integer "series_statement_merge_list_id", null: false
863
827
  t.datetime "created_at"
864
828
  t.datetime "updated_at"
829
+ t.index ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
830
+ t.index ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
865
831
  end
866
832
 
867
- add_index "series_statement_merges", ["series_statement_id"], name: "index_series_statement_merges_on_series_statement_id"
868
- add_index "series_statement_merges", ["series_statement_merge_list_id"], name: "index_series_statement_merges_on_list_id"
869
-
870
833
  create_table "series_statements", force: :cascade do |t|
871
834
  t.text "original_title"
872
835
  t.text "numbering"
@@ -886,12 +849,11 @@ ActiveRecord::Schema.define(version: 20160814165332) do
886
849
  t.text "volume_number_transcription_string"
887
850
  t.boolean "series_master"
888
851
  t.integer "root_manifestation_id"
852
+ t.index ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
853
+ t.index ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
854
+ t.index ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
889
855
  end
890
856
 
891
- add_index "series_statements", ["manifestation_id"], name: "index_series_statements_on_manifestation_id"
892
- add_index "series_statements", ["root_manifestation_id"], name: "index_series_statements_on_root_manifestation_id"
893
- add_index "series_statements", ["series_statement_identifier"], name: "index_series_statements_on_series_statement_identifier"
894
-
895
857
  create_table "shelves", force: :cascade do |t|
896
858
  t.string "name", null: false
897
859
  t.text "display_name"
@@ -903,10 +865,9 @@ ActiveRecord::Schema.define(version: 20160814165332) do
903
865
  t.datetime "updated_at"
904
866
  t.datetime "deleted_at"
905
867
  t.boolean "closed", default: false, null: false
868
+ t.index ["library_id"], name: "index_shelves_on_library_id"
906
869
  end
907
870
 
908
- add_index "shelves", ["library_id"], name: "index_shelves_on_library_id"
909
-
910
871
  create_table "subscribes", force: :cascade do |t|
911
872
  t.integer "subscription_id", null: false
912
873
  t.integer "work_id", null: false
@@ -914,11 +875,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
914
875
  t.datetime "end_at", null: false
915
876
  t.datetime "created_at"
916
877
  t.datetime "updated_at"
878
+ t.index ["subscription_id"], name: "index_subscribes_on_subscription_id"
879
+ t.index ["work_id"], name: "index_subscribes_on_work_id"
917
880
  end
918
881
 
919
- add_index "subscribes", ["subscription_id"], name: "index_subscribes_on_subscription_id"
920
- add_index "subscribes", ["work_id"], name: "index_subscribes_on_work_id"
921
-
922
882
  create_table "subscriptions", force: :cascade do |t|
923
883
  t.text "title", null: false
924
884
  t.text "note"
@@ -928,11 +888,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
928
888
  t.integer "subscribes_count", default: 0, null: false
929
889
  t.datetime "created_at"
930
890
  t.datetime "updated_at"
891
+ t.index ["order_list_id"], name: "index_subscriptions_on_order_list_id"
892
+ t.index ["user_id"], name: "index_subscriptions_on_user_id"
931
893
  end
932
894
 
933
- add_index "subscriptions", ["order_list_id"], name: "index_subscriptions_on_order_list_id"
934
- add_index "subscriptions", ["user_id"], name: "index_subscriptions_on_user_id"
935
-
936
895
  create_table "user_export_file_transitions", force: :cascade do |t|
937
896
  t.string "to_state"
938
897
  t.text "metadata", default: "{}"
@@ -941,11 +900,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
941
900
  t.datetime "created_at"
942
901
  t.datetime "updated_at"
943
902
  t.boolean "most_recent"
903
+ t.index ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
904
+ t.index ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
944
905
  end
945
906
 
946
- add_index "user_export_file_transitions", ["sort_key", "user_export_file_id"], name: "index_user_export_file_transitions_on_sort_key_and_file_id", unique: true
947
- add_index "user_export_file_transitions", ["user_export_file_id"], name: "index_user_export_file_transitions_on_file_id"
948
-
949
907
  create_table "user_export_files", force: :cascade do |t|
950
908
  t.integer "user_id"
951
909
  t.string "user_export_file_name"
@@ -974,11 +932,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
974
932
  t.integer "role_id"
975
933
  t.datetime "created_at"
976
934
  t.datetime "updated_at"
935
+ t.index ["role_id"], name: "index_user_has_roles_on_role_id"
936
+ t.index ["user_id"], name: "index_user_has_roles_on_user_id"
977
937
  end
978
938
 
979
- add_index "user_has_roles", ["role_id"], name: "index_user_has_roles_on_role_id"
980
- add_index "user_has_roles", ["user_id"], name: "index_user_has_roles_on_user_id"
981
-
982
939
  create_table "user_import_file_transitions", force: :cascade do |t|
983
940
  t.string "to_state"
984
941
  t.text "metadata", default: "{}"
@@ -987,11 +944,10 @@ ActiveRecord::Schema.define(version: 20160814165332) do
987
944
  t.datetime "created_at"
988
945
  t.datetime "updated_at"
989
946
  t.boolean "most_recent"
947
+ t.index ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
948
+ t.index ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
990
949
  end
991
950
 
992
- add_index "user_import_file_transitions", ["sort_key", "user_import_file_id"], name: "index_user_import_file_transitions_on_sort_key_and_file_id", unique: true
993
- add_index "user_import_file_transitions", ["user_import_file_id"], name: "index_user_import_file_transitions_on_user_import_file_id"
994
-
995
951
  create_table "user_import_files", force: :cascade do |t|
996
952
  t.integer "user_id"
997
953
  t.text "note"
@@ -1039,13 +995,12 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1039
995
  t.string "unlock_token"
1040
996
  t.datetime "locked_at"
1041
997
  t.datetime "confirmed_at"
998
+ t.index ["email"], name: "index_users_on_email"
999
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1000
+ t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1001
+ t.index ["username"], name: "index_users_on_username", unique: true
1042
1002
  end
1043
1003
 
1044
- add_index "users", ["email"], name: "index_users_on_email"
1045
- add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
1046
- add_index "users", ["unlock_token"], name: "index_users_on_unlock_token", unique: true
1047
- add_index "users", ["username"], name: "index_users_on_username", unique: true
1048
-
1049
1004
  create_table "versions", force: :cascade do |t|
1050
1005
  t.string "item_type", null: false
1051
1006
  t.integer "item_id", null: false
@@ -1053,19 +1008,17 @@ ActiveRecord::Schema.define(version: 20160814165332) do
1053
1008
  t.string "whodunnit"
1054
1009
  t.text "object"
1055
1010
  t.datetime "created_at"
1011
+ t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1056
1012
  end
1057
1013
 
1058
- add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
1059
-
1060
1014
  create_table "withdraws", force: :cascade do |t|
1061
1015
  t.integer "basket_id"
1062
1016
  t.integer "item_id"
1063
1017
  t.integer "librarian_id"
1064
1018
  t.datetime "created_at", null: false
1065
1019
  t.datetime "updated_at", null: false
1020
+ t.index ["basket_id"], name: "index_withdraws_on_basket_id"
1021
+ t.index ["item_id"], name: "index_withdraws_on_item_id"
1066
1022
  end
1067
1023
 
1068
- add_index "withdraws", ["basket_id"], name: "index_withdraws_on_basket_id"
1069
- add_index "withdraws", ["item_id"], name: "index_withdraws_on_item_id"
1070
-
1071
1024
  end