active_record_doctor 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -292355,3 +292355,3691 @@ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys
292355
292355
  WHERE name='index_users_on_email' AND type='index'
292356
292356
  
292357
292357
   (0.0ms) rollback transaction
292358
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
292359
+  (0.1ms) begin transaction
292360
+ --------------------------------------------------------------------------------------
292361
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
292362
+ --------------------------------------------------------------------------------------
292363
+  (0.1ms)  SELECT sql
292364
+ FROM sqlite_master
292365
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292366
+ UNION ALL
292367
+ SELECT sql
292368
+ FROM sqlite_temp_master
292369
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292370
+ 
292371
+  (0.0ms) SELECT sql
292372
+ FROM sqlite_master
292373
+ WHERE name='index_employers_on_id' AND type='index'
292374
+ UNION ALL
292375
+ SELECT sql
292376
+ FROM sqlite_temp_master
292377
+ WHERE name='index_employers_on_id' AND type='index'
292378
+
292379
+  (0.0ms)  SELECT sql
292380
+ FROM sqlite_master
292381
+ WHERE name='index_users_on_last_name' AND type='index'
292382
+ UNION ALL
292383
+ SELECT sql
292384
+ FROM sqlite_temp_master
292385
+ WHERE name='index_users_on_last_name' AND type='index'
292386
+ 
292387
+  (0.0ms) SELECT sql
292388
+ FROM sqlite_master
292389
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292390
+ UNION ALL
292391
+ SELECT sql
292392
+ FROM sqlite_temp_master
292393
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292394
+
292395
+  (0.0ms)  SELECT sql
292396
+ FROM sqlite_master
292397
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292398
+ UNION ALL
292399
+ SELECT sql
292400
+ FROM sqlite_temp_master
292401
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292402
+ 
292403
+  (0.0ms) SELECT sql
292404
+ FROM sqlite_master
292405
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292406
+ UNION ALL
292407
+ SELECT sql
292408
+ FROM sqlite_temp_master
292409
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292410
+
292411
+  (0.0ms)  SELECT sql
292412
+ FROM sqlite_master
292413
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292414
+ UNION ALL
292415
+ SELECT sql
292416
+ FROM sqlite_temp_master
292417
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292418
+ 
292419
+  (0.0ms) SELECT sql
292420
+ FROM sqlite_master
292421
+ WHERE name='unique_index_on_users_email' AND type='index'
292422
+ UNION ALL
292423
+ SELECT sql
292424
+ FROM sqlite_temp_master
292425
+ WHERE name='unique_index_on_users_email' AND type='index'
292426
+
292427
+  (0.0ms)  SELECT sql
292428
+ FROM sqlite_master
292429
+ WHERE name='index_users_on_email' AND type='index'
292430
+ UNION ALL
292431
+ SELECT sql
292432
+ FROM sqlite_temp_master
292433
+ WHERE name='index_users_on_email' AND type='index'
292434
+ 
292435
+  (0.0ms) SELECT sql
292436
+ FROM sqlite_master
292437
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292438
+ UNION ALL
292439
+ SELECT sql
292440
+ FROM sqlite_temp_master
292441
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292442
+
292443
+  (0.1ms)  SELECT sql
292444
+ FROM sqlite_master
292445
+ WHERE name='index_employers_on_id' AND type='index'
292446
+ UNION ALL
292447
+ SELECT sql
292448
+ FROM sqlite_temp_master
292449
+ WHERE name='index_employers_on_id' AND type='index'
292450
+ 
292451
+  (0.0ms) SELECT sql
292452
+ FROM sqlite_master
292453
+ WHERE name='index_users_on_last_name' AND type='index'
292454
+ UNION ALL
292455
+ SELECT sql
292456
+ FROM sqlite_temp_master
292457
+ WHERE name='index_users_on_last_name' AND type='index'
292458
+
292459
+  (0.0ms)  SELECT sql
292460
+ FROM sqlite_master
292461
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292462
+ UNION ALL
292463
+ SELECT sql
292464
+ FROM sqlite_temp_master
292465
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292466
+ 
292467
+  (0.0ms) SELECT sql
292468
+ FROM sqlite_master
292469
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292470
+ UNION ALL
292471
+ SELECT sql
292472
+ FROM sqlite_temp_master
292473
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292474
+
292475
+  (0.0ms)  SELECT sql
292476
+ FROM sqlite_master
292477
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292478
+ UNION ALL
292479
+ SELECT sql
292480
+ FROM sqlite_temp_master
292481
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292482
+ 
292483
+  (0.0ms) SELECT sql
292484
+ FROM sqlite_master
292485
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292486
+ UNION ALL
292487
+ SELECT sql
292488
+ FROM sqlite_temp_master
292489
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292490
+
292491
+  (0.0ms)  SELECT sql
292492
+ FROM sqlite_master
292493
+ WHERE name='unique_index_on_users_email' AND type='index'
292494
+ UNION ALL
292495
+ SELECT sql
292496
+ FROM sqlite_temp_master
292497
+ WHERE name='unique_index_on_users_email' AND type='index'
292498
+ 
292499
+  (0.0ms) SELECT sql
292500
+ FROM sqlite_master
292501
+ WHERE name='index_users_on_email' AND type='index'
292502
+ UNION ALL
292503
+ SELECT sql
292504
+ FROM sqlite_temp_master
292505
+ WHERE name='index_users_on_email' AND type='index'
292506
+
292507
+  (0.0ms) rollback transaction
292508
+  (0.0ms) begin transaction
292509
+ ---------------------------------------------------------------------------------------------
292510
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
292511
+ ---------------------------------------------------------------------------------------------
292512
+  (0.0ms)  SELECT sql
292513
+ FROM sqlite_master
292514
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292515
+ UNION ALL
292516
+ SELECT sql
292517
+ FROM sqlite_temp_master
292518
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292519
+ 
292520
+  (0.0ms) SELECT sql
292521
+ FROM sqlite_master
292522
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292523
+ UNION ALL
292524
+ SELECT sql
292525
+ FROM sqlite_temp_master
292526
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292527
+
292528
+  (0.0ms)  SELECT sql
292529
+ FROM sqlite_master
292530
+ WHERE name='index_users_on_last_name' AND type='index'
292531
+ UNION ALL
292532
+ SELECT sql
292533
+ FROM sqlite_temp_master
292534
+ WHERE name='index_users_on_last_name' AND type='index'
292535
+ 
292536
+  (0.1ms) SELECT sql
292537
+ FROM sqlite_master
292538
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292539
+ UNION ALL
292540
+ SELECT sql
292541
+ FROM sqlite_temp_master
292542
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292543
+
292544
+  (0.0ms)  SELECT sql
292545
+ FROM sqlite_master
292546
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292547
+ UNION ALL
292548
+ SELECT sql
292549
+ FROM sqlite_temp_master
292550
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292551
+ 
292552
+  (0.0ms) SELECT sql
292553
+ FROM sqlite_master
292554
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292555
+ UNION ALL
292556
+ SELECT sql
292557
+ FROM sqlite_temp_master
292558
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292559
+
292560
+  (0.0ms)  SELECT sql
292561
+ FROM sqlite_master
292562
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292563
+ UNION ALL
292564
+ SELECT sql
292565
+ FROM sqlite_temp_master
292566
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292567
+ 
292568
+  (0.0ms) SELECT sql
292569
+ FROM sqlite_master
292570
+ WHERE name='unique_index_on_users_email' AND type='index'
292571
+ UNION ALL
292572
+ SELECT sql
292573
+ FROM sqlite_temp_master
292574
+ WHERE name='unique_index_on_users_email' AND type='index'
292575
+
292576
+  (0.0ms)  SELECT sql
292577
+ FROM sqlite_master
292578
+ WHERE name='index_users_on_email' AND type='index'
292579
+ UNION ALL
292580
+ SELECT sql
292581
+ FROM sqlite_temp_master
292582
+ WHERE name='index_users_on_email' AND type='index'
292583
+ 
292584
+  (0.0ms) SELECT sql
292585
+ FROM sqlite_master
292586
+ WHERE name='index_users_on_last_name' AND type='index'
292587
+ UNION ALL
292588
+ SELECT sql
292589
+ FROM sqlite_temp_master
292590
+ WHERE name='index_users_on_last_name' AND type='index'
292591
+
292592
+  (0.0ms)  SELECT sql
292593
+ FROM sqlite_master
292594
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292595
+ UNION ALL
292596
+ SELECT sql
292597
+ FROM sqlite_temp_master
292598
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292599
+ 
292600
+  (0.0ms) SELECT sql
292601
+ FROM sqlite_master
292602
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292603
+ UNION ALL
292604
+ SELECT sql
292605
+ FROM sqlite_temp_master
292606
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292607
+
292608
+  (0.0ms)  SELECT sql
292609
+ FROM sqlite_master
292610
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292611
+ UNION ALL
292612
+ SELECT sql
292613
+ FROM sqlite_temp_master
292614
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292615
+ 
292616
+  (0.0ms) SELECT sql
292617
+ FROM sqlite_master
292618
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292619
+ UNION ALL
292620
+ SELECT sql
292621
+ FROM sqlite_temp_master
292622
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292623
+
292624
+  (0.0ms)  SELECT sql
292625
+ FROM sqlite_master
292626
+ WHERE name='unique_index_on_users_email' AND type='index'
292627
+ UNION ALL
292628
+ SELECT sql
292629
+ FROM sqlite_temp_master
292630
+ WHERE name='unique_index_on_users_email' AND type='index'
292631
+ 
292632
+  (0.0ms) SELECT sql
292633
+ FROM sqlite_master
292634
+ WHERE name='index_users_on_email' AND type='index'
292635
+ UNION ALL
292636
+ SELECT sql
292637
+ FROM sqlite_temp_master
292638
+ WHERE name='index_users_on_email' AND type='index'
292639
+
292640
+  (0.0ms)  SELECT sql
292641
+ FROM sqlite_master
292642
+ WHERE name='index_users_on_last_name' AND type='index'
292643
+ UNION ALL
292644
+ SELECT sql
292645
+ FROM sqlite_temp_master
292646
+ WHERE name='index_users_on_last_name' AND type='index'
292647
+ 
292648
+  (0.0ms) SELECT sql
292649
+ FROM sqlite_master
292650
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292651
+ UNION ALL
292652
+ SELECT sql
292653
+ FROM sqlite_temp_master
292654
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292655
+
292656
+  (0.0ms)  SELECT sql
292657
+ FROM sqlite_master
292658
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292659
+ UNION ALL
292660
+ SELECT sql
292661
+ FROM sqlite_temp_master
292662
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292663
+ 
292664
+  (0.0ms) SELECT sql
292665
+ FROM sqlite_master
292666
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292667
+ UNION ALL
292668
+ SELECT sql
292669
+ FROM sqlite_temp_master
292670
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292671
+
292672
+  (0.0ms)  SELECT sql
292673
+ FROM sqlite_master
292674
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292675
+ UNION ALL
292676
+ SELECT sql
292677
+ FROM sqlite_temp_master
292678
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292679
+ 
292680
+  (0.0ms) SELECT sql
292681
+ FROM sqlite_master
292682
+ WHERE name='unique_index_on_users_email' AND type='index'
292683
+ UNION ALL
292684
+ SELECT sql
292685
+ FROM sqlite_temp_master
292686
+ WHERE name='unique_index_on_users_email' AND type='index'
292687
+
292688
+  (0.0ms)  SELECT sql
292689
+ FROM sqlite_master
292690
+ WHERE name='index_users_on_email' AND type='index'
292691
+ UNION ALL
292692
+ SELECT sql
292693
+ FROM sqlite_temp_master
292694
+ WHERE name='index_users_on_email' AND type='index'
292695
+ 
292696
+  (0.1ms) rollback transaction
292697
+  (0.0ms) begin transaction
292698
+ ------------------------------------------------------------------------------
292699
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
292700
+ ------------------------------------------------------------------------------
292701
+  (0.0ms) rollback transaction
292702
+  (0.0ms) begin transaction
292703
+ -----------------------------------------------------------------------------------------
292704
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
292705
+ -----------------------------------------------------------------------------------------
292706
+  (0.0ms) rollback transaction
292707
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
292708
+  (0.1ms) begin transaction
292709
+ -----------------------------------------------------------------------------------------
292710
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
292711
+ -----------------------------------------------------------------------------------------
292712
+  (0.0ms) rollback transaction
292713
+  (0.0ms) begin transaction
292714
+ ------------------------------------------------------------------------------
292715
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
292716
+ ------------------------------------------------------------------------------
292717
+  (0.0ms) rollback transaction
292718
+  (0.0ms) begin transaction
292719
+ ---------------------------------------------------------------------------------------------
292720
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
292721
+ ---------------------------------------------------------------------------------------------
292722
+  (0.1ms)  SELECT sql
292723
+ FROM sqlite_master
292724
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292725
+ UNION ALL
292726
+ SELECT sql
292727
+ FROM sqlite_temp_master
292728
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292729
+ 
292730
+  (0.0ms) SELECT sql
292731
+ FROM sqlite_master
292732
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292733
+ UNION ALL
292734
+ SELECT sql
292735
+ FROM sqlite_temp_master
292736
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292737
+
292738
+  (0.0ms)  SELECT sql
292739
+ FROM sqlite_master
292740
+ WHERE name='index_users_on_last_name' AND type='index'
292741
+ UNION ALL
292742
+ SELECT sql
292743
+ FROM sqlite_temp_master
292744
+ WHERE name='index_users_on_last_name' AND type='index'
292745
+ 
292746
+  (0.0ms) SELECT sql
292747
+ FROM sqlite_master
292748
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292749
+ UNION ALL
292750
+ SELECT sql
292751
+ FROM sqlite_temp_master
292752
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292753
+
292754
+  (0.0ms)  SELECT sql
292755
+ FROM sqlite_master
292756
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292757
+ UNION ALL
292758
+ SELECT sql
292759
+ FROM sqlite_temp_master
292760
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292761
+ 
292762
+  (0.0ms) SELECT sql
292763
+ FROM sqlite_master
292764
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292765
+ UNION ALL
292766
+ SELECT sql
292767
+ FROM sqlite_temp_master
292768
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292769
+
292770
+  (0.0ms)  SELECT sql
292771
+ FROM sqlite_master
292772
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292773
+ UNION ALL
292774
+ SELECT sql
292775
+ FROM sqlite_temp_master
292776
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292777
+ 
292778
+  (0.0ms) SELECT sql
292779
+ FROM sqlite_master
292780
+ WHERE name='unique_index_on_users_email' AND type='index'
292781
+ UNION ALL
292782
+ SELECT sql
292783
+ FROM sqlite_temp_master
292784
+ WHERE name='unique_index_on_users_email' AND type='index'
292785
+
292786
+  (0.0ms)  SELECT sql
292787
+ FROM sqlite_master
292788
+ WHERE name='index_users_on_email' AND type='index'
292789
+ UNION ALL
292790
+ SELECT sql
292791
+ FROM sqlite_temp_master
292792
+ WHERE name='index_users_on_email' AND type='index'
292793
+ 
292794
+  (0.0ms) SELECT sql
292795
+ FROM sqlite_master
292796
+ WHERE name='index_users_on_last_name' AND type='index'
292797
+ UNION ALL
292798
+ SELECT sql
292799
+ FROM sqlite_temp_master
292800
+ WHERE name='index_users_on_last_name' AND type='index'
292801
+
292802
+  (0.0ms)  SELECT sql
292803
+ FROM sqlite_master
292804
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292805
+ UNION ALL
292806
+ SELECT sql
292807
+ FROM sqlite_temp_master
292808
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292809
+ 
292810
+  (0.0ms) SELECT sql
292811
+ FROM sqlite_master
292812
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292813
+ UNION ALL
292814
+ SELECT sql
292815
+ FROM sqlite_temp_master
292816
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292817
+
292818
+  (0.0ms)  SELECT sql
292819
+ FROM sqlite_master
292820
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292821
+ UNION ALL
292822
+ SELECT sql
292823
+ FROM sqlite_temp_master
292824
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292825
+ 
292826
+  (0.0ms) SELECT sql
292827
+ FROM sqlite_master
292828
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292829
+ UNION ALL
292830
+ SELECT sql
292831
+ FROM sqlite_temp_master
292832
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292833
+
292834
+  (0.0ms)  SELECT sql
292835
+ FROM sqlite_master
292836
+ WHERE name='unique_index_on_users_email' AND type='index'
292837
+ UNION ALL
292838
+ SELECT sql
292839
+ FROM sqlite_temp_master
292840
+ WHERE name='unique_index_on_users_email' AND type='index'
292841
+ 
292842
+  (0.0ms) SELECT sql
292843
+ FROM sqlite_master
292844
+ WHERE name='index_users_on_email' AND type='index'
292845
+ UNION ALL
292846
+ SELECT sql
292847
+ FROM sqlite_temp_master
292848
+ WHERE name='index_users_on_email' AND type='index'
292849
+
292850
+  (0.0ms)  SELECT sql
292851
+ FROM sqlite_master
292852
+ WHERE name='index_users_on_last_name' AND type='index'
292853
+ UNION ALL
292854
+ SELECT sql
292855
+ FROM sqlite_temp_master
292856
+ WHERE name='index_users_on_last_name' AND type='index'
292857
+ 
292858
+  (0.0ms) SELECT sql
292859
+ FROM sqlite_master
292860
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292861
+ UNION ALL
292862
+ SELECT sql
292863
+ FROM sqlite_temp_master
292864
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292865
+
292866
+  (0.0ms)  SELECT sql
292867
+ FROM sqlite_master
292868
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292869
+ UNION ALL
292870
+ SELECT sql
292871
+ FROM sqlite_temp_master
292872
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292873
+ 
292874
+  (0.0ms) SELECT sql
292875
+ FROM sqlite_master
292876
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292877
+ UNION ALL
292878
+ SELECT sql
292879
+ FROM sqlite_temp_master
292880
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292881
+
292882
+  (0.1ms)  SELECT sql
292883
+ FROM sqlite_master
292884
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292885
+ UNION ALL
292886
+ SELECT sql
292887
+ FROM sqlite_temp_master
292888
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292889
+ 
292890
+  (0.0ms) SELECT sql
292891
+ FROM sqlite_master
292892
+ WHERE name='unique_index_on_users_email' AND type='index'
292893
+ UNION ALL
292894
+ SELECT sql
292895
+ FROM sqlite_temp_master
292896
+ WHERE name='unique_index_on_users_email' AND type='index'
292897
+
292898
+  (0.0ms)  SELECT sql
292899
+ FROM sqlite_master
292900
+ WHERE name='index_users_on_email' AND type='index'
292901
+ UNION ALL
292902
+ SELECT sql
292903
+ FROM sqlite_temp_master
292904
+ WHERE name='index_users_on_email' AND type='index'
292905
+ 
292906
+  (0.0ms) rollback transaction
292907
+  (0.0ms) begin transaction
292908
+ --------------------------------------------------------------------------------------
292909
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
292910
+ --------------------------------------------------------------------------------------
292911
+  (0.0ms) SELECT sql
292912
+ FROM sqlite_master
292913
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292914
+ UNION ALL
292915
+ SELECT sql
292916
+ FROM sqlite_temp_master
292917
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292918
+
292919
+  (0.0ms)  SELECT sql
292920
+ FROM sqlite_master
292921
+ WHERE name='index_employers_on_id' AND type='index'
292922
+ UNION ALL
292923
+ SELECT sql
292924
+ FROM sqlite_temp_master
292925
+ WHERE name='index_employers_on_id' AND type='index'
292926
+ 
292927
+  (0.0ms) SELECT sql
292928
+ FROM sqlite_master
292929
+ WHERE name='index_users_on_last_name' AND type='index'
292930
+ UNION ALL
292931
+ SELECT sql
292932
+ FROM sqlite_temp_master
292933
+ WHERE name='index_users_on_last_name' AND type='index'
292934
+
292935
+  (0.0ms)  SELECT sql
292936
+ FROM sqlite_master
292937
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292938
+ UNION ALL
292939
+ SELECT sql
292940
+ FROM sqlite_temp_master
292941
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
292942
+ 
292943
+  (0.0ms) SELECT sql
292944
+ FROM sqlite_master
292945
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292946
+ UNION ALL
292947
+ SELECT sql
292948
+ FROM sqlite_temp_master
292949
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
292950
+
292951
+  (0.0ms)  SELECT sql
292952
+ FROM sqlite_master
292953
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292954
+ UNION ALL
292955
+ SELECT sql
292956
+ FROM sqlite_temp_master
292957
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
292958
+ 
292959
+  (0.0ms) SELECT sql
292960
+ FROM sqlite_master
292961
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292962
+ UNION ALL
292963
+ SELECT sql
292964
+ FROM sqlite_temp_master
292965
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
292966
+
292967
+  (0.0ms)  SELECT sql
292968
+ FROM sqlite_master
292969
+ WHERE name='unique_index_on_users_email' AND type='index'
292970
+ UNION ALL
292971
+ SELECT sql
292972
+ FROM sqlite_temp_master
292973
+ WHERE name='unique_index_on_users_email' AND type='index'
292974
+ 
292975
+  (0.0ms) SELECT sql
292976
+ FROM sqlite_master
292977
+ WHERE name='index_users_on_email' AND type='index'
292978
+ UNION ALL
292979
+ SELECT sql
292980
+ FROM sqlite_temp_master
292981
+ WHERE name='index_users_on_email' AND type='index'
292982
+
292983
+  (0.0ms)  SELECT sql
292984
+ FROM sqlite_master
292985
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292986
+ UNION ALL
292987
+ SELECT sql
292988
+ FROM sqlite_temp_master
292989
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
292990
+ 
292991
+  (0.0ms) SELECT sql
292992
+ FROM sqlite_master
292993
+ WHERE name='index_employers_on_id' AND type='index'
292994
+ UNION ALL
292995
+ SELECT sql
292996
+ FROM sqlite_temp_master
292997
+ WHERE name='index_employers_on_id' AND type='index'
292998
+
292999
+  (0.0ms)  SELECT sql
293000
+ FROM sqlite_master
293001
+ WHERE name='index_users_on_last_name' AND type='index'
293002
+ UNION ALL
293003
+ SELECT sql
293004
+ FROM sqlite_temp_master
293005
+ WHERE name='index_users_on_last_name' AND type='index'
293006
+ 
293007
+  (0.0ms) SELECT sql
293008
+ FROM sqlite_master
293009
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293010
+ UNION ALL
293011
+ SELECT sql
293012
+ FROM sqlite_temp_master
293013
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293014
+
293015
+  (0.0ms)  SELECT sql
293016
+ FROM sqlite_master
293017
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293018
+ UNION ALL
293019
+ SELECT sql
293020
+ FROM sqlite_temp_master
293021
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293022
+ 
293023
+  (0.0ms) SELECT sql
293024
+ FROM sqlite_master
293025
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293026
+ UNION ALL
293027
+ SELECT sql
293028
+ FROM sqlite_temp_master
293029
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293030
+
293031
+  (0.0ms)  SELECT sql
293032
+ FROM sqlite_master
293033
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293034
+ UNION ALL
293035
+ SELECT sql
293036
+ FROM sqlite_temp_master
293037
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293038
+ 
293039
+  (0.0ms) SELECT sql
293040
+ FROM sqlite_master
293041
+ WHERE name='unique_index_on_users_email' AND type='index'
293042
+ UNION ALL
293043
+ SELECT sql
293044
+ FROM sqlite_temp_master
293045
+ WHERE name='unique_index_on_users_email' AND type='index'
293046
+
293047
+  (0.0ms)  SELECT sql
293048
+ FROM sqlite_master
293049
+ WHERE name='index_users_on_email' AND type='index'
293050
+ UNION ALL
293051
+ SELECT sql
293052
+ FROM sqlite_temp_master
293053
+ WHERE name='index_users_on_email' AND type='index'
293054
+ 
293055
+  (0.0ms) rollback transaction
293056
+  (33.0ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "commentable_id" integer, "commentable_type" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
293057
+  (0.1ms) select sqlite_version(*)
293058
+  (29.9ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" ("commentable_type", "commentable_id")
293059
+  (35.9ms) CREATE TABLE "employers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
293060
+  (30.8ms) CREATE INDEX "index_employers_on_id" ON "employers" ("id")
293061
+  (27.1ms) CREATE TABLE "profiles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "first_name" varchar, "last_name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
293062
+  (34.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar, "first_name" varchar, "last_name" varchar, "profile_id" integer, "employer_id" integer, "country_code" varchar NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
293063
+  (32.4ms) CREATE INDEX "index_users_on_email" ON "users" ("email")
293064
+  (0.1ms)  SELECT sql
293065
+ FROM sqlite_master
293066
+ WHERE name='index_users_on_email' AND type='index'
293067
+ UNION ALL
293068
+ SELECT sql
293069
+ FROM sqlite_temp_master
293070
+ WHERE name='index_users_on_email' AND type='index'
293071
+ 
293072
+  (21.8ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" ("email")
293073
+  (0.0ms)  SELECT sql
293074
+ FROM sqlite_master
293075
+ WHERE name='unique_index_on_users_email' AND type='index'
293076
+ UNION ALL
293077
+ SELECT sql
293078
+ FROM sqlite_temp_master
293079
+ WHERE name='unique_index_on_users_email' AND type='index'
293080
+ 
293081
+  (0.0ms) SELECT sql
293082
+ FROM sqlite_master
293083
+ WHERE name='index_users_on_email' AND type='index'
293084
+ UNION ALL
293085
+ SELECT sql
293086
+ FROM sqlite_temp_master
293087
+ WHERE name='index_users_on_email' AND type='index'
293088
+
293089
+  (28.1ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" ("employer_id", "country_code")
293090
+  (0.0ms) SELECT sql
293091
+ FROM sqlite_master
293092
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293093
+ UNION ALL
293094
+ SELECT sql
293095
+ FROM sqlite_temp_master
293096
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293097
+
293098
+  (0.0ms)  SELECT sql
293099
+ FROM sqlite_master
293100
+ WHERE name='unique_index_on_users_email' AND type='index'
293101
+ UNION ALL
293102
+ SELECT sql
293103
+ FROM sqlite_temp_master
293104
+ WHERE name='unique_index_on_users_email' AND type='index'
293105
+ 
293106
+  (0.0ms) SELECT sql
293107
+ FROM sqlite_master
293108
+ WHERE name='index_users_on_email' AND type='index'
293109
+ UNION ALL
293110
+ SELECT sql
293111
+ FROM sqlite_temp_master
293112
+ WHERE name='index_users_on_email' AND type='index'
293113
+
293114
+  (28.4ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" ("last_name", "first_name", "email")
293115
+  (0.0ms) SELECT sql
293116
+ FROM sqlite_master
293117
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293118
+ UNION ALL
293119
+ SELECT sql
293120
+ FROM sqlite_temp_master
293121
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293122
+
293123
+  (0.0ms)  SELECT sql
293124
+ FROM sqlite_master
293125
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293126
+ UNION ALL
293127
+ SELECT sql
293128
+ FROM sqlite_temp_master
293129
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293130
+ 
293131
+  (0.0ms) SELECT sql
293132
+ FROM sqlite_master
293133
+ WHERE name='unique_index_on_users_email' AND type='index'
293134
+ UNION ALL
293135
+ SELECT sql
293136
+ FROM sqlite_temp_master
293137
+ WHERE name='unique_index_on_users_email' AND type='index'
293138
+
293139
+  (0.0ms)  SELECT sql
293140
+ FROM sqlite_master
293141
+ WHERE name='index_users_on_email' AND type='index'
293142
+ UNION ALL
293143
+ SELECT sql
293144
+ FROM sqlite_temp_master
293145
+ WHERE name='index_users_on_email' AND type='index'
293146
+ 
293147
+  (32.5ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" ("last_name", "first_name")
293148
+  (0.0ms)  SELECT sql
293149
+ FROM sqlite_master
293150
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293151
+ UNION ALL
293152
+ SELECT sql
293153
+ FROM sqlite_temp_master
293154
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293155
+ 
293156
+  (0.0ms) SELECT sql
293157
+ FROM sqlite_master
293158
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293159
+ UNION ALL
293160
+ SELECT sql
293161
+ FROM sqlite_temp_master
293162
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293163
+
293164
+  (0.0ms)  SELECT sql
293165
+ FROM sqlite_master
293166
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293167
+ UNION ALL
293168
+ SELECT sql
293169
+ FROM sqlite_temp_master
293170
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293171
+ 
293172
+  (0.0ms) SELECT sql
293173
+ FROM sqlite_master
293174
+ WHERE name='unique_index_on_users_email' AND type='index'
293175
+ UNION ALL
293176
+ SELECT sql
293177
+ FROM sqlite_temp_master
293178
+ WHERE name='unique_index_on_users_email' AND type='index'
293179
+
293180
+  (0.0ms)  SELECT sql
293181
+ FROM sqlite_master
293182
+ WHERE name='index_users_on_email' AND type='index'
293183
+ UNION ALL
293184
+ SELECT sql
293185
+ FROM sqlite_temp_master
293186
+ WHERE name='index_users_on_email' AND type='index'
293187
+ 
293188
+  (25.1ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" ("last_name", "first_name")
293189
+  (0.0ms)  SELECT sql
293190
+ FROM sqlite_master
293191
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293192
+ UNION ALL
293193
+ SELECT sql
293194
+ FROM sqlite_temp_master
293195
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293196
+ 
293197
+  (0.1ms) SELECT sql
293198
+ FROM sqlite_master
293199
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293200
+ UNION ALL
293201
+ SELECT sql
293202
+ FROM sqlite_temp_master
293203
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293204
+
293205
+  (0.0ms)  SELECT sql
293206
+ FROM sqlite_master
293207
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293208
+ UNION ALL
293209
+ SELECT sql
293210
+ FROM sqlite_temp_master
293211
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293212
+ 
293213
+  (0.0ms) SELECT sql
293214
+ FROM sqlite_master
293215
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293216
+ UNION ALL
293217
+ SELECT sql
293218
+ FROM sqlite_temp_master
293219
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293220
+
293221
+  (0.0ms)  SELECT sql
293222
+ FROM sqlite_master
293223
+ WHERE name='unique_index_on_users_email' AND type='index'
293224
+ UNION ALL
293225
+ SELECT sql
293226
+ FROM sqlite_temp_master
293227
+ WHERE name='unique_index_on_users_email' AND type='index'
293228
+ 
293229
+  (0.0ms) SELECT sql
293230
+ FROM sqlite_master
293231
+ WHERE name='index_users_on_email' AND type='index'
293232
+ UNION ALL
293233
+ SELECT sql
293234
+ FROM sqlite_temp_master
293235
+ WHERE name='index_users_on_email' AND type='index'
293236
+
293237
+  (30.2ms) CREATE INDEX "index_users_on_last_name" ON "users" ("last_name")
293238
+  (27.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)
293239
+  (30.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
293240
+  (0.0ms) SELECT version FROM "schema_migrations"
293241
+  (19.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
293242
+  (14.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213102131')
293243
+  (24.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
293244
+  (22.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
293245
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
293246
+  (0.1ms) begin transaction
293247
+ --------------------------------------------------------------------------------------
293248
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
293249
+ --------------------------------------------------------------------------------------
293250
+  (0.1ms)  SELECT sql
293251
+ FROM sqlite_master
293252
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293253
+ UNION ALL
293254
+ SELECT sql
293255
+ FROM sqlite_temp_master
293256
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293257
+ 
293258
+  (0.0ms) SELECT sql
293259
+ FROM sqlite_master
293260
+ WHERE name='index_employers_on_id' AND type='index'
293261
+ UNION ALL
293262
+ SELECT sql
293263
+ FROM sqlite_temp_master
293264
+ WHERE name='index_employers_on_id' AND type='index'
293265
+
293266
+  (0.0ms)  SELECT sql
293267
+ FROM sqlite_master
293268
+ WHERE name='index_users_on_last_name' AND type='index'
293269
+ UNION ALL
293270
+ SELECT sql
293271
+ FROM sqlite_temp_master
293272
+ WHERE name='index_users_on_last_name' AND type='index'
293273
+ 
293274
+  (0.0ms) SELECT sql
293275
+ FROM sqlite_master
293276
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293277
+ UNION ALL
293278
+ SELECT sql
293279
+ FROM sqlite_temp_master
293280
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293281
+
293282
+  (0.0ms)  SELECT sql
293283
+ FROM sqlite_master
293284
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293285
+ UNION ALL
293286
+ SELECT sql
293287
+ FROM sqlite_temp_master
293288
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293289
+ 
293290
+  (0.0ms) SELECT sql
293291
+ FROM sqlite_master
293292
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293293
+ UNION ALL
293294
+ SELECT sql
293295
+ FROM sqlite_temp_master
293296
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293297
+
293298
+  (0.0ms)  SELECT sql
293299
+ FROM sqlite_master
293300
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293301
+ UNION ALL
293302
+ SELECT sql
293303
+ FROM sqlite_temp_master
293304
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293305
+ 
293306
+  (0.0ms) SELECT sql
293307
+ FROM sqlite_master
293308
+ WHERE name='unique_index_on_users_email' AND type='index'
293309
+ UNION ALL
293310
+ SELECT sql
293311
+ FROM sqlite_temp_master
293312
+ WHERE name='unique_index_on_users_email' AND type='index'
293313
+
293314
+  (0.0ms)  SELECT sql
293315
+ FROM sqlite_master
293316
+ WHERE name='index_users_on_email' AND type='index'
293317
+ UNION ALL
293318
+ SELECT sql
293319
+ FROM sqlite_temp_master
293320
+ WHERE name='index_users_on_email' AND type='index'
293321
+ 
293322
+  (0.0ms) SELECT sql
293323
+ FROM sqlite_master
293324
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293325
+ UNION ALL
293326
+ SELECT sql
293327
+ FROM sqlite_temp_master
293328
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293329
+
293330
+  (0.0ms)  SELECT sql
293331
+ FROM sqlite_master
293332
+ WHERE name='index_employers_on_id' AND type='index'
293333
+ UNION ALL
293334
+ SELECT sql
293335
+ FROM sqlite_temp_master
293336
+ WHERE name='index_employers_on_id' AND type='index'
293337
+ 
293338
+  (0.0ms) SELECT sql
293339
+ FROM sqlite_master
293340
+ WHERE name='index_users_on_last_name' AND type='index'
293341
+ UNION ALL
293342
+ SELECT sql
293343
+ FROM sqlite_temp_master
293344
+ WHERE name='index_users_on_last_name' AND type='index'
293345
+
293346
+  (0.0ms)  SELECT sql
293347
+ FROM sqlite_master
293348
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293349
+ UNION ALL
293350
+ SELECT sql
293351
+ FROM sqlite_temp_master
293352
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293353
+ 
293354
+  (0.0ms) SELECT sql
293355
+ FROM sqlite_master
293356
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293357
+ UNION ALL
293358
+ SELECT sql
293359
+ FROM sqlite_temp_master
293360
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293361
+
293362
+  (0.0ms)  SELECT sql
293363
+ FROM sqlite_master
293364
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293365
+ UNION ALL
293366
+ SELECT sql
293367
+ FROM sqlite_temp_master
293368
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293369
+ 
293370
+  (0.0ms) SELECT sql
293371
+ FROM sqlite_master
293372
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293373
+ UNION ALL
293374
+ SELECT sql
293375
+ FROM sqlite_temp_master
293376
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293377
+
293378
+  (0.0ms)  SELECT sql
293379
+ FROM sqlite_master
293380
+ WHERE name='unique_index_on_users_email' AND type='index'
293381
+ UNION ALL
293382
+ SELECT sql
293383
+ FROM sqlite_temp_master
293384
+ WHERE name='unique_index_on_users_email' AND type='index'
293385
+ 
293386
+  (0.0ms) SELECT sql
293387
+ FROM sqlite_master
293388
+ WHERE name='index_users_on_email' AND type='index'
293389
+ UNION ALL
293390
+ SELECT sql
293391
+ FROM sqlite_temp_master
293392
+ WHERE name='index_users_on_email' AND type='index'
293393
+
293394
+  (0.0ms) rollback transaction
293395
+  (0.0ms) begin transaction
293396
+ ---------------------------------------------------------------------------------------------
293397
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
293398
+ ---------------------------------------------------------------------------------------------
293399
+  (0.0ms)  SELECT sql
293400
+ FROM sqlite_master
293401
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293402
+ UNION ALL
293403
+ SELECT sql
293404
+ FROM sqlite_temp_master
293405
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293406
+ 
293407
+  (0.0ms) SELECT sql
293408
+ FROM sqlite_master
293409
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293410
+ UNION ALL
293411
+ SELECT sql
293412
+ FROM sqlite_temp_master
293413
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293414
+
293415
+  (0.0ms)  SELECT sql
293416
+ FROM sqlite_master
293417
+ WHERE name='index_users_on_last_name' AND type='index'
293418
+ UNION ALL
293419
+ SELECT sql
293420
+ FROM sqlite_temp_master
293421
+ WHERE name='index_users_on_last_name' AND type='index'
293422
+ 
293423
+  (0.0ms) SELECT sql
293424
+ FROM sqlite_master
293425
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293426
+ UNION ALL
293427
+ SELECT sql
293428
+ FROM sqlite_temp_master
293429
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293430
+
293431
+  (0.0ms)  SELECT sql
293432
+ FROM sqlite_master
293433
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293434
+ UNION ALL
293435
+ SELECT sql
293436
+ FROM sqlite_temp_master
293437
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293438
+ 
293439
+  (0.0ms) SELECT sql
293440
+ FROM sqlite_master
293441
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293442
+ UNION ALL
293443
+ SELECT sql
293444
+ FROM sqlite_temp_master
293445
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293446
+
293447
+  (0.0ms)  SELECT sql
293448
+ FROM sqlite_master
293449
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293450
+ UNION ALL
293451
+ SELECT sql
293452
+ FROM sqlite_temp_master
293453
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293454
+ 
293455
+  (0.0ms) SELECT sql
293456
+ FROM sqlite_master
293457
+ WHERE name='unique_index_on_users_email' AND type='index'
293458
+ UNION ALL
293459
+ SELECT sql
293460
+ FROM sqlite_temp_master
293461
+ WHERE name='unique_index_on_users_email' AND type='index'
293462
+
293463
+  (0.0ms)  SELECT sql
293464
+ FROM sqlite_master
293465
+ WHERE name='index_users_on_email' AND type='index'
293466
+ UNION ALL
293467
+ SELECT sql
293468
+ FROM sqlite_temp_master
293469
+ WHERE name='index_users_on_email' AND type='index'
293470
+ 
293471
+  (0.0ms) SELECT sql
293472
+ FROM sqlite_master
293473
+ WHERE name='index_users_on_last_name' AND type='index'
293474
+ UNION ALL
293475
+ SELECT sql
293476
+ FROM sqlite_temp_master
293477
+ WHERE name='index_users_on_last_name' AND type='index'
293478
+
293479
+  (0.0ms)  SELECT sql
293480
+ FROM sqlite_master
293481
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293482
+ UNION ALL
293483
+ SELECT sql
293484
+ FROM sqlite_temp_master
293485
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293486
+ 
293487
+  (0.0ms) SELECT sql
293488
+ FROM sqlite_master
293489
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293490
+ UNION ALL
293491
+ SELECT sql
293492
+ FROM sqlite_temp_master
293493
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293494
+
293495
+  (0.0ms)  SELECT sql
293496
+ FROM sqlite_master
293497
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293498
+ UNION ALL
293499
+ SELECT sql
293500
+ FROM sqlite_temp_master
293501
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293502
+ 
293503
+  (0.0ms) SELECT sql
293504
+ FROM sqlite_master
293505
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293506
+ UNION ALL
293507
+ SELECT sql
293508
+ FROM sqlite_temp_master
293509
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293510
+
293511
+  (0.0ms)  SELECT sql
293512
+ FROM sqlite_master
293513
+ WHERE name='unique_index_on_users_email' AND type='index'
293514
+ UNION ALL
293515
+ SELECT sql
293516
+ FROM sqlite_temp_master
293517
+ WHERE name='unique_index_on_users_email' AND type='index'
293518
+ 
293519
+  (0.0ms) SELECT sql
293520
+ FROM sqlite_master
293521
+ WHERE name='index_users_on_email' AND type='index'
293522
+ UNION ALL
293523
+ SELECT sql
293524
+ FROM sqlite_temp_master
293525
+ WHERE name='index_users_on_email' AND type='index'
293526
+
293527
+  (0.0ms)  SELECT sql
293528
+ FROM sqlite_master
293529
+ WHERE name='index_users_on_last_name' AND type='index'
293530
+ UNION ALL
293531
+ SELECT sql
293532
+ FROM sqlite_temp_master
293533
+ WHERE name='index_users_on_last_name' AND type='index'
293534
+ 
293535
+  (0.1ms) SELECT sql
293536
+ FROM sqlite_master
293537
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293538
+ UNION ALL
293539
+ SELECT sql
293540
+ FROM sqlite_temp_master
293541
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293542
+
293543
+  (0.0ms)  SELECT sql
293544
+ FROM sqlite_master
293545
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293546
+ UNION ALL
293547
+ SELECT sql
293548
+ FROM sqlite_temp_master
293549
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293550
+ 
293551
+  (0.0ms) SELECT sql
293552
+ FROM sqlite_master
293553
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293554
+ UNION ALL
293555
+ SELECT sql
293556
+ FROM sqlite_temp_master
293557
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293558
+
293559
+  (0.0ms)  SELECT sql
293560
+ FROM sqlite_master
293561
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293562
+ UNION ALL
293563
+ SELECT sql
293564
+ FROM sqlite_temp_master
293565
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293566
+ 
293567
+  (0.0ms) SELECT sql
293568
+ FROM sqlite_master
293569
+ WHERE name='unique_index_on_users_email' AND type='index'
293570
+ UNION ALL
293571
+ SELECT sql
293572
+ FROM sqlite_temp_master
293573
+ WHERE name='unique_index_on_users_email' AND type='index'
293574
+
293575
+  (0.0ms)  SELECT sql
293576
+ FROM sqlite_master
293577
+ WHERE name='index_users_on_email' AND type='index'
293578
+ UNION ALL
293579
+ SELECT sql
293580
+ FROM sqlite_temp_master
293581
+ WHERE name='index_users_on_email' AND type='index'
293582
+ 
293583
+  (0.0ms) rollback transaction
293584
+  (0.0ms) begin transaction
293585
+ ------------------------------------------------------------------------------
293586
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
293587
+ ------------------------------------------------------------------------------
293588
+  (0.0ms) rollback transaction
293589
+  (0.0ms) begin transaction
293590
+ -----------------------------------------------------------------------------------------
293591
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
293592
+ -----------------------------------------------------------------------------------------
293593
+  (0.0ms) rollback transaction
293594
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
293595
+  (0.1ms) begin transaction
293596
+ ------------------------------------------------------------------------------
293597
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
293598
+ ------------------------------------------------------------------------------
293599
+  (0.0ms) rollback transaction
293600
+  (0.0ms) begin transaction
293601
+ --------------------------------------------------------------------------------------
293602
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
293603
+ --------------------------------------------------------------------------------------
293604
+  (0.1ms)  SELECT sql
293605
+ FROM sqlite_master
293606
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293607
+ UNION ALL
293608
+ SELECT sql
293609
+ FROM sqlite_temp_master
293610
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293611
+ 
293612
+  (0.0ms) SELECT sql
293613
+ FROM sqlite_master
293614
+ WHERE name='index_employers_on_id' AND type='index'
293615
+ UNION ALL
293616
+ SELECT sql
293617
+ FROM sqlite_temp_master
293618
+ WHERE name='index_employers_on_id' AND type='index'
293619
+
293620
+  (0.0ms)  SELECT sql
293621
+ FROM sqlite_master
293622
+ WHERE name='index_users_on_last_name' AND type='index'
293623
+ UNION ALL
293624
+ SELECT sql
293625
+ FROM sqlite_temp_master
293626
+ WHERE name='index_users_on_last_name' AND type='index'
293627
+ 
293628
+  (0.0ms) SELECT sql
293629
+ FROM sqlite_master
293630
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293631
+ UNION ALL
293632
+ SELECT sql
293633
+ FROM sqlite_temp_master
293634
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293635
+
293636
+  (0.1ms)  SELECT sql
293637
+ FROM sqlite_master
293638
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293639
+ UNION ALL
293640
+ SELECT sql
293641
+ FROM sqlite_temp_master
293642
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293643
+ 
293644
+  (0.0ms) SELECT sql
293645
+ FROM sqlite_master
293646
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293647
+ UNION ALL
293648
+ SELECT sql
293649
+ FROM sqlite_temp_master
293650
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293651
+
293652
+  (0.0ms)  SELECT sql
293653
+ FROM sqlite_master
293654
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293655
+ UNION ALL
293656
+ SELECT sql
293657
+ FROM sqlite_temp_master
293658
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293659
+ 
293660
+  (0.0ms) SELECT sql
293661
+ FROM sqlite_master
293662
+ WHERE name='unique_index_on_users_email' AND type='index'
293663
+ UNION ALL
293664
+ SELECT sql
293665
+ FROM sqlite_temp_master
293666
+ WHERE name='unique_index_on_users_email' AND type='index'
293667
+
293668
+  (0.0ms)  SELECT sql
293669
+ FROM sqlite_master
293670
+ WHERE name='index_users_on_email' AND type='index'
293671
+ UNION ALL
293672
+ SELECT sql
293673
+ FROM sqlite_temp_master
293674
+ WHERE name='index_users_on_email' AND type='index'
293675
+ 
293676
+  (0.0ms) SELECT sql
293677
+ FROM sqlite_master
293678
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293679
+ UNION ALL
293680
+ SELECT sql
293681
+ FROM sqlite_temp_master
293682
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293683
+
293684
+  (0.0ms)  SELECT sql
293685
+ FROM sqlite_master
293686
+ WHERE name='index_employers_on_id' AND type='index'
293687
+ UNION ALL
293688
+ SELECT sql
293689
+ FROM sqlite_temp_master
293690
+ WHERE name='index_employers_on_id' AND type='index'
293691
+ 
293692
+  (0.0ms) SELECT sql
293693
+ FROM sqlite_master
293694
+ WHERE name='index_users_on_last_name' AND type='index'
293695
+ UNION ALL
293696
+ SELECT sql
293697
+ FROM sqlite_temp_master
293698
+ WHERE name='index_users_on_last_name' AND type='index'
293699
+
293700
+  (0.0ms)  SELECT sql
293701
+ FROM sqlite_master
293702
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293703
+ UNION ALL
293704
+ SELECT sql
293705
+ FROM sqlite_temp_master
293706
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293707
+ 
293708
+  (0.0ms) SELECT sql
293709
+ FROM sqlite_master
293710
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293711
+ UNION ALL
293712
+ SELECT sql
293713
+ FROM sqlite_temp_master
293714
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293715
+
293716
+  (0.0ms)  SELECT sql
293717
+ FROM sqlite_master
293718
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293719
+ UNION ALL
293720
+ SELECT sql
293721
+ FROM sqlite_temp_master
293722
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293723
+ 
293724
+  (0.0ms) SELECT sql
293725
+ FROM sqlite_master
293726
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293727
+ UNION ALL
293728
+ SELECT sql
293729
+ FROM sqlite_temp_master
293730
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293731
+
293732
+  (0.0ms)  SELECT sql
293733
+ FROM sqlite_master
293734
+ WHERE name='unique_index_on_users_email' AND type='index'
293735
+ UNION ALL
293736
+ SELECT sql
293737
+ FROM sqlite_temp_master
293738
+ WHERE name='unique_index_on_users_email' AND type='index'
293739
+ 
293740
+  (0.0ms) SELECT sql
293741
+ FROM sqlite_master
293742
+ WHERE name='index_users_on_email' AND type='index'
293743
+ UNION ALL
293744
+ SELECT sql
293745
+ FROM sqlite_temp_master
293746
+ WHERE name='index_users_on_email' AND type='index'
293747
+
293748
+  (0.0ms) rollback transaction
293749
+  (0.0ms) begin transaction
293750
+ -----------------------------------------------------------------------------------------
293751
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
293752
+ -----------------------------------------------------------------------------------------
293753
+  (0.0ms)  SELECT sql
293754
+ FROM sqlite_master
293755
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293756
+ UNION ALL
293757
+ SELECT sql
293758
+ FROM sqlite_temp_master
293759
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293760
+ 
293761
+  (0.0ms) SELECT sql
293762
+ FROM sqlite_master
293763
+ WHERE name='index_employers_on_id' AND type='index'
293764
+ UNION ALL
293765
+ SELECT sql
293766
+ FROM sqlite_temp_master
293767
+ WHERE name='index_employers_on_id' AND type='index'
293768
+
293769
+  (0.0ms)  SELECT sql
293770
+ FROM sqlite_master
293771
+ WHERE name='index_users_on_last_name' AND type='index'
293772
+ UNION ALL
293773
+ SELECT sql
293774
+ FROM sqlite_temp_master
293775
+ WHERE name='index_users_on_last_name' AND type='index'
293776
+ 
293777
+  (0.0ms) SELECT sql
293778
+ FROM sqlite_master
293779
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293780
+ UNION ALL
293781
+ SELECT sql
293782
+ FROM sqlite_temp_master
293783
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293784
+
293785
+  (0.0ms)  SELECT sql
293786
+ FROM sqlite_master
293787
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293788
+ UNION ALL
293789
+ SELECT sql
293790
+ FROM sqlite_temp_master
293791
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293792
+ 
293793
+  (0.0ms) SELECT sql
293794
+ FROM sqlite_master
293795
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293796
+ UNION ALL
293797
+ SELECT sql
293798
+ FROM sqlite_temp_master
293799
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293800
+
293801
+  (0.0ms)  SELECT sql
293802
+ FROM sqlite_master
293803
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293804
+ UNION ALL
293805
+ SELECT sql
293806
+ FROM sqlite_temp_master
293807
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293808
+ 
293809
+  (0.0ms) SELECT sql
293810
+ FROM sqlite_master
293811
+ WHERE name='unique_index_on_users_email' AND type='index'
293812
+ UNION ALL
293813
+ SELECT sql
293814
+ FROM sqlite_temp_master
293815
+ WHERE name='unique_index_on_users_email' AND type='index'
293816
+
293817
+  (0.0ms)  SELECT sql
293818
+ FROM sqlite_master
293819
+ WHERE name='index_users_on_email' AND type='index'
293820
+ UNION ALL
293821
+ SELECT sql
293822
+ FROM sqlite_temp_master
293823
+ WHERE name='index_users_on_email' AND type='index'
293824
+ 
293825
+  (0.0ms) SELECT sql
293826
+ FROM sqlite_master
293827
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293828
+ UNION ALL
293829
+ SELECT sql
293830
+ FROM sqlite_temp_master
293831
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293832
+
293833
+  (0.0ms)  SELECT sql
293834
+ FROM sqlite_master
293835
+ WHERE name='index_employers_on_id' AND type='index'
293836
+ UNION ALL
293837
+ SELECT sql
293838
+ FROM sqlite_temp_master
293839
+ WHERE name='index_employers_on_id' AND type='index'
293840
+ 
293841
+  (0.0ms) SELECT sql
293842
+ FROM sqlite_master
293843
+ WHERE name='index_users_on_last_name' AND type='index'
293844
+ UNION ALL
293845
+ SELECT sql
293846
+ FROM sqlite_temp_master
293847
+ WHERE name='index_users_on_last_name' AND type='index'
293848
+
293849
+  (0.0ms)  SELECT sql
293850
+ FROM sqlite_master
293851
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293852
+ UNION ALL
293853
+ SELECT sql
293854
+ FROM sqlite_temp_master
293855
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293856
+ 
293857
+  (0.0ms) SELECT sql
293858
+ FROM sqlite_master
293859
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293860
+ UNION ALL
293861
+ SELECT sql
293862
+ FROM sqlite_temp_master
293863
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293864
+
293865
+  (0.0ms)  SELECT sql
293866
+ FROM sqlite_master
293867
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293868
+ UNION ALL
293869
+ SELECT sql
293870
+ FROM sqlite_temp_master
293871
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293872
+ 
293873
+  (0.0ms) SELECT sql
293874
+ FROM sqlite_master
293875
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293876
+ UNION ALL
293877
+ SELECT sql
293878
+ FROM sqlite_temp_master
293879
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293880
+
293881
+  (0.0ms)  SELECT sql
293882
+ FROM sqlite_master
293883
+ WHERE name='unique_index_on_users_email' AND type='index'
293884
+ UNION ALL
293885
+ SELECT sql
293886
+ FROM sqlite_temp_master
293887
+ WHERE name='unique_index_on_users_email' AND type='index'
293888
+ 
293889
+  (0.0ms) SELECT sql
293890
+ FROM sqlite_master
293891
+ WHERE name='index_users_on_email' AND type='index'
293892
+ UNION ALL
293893
+ SELECT sql
293894
+ FROM sqlite_temp_master
293895
+ WHERE name='index_users_on_email' AND type='index'
293896
+
293897
+  (0.0ms) rollback transaction
293898
+  (0.0ms) begin transaction
293899
+ ---------------------------------------------------------------------------------------------
293900
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
293901
+ ---------------------------------------------------------------------------------------------
293902
+  (0.0ms)  SELECT sql
293903
+ FROM sqlite_master
293904
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293905
+ UNION ALL
293906
+ SELECT sql
293907
+ FROM sqlite_temp_master
293908
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293909
+ 
293910
+  (0.0ms) SELECT sql
293911
+ FROM sqlite_master
293912
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293913
+ UNION ALL
293914
+ SELECT sql
293915
+ FROM sqlite_temp_master
293916
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
293917
+
293918
+  (0.0ms)  SELECT sql
293919
+ FROM sqlite_master
293920
+ WHERE name='index_users_on_last_name' AND type='index'
293921
+ UNION ALL
293922
+ SELECT sql
293923
+ FROM sqlite_temp_master
293924
+ WHERE name='index_users_on_last_name' AND type='index'
293925
+ 
293926
+  (0.0ms) SELECT sql
293927
+ FROM sqlite_master
293928
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293929
+ UNION ALL
293930
+ SELECT sql
293931
+ FROM sqlite_temp_master
293932
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293933
+
293934
+  (0.0ms)  SELECT sql
293935
+ FROM sqlite_master
293936
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293937
+ UNION ALL
293938
+ SELECT sql
293939
+ FROM sqlite_temp_master
293940
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293941
+ 
293942
+  (0.0ms) SELECT sql
293943
+ FROM sqlite_master
293944
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293945
+ UNION ALL
293946
+ SELECT sql
293947
+ FROM sqlite_temp_master
293948
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
293949
+
293950
+  (0.0ms)  SELECT sql
293951
+ FROM sqlite_master
293952
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293953
+ UNION ALL
293954
+ SELECT sql
293955
+ FROM sqlite_temp_master
293956
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
293957
+ 
293958
+  (0.0ms) SELECT sql
293959
+ FROM sqlite_master
293960
+ WHERE name='unique_index_on_users_email' AND type='index'
293961
+ UNION ALL
293962
+ SELECT sql
293963
+ FROM sqlite_temp_master
293964
+ WHERE name='unique_index_on_users_email' AND type='index'
293965
+
293966
+  (0.0ms)  SELECT sql
293967
+ FROM sqlite_master
293968
+ WHERE name='index_users_on_email' AND type='index'
293969
+ UNION ALL
293970
+ SELECT sql
293971
+ FROM sqlite_temp_master
293972
+ WHERE name='index_users_on_email' AND type='index'
293973
+ 
293974
+  (0.0ms) SELECT sql
293975
+ FROM sqlite_master
293976
+ WHERE name='index_users_on_last_name' AND type='index'
293977
+ UNION ALL
293978
+ SELECT sql
293979
+ FROM sqlite_temp_master
293980
+ WHERE name='index_users_on_last_name' AND type='index'
293981
+
293982
+  (0.0ms)  SELECT sql
293983
+ FROM sqlite_master
293984
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293985
+ UNION ALL
293986
+ SELECT sql
293987
+ FROM sqlite_temp_master
293988
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
293989
+ 
293990
+  (0.0ms) SELECT sql
293991
+ FROM sqlite_master
293992
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293993
+ UNION ALL
293994
+ SELECT sql
293995
+ FROM sqlite_temp_master
293996
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
293997
+
293998
+  (0.0ms)  SELECT sql
293999
+ FROM sqlite_master
294000
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294001
+ UNION ALL
294002
+ SELECT sql
294003
+ FROM sqlite_temp_master
294004
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294005
+ 
294006
+  (0.0ms) SELECT sql
294007
+ FROM sqlite_master
294008
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294009
+ UNION ALL
294010
+ SELECT sql
294011
+ FROM sqlite_temp_master
294012
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294013
+
294014
+  (0.0ms)  SELECT sql
294015
+ FROM sqlite_master
294016
+ WHERE name='unique_index_on_users_email' AND type='index'
294017
+ UNION ALL
294018
+ SELECT sql
294019
+ FROM sqlite_temp_master
294020
+ WHERE name='unique_index_on_users_email' AND type='index'
294021
+ 
294022
+  (0.0ms) SELECT sql
294023
+ FROM sqlite_master
294024
+ WHERE name='index_users_on_email' AND type='index'
294025
+ UNION ALL
294026
+ SELECT sql
294027
+ FROM sqlite_temp_master
294028
+ WHERE name='index_users_on_email' AND type='index'
294029
+
294030
+  (0.0ms)  SELECT sql
294031
+ FROM sqlite_master
294032
+ WHERE name='index_users_on_last_name' AND type='index'
294033
+ UNION ALL
294034
+ SELECT sql
294035
+ FROM sqlite_temp_master
294036
+ WHERE name='index_users_on_last_name' AND type='index'
294037
+ 
294038
+  (0.0ms) SELECT sql
294039
+ FROM sqlite_master
294040
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294041
+ UNION ALL
294042
+ SELECT sql
294043
+ FROM sqlite_temp_master
294044
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294045
+
294046
+  (0.0ms)  SELECT sql
294047
+ FROM sqlite_master
294048
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294049
+ UNION ALL
294050
+ SELECT sql
294051
+ FROM sqlite_temp_master
294052
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294053
+ 
294054
+  (0.0ms) SELECT sql
294055
+ FROM sqlite_master
294056
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294057
+ UNION ALL
294058
+ SELECT sql
294059
+ FROM sqlite_temp_master
294060
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294061
+
294062
+  (0.0ms)  SELECT sql
294063
+ FROM sqlite_master
294064
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294065
+ UNION ALL
294066
+ SELECT sql
294067
+ FROM sqlite_temp_master
294068
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294069
+ 
294070
+  (0.0ms) SELECT sql
294071
+ FROM sqlite_master
294072
+ WHERE name='unique_index_on_users_email' AND type='index'
294073
+ UNION ALL
294074
+ SELECT sql
294075
+ FROM sqlite_temp_master
294076
+ WHERE name='unique_index_on_users_email' AND type='index'
294077
+
294078
+  (0.0ms)  SELECT sql
294079
+ FROM sqlite_master
294080
+ WHERE name='index_users_on_email' AND type='index'
294081
+ UNION ALL
294082
+ SELECT sql
294083
+ FROM sqlite_temp_master
294084
+ WHERE name='index_users_on_email' AND type='index'
294085
+ 
294086
+  (0.0ms) rollback transaction
294087
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
294088
+  (0.0ms) begin transaction
294089
+ ---------------------------------------------------------------------------------------------
294090
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
294091
+ ---------------------------------------------------------------------------------------------
294092
+  (0.1ms)  SELECT sql
294093
+ FROM sqlite_master
294094
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294095
+ UNION ALL
294096
+ SELECT sql
294097
+ FROM sqlite_temp_master
294098
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294099
+ 
294100
+  (0.0ms) SELECT sql
294101
+ FROM sqlite_master
294102
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294103
+ UNION ALL
294104
+ SELECT sql
294105
+ FROM sqlite_temp_master
294106
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294107
+
294108
+  (0.0ms)  SELECT sql
294109
+ FROM sqlite_master
294110
+ WHERE name='index_users_on_last_name' AND type='index'
294111
+ UNION ALL
294112
+ SELECT sql
294113
+ FROM sqlite_temp_master
294114
+ WHERE name='index_users_on_last_name' AND type='index'
294115
+ 
294116
+  (0.0ms) SELECT sql
294117
+ FROM sqlite_master
294118
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294119
+ UNION ALL
294120
+ SELECT sql
294121
+ FROM sqlite_temp_master
294122
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294123
+
294124
+  (0.0ms)  SELECT sql
294125
+ FROM sqlite_master
294126
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294127
+ UNION ALL
294128
+ SELECT sql
294129
+ FROM sqlite_temp_master
294130
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294131
+ 
294132
+  (0.0ms) SELECT sql
294133
+ FROM sqlite_master
294134
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294135
+ UNION ALL
294136
+ SELECT sql
294137
+ FROM sqlite_temp_master
294138
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294139
+
294140
+  (0.0ms)  SELECT sql
294141
+ FROM sqlite_master
294142
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294143
+ UNION ALL
294144
+ SELECT sql
294145
+ FROM sqlite_temp_master
294146
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294147
+ 
294148
+  (0.1ms) SELECT sql
294149
+ FROM sqlite_master
294150
+ WHERE name='unique_index_on_users_email' AND type='index'
294151
+ UNION ALL
294152
+ SELECT sql
294153
+ FROM sqlite_temp_master
294154
+ WHERE name='unique_index_on_users_email' AND type='index'
294155
+
294156
+  (0.0ms)  SELECT sql
294157
+ FROM sqlite_master
294158
+ WHERE name='index_users_on_email' AND type='index'
294159
+ UNION ALL
294160
+ SELECT sql
294161
+ FROM sqlite_temp_master
294162
+ WHERE name='index_users_on_email' AND type='index'
294163
+ 
294164
+  (0.0ms) SELECT sql
294165
+ FROM sqlite_master
294166
+ WHERE name='index_users_on_last_name' AND type='index'
294167
+ UNION ALL
294168
+ SELECT sql
294169
+ FROM sqlite_temp_master
294170
+ WHERE name='index_users_on_last_name' AND type='index'
294171
+
294172
+  (0.0ms)  SELECT sql
294173
+ FROM sqlite_master
294174
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294175
+ UNION ALL
294176
+ SELECT sql
294177
+ FROM sqlite_temp_master
294178
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294179
+ 
294180
+  (0.0ms) SELECT sql
294181
+ FROM sqlite_master
294182
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294183
+ UNION ALL
294184
+ SELECT sql
294185
+ FROM sqlite_temp_master
294186
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294187
+
294188
+  (0.0ms)  SELECT sql
294189
+ FROM sqlite_master
294190
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294191
+ UNION ALL
294192
+ SELECT sql
294193
+ FROM sqlite_temp_master
294194
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294195
+ 
294196
+  (0.0ms) SELECT sql
294197
+ FROM sqlite_master
294198
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294199
+ UNION ALL
294200
+ SELECT sql
294201
+ FROM sqlite_temp_master
294202
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294203
+
294204
+  (0.0ms)  SELECT sql
294205
+ FROM sqlite_master
294206
+ WHERE name='unique_index_on_users_email' AND type='index'
294207
+ UNION ALL
294208
+ SELECT sql
294209
+ FROM sqlite_temp_master
294210
+ WHERE name='unique_index_on_users_email' AND type='index'
294211
+ 
294212
+  (0.0ms) SELECT sql
294213
+ FROM sqlite_master
294214
+ WHERE name='index_users_on_email' AND type='index'
294215
+ UNION ALL
294216
+ SELECT sql
294217
+ FROM sqlite_temp_master
294218
+ WHERE name='index_users_on_email' AND type='index'
294219
+
294220
+  (0.0ms)  SELECT sql
294221
+ FROM sqlite_master
294222
+ WHERE name='index_users_on_last_name' AND type='index'
294223
+ UNION ALL
294224
+ SELECT sql
294225
+ FROM sqlite_temp_master
294226
+ WHERE name='index_users_on_last_name' AND type='index'
294227
+ 
294228
+  (0.0ms) SELECT sql
294229
+ FROM sqlite_master
294230
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294231
+ UNION ALL
294232
+ SELECT sql
294233
+ FROM sqlite_temp_master
294234
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294235
+
294236
+  (0.0ms)  SELECT sql
294237
+ FROM sqlite_master
294238
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294239
+ UNION ALL
294240
+ SELECT sql
294241
+ FROM sqlite_temp_master
294242
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294243
+ 
294244
+  (0.0ms) SELECT sql
294245
+ FROM sqlite_master
294246
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294247
+ UNION ALL
294248
+ SELECT sql
294249
+ FROM sqlite_temp_master
294250
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294251
+
294252
+  (0.0ms)  SELECT sql
294253
+ FROM sqlite_master
294254
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294255
+ UNION ALL
294256
+ SELECT sql
294257
+ FROM sqlite_temp_master
294258
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294259
+ 
294260
+  (0.0ms) SELECT sql
294261
+ FROM sqlite_master
294262
+ WHERE name='unique_index_on_users_email' AND type='index'
294263
+ UNION ALL
294264
+ SELECT sql
294265
+ FROM sqlite_temp_master
294266
+ WHERE name='unique_index_on_users_email' AND type='index'
294267
+
294268
+  (0.0ms)  SELECT sql
294269
+ FROM sqlite_master
294270
+ WHERE name='index_users_on_email' AND type='index'
294271
+ UNION ALL
294272
+ SELECT sql
294273
+ FROM sqlite_temp_master
294274
+ WHERE name='index_users_on_email' AND type='index'
294275
+ 
294276
+  (0.0ms) rollback transaction
294277
+  (0.0ms) begin transaction
294278
+ -----------------------------------------------------------------------------------------
294279
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
294280
+ -----------------------------------------------------------------------------------------
294281
+  (0.0ms) SELECT sql
294282
+ FROM sqlite_master
294283
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294284
+ UNION ALL
294285
+ SELECT sql
294286
+ FROM sqlite_temp_master
294287
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294288
+
294289
+  (0.0ms)  SELECT sql
294290
+ FROM sqlite_master
294291
+ WHERE name='index_employers_on_id' AND type='index'
294292
+ UNION ALL
294293
+ SELECT sql
294294
+ FROM sqlite_temp_master
294295
+ WHERE name='index_employers_on_id' AND type='index'
294296
+ 
294297
+  (0.1ms) SELECT sql
294298
+ FROM sqlite_master
294299
+ WHERE name='index_users_on_last_name' AND type='index'
294300
+ UNION ALL
294301
+ SELECT sql
294302
+ FROM sqlite_temp_master
294303
+ WHERE name='index_users_on_last_name' AND type='index'
294304
+
294305
+  (0.0ms)  SELECT sql
294306
+ FROM sqlite_master
294307
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294308
+ UNION ALL
294309
+ SELECT sql
294310
+ FROM sqlite_temp_master
294311
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294312
+ 
294313
+  (0.0ms) SELECT sql
294314
+ FROM sqlite_master
294315
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294316
+ UNION ALL
294317
+ SELECT sql
294318
+ FROM sqlite_temp_master
294319
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294320
+
294321
+  (0.0ms)  SELECT sql
294322
+ FROM sqlite_master
294323
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294324
+ UNION ALL
294325
+ SELECT sql
294326
+ FROM sqlite_temp_master
294327
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294328
+ 
294329
+  (0.0ms) SELECT sql
294330
+ FROM sqlite_master
294331
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294332
+ UNION ALL
294333
+ SELECT sql
294334
+ FROM sqlite_temp_master
294335
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294336
+
294337
+  (0.0ms)  SELECT sql
294338
+ FROM sqlite_master
294339
+ WHERE name='unique_index_on_users_email' AND type='index'
294340
+ UNION ALL
294341
+ SELECT sql
294342
+ FROM sqlite_temp_master
294343
+ WHERE name='unique_index_on_users_email' AND type='index'
294344
+ 
294345
+  (0.0ms) SELECT sql
294346
+ FROM sqlite_master
294347
+ WHERE name='index_users_on_email' AND type='index'
294348
+ UNION ALL
294349
+ SELECT sql
294350
+ FROM sqlite_temp_master
294351
+ WHERE name='index_users_on_email' AND type='index'
294352
+
294353
+  (0.0ms)  SELECT sql
294354
+ FROM sqlite_master
294355
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294356
+ UNION ALL
294357
+ SELECT sql
294358
+ FROM sqlite_temp_master
294359
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294360
+ 
294361
+  (0.1ms) SELECT sql
294362
+ FROM sqlite_master
294363
+ WHERE name='index_employers_on_id' AND type='index'
294364
+ UNION ALL
294365
+ SELECT sql
294366
+ FROM sqlite_temp_master
294367
+ WHERE name='index_employers_on_id' AND type='index'
294368
+
294369
+  (0.0ms)  SELECT sql
294370
+ FROM sqlite_master
294371
+ WHERE name='index_users_on_last_name' AND type='index'
294372
+ UNION ALL
294373
+ SELECT sql
294374
+ FROM sqlite_temp_master
294375
+ WHERE name='index_users_on_last_name' AND type='index'
294376
+ 
294377
+  (0.0ms) SELECT sql
294378
+ FROM sqlite_master
294379
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294380
+ UNION ALL
294381
+ SELECT sql
294382
+ FROM sqlite_temp_master
294383
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294384
+
294385
+  (0.0ms)  SELECT sql
294386
+ FROM sqlite_master
294387
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294388
+ UNION ALL
294389
+ SELECT sql
294390
+ FROM sqlite_temp_master
294391
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294392
+ 
294393
+  (0.0ms) SELECT sql
294394
+ FROM sqlite_master
294395
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294396
+ UNION ALL
294397
+ SELECT sql
294398
+ FROM sqlite_temp_master
294399
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294400
+
294401
+  (0.0ms)  SELECT sql
294402
+ FROM sqlite_master
294403
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294404
+ UNION ALL
294405
+ SELECT sql
294406
+ FROM sqlite_temp_master
294407
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294408
+ 
294409
+  (0.0ms) SELECT sql
294410
+ FROM sqlite_master
294411
+ WHERE name='unique_index_on_users_email' AND type='index'
294412
+ UNION ALL
294413
+ SELECT sql
294414
+ FROM sqlite_temp_master
294415
+ WHERE name='unique_index_on_users_email' AND type='index'
294416
+
294417
+  (0.0ms)  SELECT sql
294418
+ FROM sqlite_master
294419
+ WHERE name='index_users_on_email' AND type='index'
294420
+ UNION ALL
294421
+ SELECT sql
294422
+ FROM sqlite_temp_master
294423
+ WHERE name='index_users_on_email' AND type='index'
294424
+ 
294425
+  (0.0ms) rollback transaction
294426
+  (0.0ms) begin transaction
294427
+ ------------------------------------------------------------------------------
294428
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
294429
+ ------------------------------------------------------------------------------
294430
+  (0.0ms) rollback transaction
294431
+  (0.0ms) begin transaction
294432
+ --------------------------------------------------------------------------------------
294433
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
294434
+ --------------------------------------------------------------------------------------
294435
+  (0.0ms) SELECT sql
294436
+ FROM sqlite_master
294437
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294438
+ UNION ALL
294439
+ SELECT sql
294440
+ FROM sqlite_temp_master
294441
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294442
+
294443
+  (0.0ms)  SELECT sql
294444
+ FROM sqlite_master
294445
+ WHERE name='index_employers_on_id' AND type='index'
294446
+ UNION ALL
294447
+ SELECT sql
294448
+ FROM sqlite_temp_master
294449
+ WHERE name='index_employers_on_id' AND type='index'
294450
+ 
294451
+  (0.0ms) SELECT sql
294452
+ FROM sqlite_master
294453
+ WHERE name='index_users_on_last_name' AND type='index'
294454
+ UNION ALL
294455
+ SELECT sql
294456
+ FROM sqlite_temp_master
294457
+ WHERE name='index_users_on_last_name' AND type='index'
294458
+
294459
+  (0.0ms)  SELECT sql
294460
+ FROM sqlite_master
294461
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294462
+ UNION ALL
294463
+ SELECT sql
294464
+ FROM sqlite_temp_master
294465
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294466
+ 
294467
+  (0.0ms) SELECT sql
294468
+ FROM sqlite_master
294469
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294470
+ UNION ALL
294471
+ SELECT sql
294472
+ FROM sqlite_temp_master
294473
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294474
+
294475
+  (0.0ms)  SELECT sql
294476
+ FROM sqlite_master
294477
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294478
+ UNION ALL
294479
+ SELECT sql
294480
+ FROM sqlite_temp_master
294481
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294482
+ 
294483
+  (0.0ms) SELECT sql
294484
+ FROM sqlite_master
294485
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294486
+ UNION ALL
294487
+ SELECT sql
294488
+ FROM sqlite_temp_master
294489
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294490
+
294491
+  (0.0ms)  SELECT sql
294492
+ FROM sqlite_master
294493
+ WHERE name='unique_index_on_users_email' AND type='index'
294494
+ UNION ALL
294495
+ SELECT sql
294496
+ FROM sqlite_temp_master
294497
+ WHERE name='unique_index_on_users_email' AND type='index'
294498
+ 
294499
+  (0.0ms) SELECT sql
294500
+ FROM sqlite_master
294501
+ WHERE name='index_users_on_email' AND type='index'
294502
+ UNION ALL
294503
+ SELECT sql
294504
+ FROM sqlite_temp_master
294505
+ WHERE name='index_users_on_email' AND type='index'
294506
+
294507
+  (0.0ms)  SELECT sql
294508
+ FROM sqlite_master
294509
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294510
+ UNION ALL
294511
+ SELECT sql
294512
+ FROM sqlite_temp_master
294513
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294514
+ 
294515
+  (0.0ms) SELECT sql
294516
+ FROM sqlite_master
294517
+ WHERE name='index_employers_on_id' AND type='index'
294518
+ UNION ALL
294519
+ SELECT sql
294520
+ FROM sqlite_temp_master
294521
+ WHERE name='index_employers_on_id' AND type='index'
294522
+
294523
+  (0.0ms)  SELECT sql
294524
+ FROM sqlite_master
294525
+ WHERE name='index_users_on_last_name' AND type='index'
294526
+ UNION ALL
294527
+ SELECT sql
294528
+ FROM sqlite_temp_master
294529
+ WHERE name='index_users_on_last_name' AND type='index'
294530
+ 
294531
+  (0.1ms) SELECT sql
294532
+ FROM sqlite_master
294533
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294534
+ UNION ALL
294535
+ SELECT sql
294536
+ FROM sqlite_temp_master
294537
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294538
+
294539
+  (0.0ms)  SELECT sql
294540
+ FROM sqlite_master
294541
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294542
+ UNION ALL
294543
+ SELECT sql
294544
+ FROM sqlite_temp_master
294545
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294546
+ 
294547
+  (0.0ms) SELECT sql
294548
+ FROM sqlite_master
294549
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294550
+ UNION ALL
294551
+ SELECT sql
294552
+ FROM sqlite_temp_master
294553
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294554
+
294555
+  (0.0ms)  SELECT sql
294556
+ FROM sqlite_master
294557
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294558
+ UNION ALL
294559
+ SELECT sql
294560
+ FROM sqlite_temp_master
294561
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294562
+ 
294563
+  (0.0ms) SELECT sql
294564
+ FROM sqlite_master
294565
+ WHERE name='unique_index_on_users_email' AND type='index'
294566
+ UNION ALL
294567
+ SELECT sql
294568
+ FROM sqlite_temp_master
294569
+ WHERE name='unique_index_on_users_email' AND type='index'
294570
+
294571
+  (0.0ms)  SELECT sql
294572
+ FROM sqlite_master
294573
+ WHERE name='index_users_on_email' AND type='index'
294574
+ UNION ALL
294575
+ SELECT sql
294576
+ FROM sqlite_temp_master
294577
+ WHERE name='index_users_on_email' AND type='index'
294578
+ 
294579
+  (0.0ms) rollback transaction
294580
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
294581
+  (0.1ms) begin transaction
294582
+ --------------------------------------------------------------------------------------
294583
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
294584
+ --------------------------------------------------------------------------------------
294585
+  (0.1ms)  SELECT sql
294586
+ FROM sqlite_master
294587
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294588
+ UNION ALL
294589
+ SELECT sql
294590
+ FROM sqlite_temp_master
294591
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294592
+ 
294593
+  (0.0ms) SELECT sql
294594
+ FROM sqlite_master
294595
+ WHERE name='index_employers_on_id' AND type='index'
294596
+ UNION ALL
294597
+ SELECT sql
294598
+ FROM sqlite_temp_master
294599
+ WHERE name='index_employers_on_id' AND type='index'
294600
+
294601
+  (0.1ms)  SELECT sql
294602
+ FROM sqlite_master
294603
+ WHERE name='index_users_on_last_name' AND type='index'
294604
+ UNION ALL
294605
+ SELECT sql
294606
+ FROM sqlite_temp_master
294607
+ WHERE name='index_users_on_last_name' AND type='index'
294608
+ 
294609
+  (0.0ms) SELECT sql
294610
+ FROM sqlite_master
294611
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294612
+ UNION ALL
294613
+ SELECT sql
294614
+ FROM sqlite_temp_master
294615
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294616
+
294617
+  (0.0ms)  SELECT sql
294618
+ FROM sqlite_master
294619
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294620
+ UNION ALL
294621
+ SELECT sql
294622
+ FROM sqlite_temp_master
294623
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294624
+ 
294625
+  (0.0ms) SELECT sql
294626
+ FROM sqlite_master
294627
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294628
+ UNION ALL
294629
+ SELECT sql
294630
+ FROM sqlite_temp_master
294631
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294632
+
294633
+  (0.0ms)  SELECT sql
294634
+ FROM sqlite_master
294635
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294636
+ UNION ALL
294637
+ SELECT sql
294638
+ FROM sqlite_temp_master
294639
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294640
+ 
294641
+  (0.0ms) SELECT sql
294642
+ FROM sqlite_master
294643
+ WHERE name='unique_index_on_users_email' AND type='index'
294644
+ UNION ALL
294645
+ SELECT sql
294646
+ FROM sqlite_temp_master
294647
+ WHERE name='unique_index_on_users_email' AND type='index'
294648
+
294649
+  (0.0ms)  SELECT sql
294650
+ FROM sqlite_master
294651
+ WHERE name='index_users_on_email' AND type='index'
294652
+ UNION ALL
294653
+ SELECT sql
294654
+ FROM sqlite_temp_master
294655
+ WHERE name='index_users_on_email' AND type='index'
294656
+ 
294657
+  (0.0ms) SELECT sql
294658
+ FROM sqlite_master
294659
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294660
+ UNION ALL
294661
+ SELECT sql
294662
+ FROM sqlite_temp_master
294663
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294664
+
294665
+  (0.0ms)  SELECT sql
294666
+ FROM sqlite_master
294667
+ WHERE name='index_employers_on_id' AND type='index'
294668
+ UNION ALL
294669
+ SELECT sql
294670
+ FROM sqlite_temp_master
294671
+ WHERE name='index_employers_on_id' AND type='index'
294672
+ 
294673
+  (0.0ms) SELECT sql
294674
+ FROM sqlite_master
294675
+ WHERE name='index_users_on_last_name' AND type='index'
294676
+ UNION ALL
294677
+ SELECT sql
294678
+ FROM sqlite_temp_master
294679
+ WHERE name='index_users_on_last_name' AND type='index'
294680
+
294681
+  (0.0ms)  SELECT sql
294682
+ FROM sqlite_master
294683
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294684
+ UNION ALL
294685
+ SELECT sql
294686
+ FROM sqlite_temp_master
294687
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294688
+ 
294689
+  (0.0ms) SELECT sql
294690
+ FROM sqlite_master
294691
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294692
+ UNION ALL
294693
+ SELECT sql
294694
+ FROM sqlite_temp_master
294695
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294696
+
294697
+  (0.0ms)  SELECT sql
294698
+ FROM sqlite_master
294699
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294700
+ UNION ALL
294701
+ SELECT sql
294702
+ FROM sqlite_temp_master
294703
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294704
+ 
294705
+  (0.0ms) SELECT sql
294706
+ FROM sqlite_master
294707
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294708
+ UNION ALL
294709
+ SELECT sql
294710
+ FROM sqlite_temp_master
294711
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294712
+
294713
+  (0.0ms)  SELECT sql
294714
+ FROM sqlite_master
294715
+ WHERE name='unique_index_on_users_email' AND type='index'
294716
+ UNION ALL
294717
+ SELECT sql
294718
+ FROM sqlite_temp_master
294719
+ WHERE name='unique_index_on_users_email' AND type='index'
294720
+ 
294721
+  (0.0ms) SELECT sql
294722
+ FROM sqlite_master
294723
+ WHERE name='index_users_on_email' AND type='index'
294724
+ UNION ALL
294725
+ SELECT sql
294726
+ FROM sqlite_temp_master
294727
+ WHERE name='index_users_on_email' AND type='index'
294728
+
294729
+  (0.0ms) rollback transaction
294730
+  (0.0ms) begin transaction
294731
+ -----------------------------------------------------------------------------------------
294732
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
294733
+ -----------------------------------------------------------------------------------------
294734
+  (0.0ms) rollback transaction
294735
+  (0.0ms) begin transaction
294736
+ ------------------------------------------------------------------------------
294737
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
294738
+ ------------------------------------------------------------------------------
294739
+  (0.0ms) rollback transaction
294740
+  (0.0ms) begin transaction
294741
+ ---------------------------------------------------------------------------------------------
294742
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
294743
+ ---------------------------------------------------------------------------------------------
294744
+  (0.0ms)  SELECT sql
294745
+ FROM sqlite_master
294746
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294747
+ UNION ALL
294748
+ SELECT sql
294749
+ FROM sqlite_temp_master
294750
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294751
+ 
294752
+  (0.0ms) SELECT sql
294753
+ FROM sqlite_master
294754
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294755
+ UNION ALL
294756
+ SELECT sql
294757
+ FROM sqlite_temp_master
294758
+ WHERE name='index_comments_on_commentable_type_and_commentable_id' AND type='index'
294759
+
294760
+  (0.0ms)  SELECT sql
294761
+ FROM sqlite_master
294762
+ WHERE name='index_users_on_last_name' AND type='index'
294763
+ UNION ALL
294764
+ SELECT sql
294765
+ FROM sqlite_temp_master
294766
+ WHERE name='index_users_on_last_name' AND type='index'
294767
+ 
294768
+  (0.0ms) SELECT sql
294769
+ FROM sqlite_master
294770
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294771
+ UNION ALL
294772
+ SELECT sql
294773
+ FROM sqlite_temp_master
294774
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294775
+
294776
+  (0.0ms)  SELECT sql
294777
+ FROM sqlite_master
294778
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294779
+ UNION ALL
294780
+ SELECT sql
294781
+ FROM sqlite_temp_master
294782
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294783
+ 
294784
+  (0.0ms) SELECT sql
294785
+ FROM sqlite_master
294786
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294787
+ UNION ALL
294788
+ SELECT sql
294789
+ FROM sqlite_temp_master
294790
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294791
+
294792
+  (0.0ms)  SELECT sql
294793
+ FROM sqlite_master
294794
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294795
+ UNION ALL
294796
+ SELECT sql
294797
+ FROM sqlite_temp_master
294798
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294799
+ 
294800
+  (0.0ms) SELECT sql
294801
+ FROM sqlite_master
294802
+ WHERE name='unique_index_on_users_email' AND type='index'
294803
+ UNION ALL
294804
+ SELECT sql
294805
+ FROM sqlite_temp_master
294806
+ WHERE name='unique_index_on_users_email' AND type='index'
294807
+
294808
+  (0.0ms)  SELECT sql
294809
+ FROM sqlite_master
294810
+ WHERE name='index_users_on_email' AND type='index'
294811
+ UNION ALL
294812
+ SELECT sql
294813
+ FROM sqlite_temp_master
294814
+ WHERE name='index_users_on_email' AND type='index'
294815
+ 
294816
+  (0.0ms) SELECT sql
294817
+ FROM sqlite_master
294818
+ WHERE name='index_users_on_last_name' AND type='index'
294819
+ UNION ALL
294820
+ SELECT sql
294821
+ FROM sqlite_temp_master
294822
+ WHERE name='index_users_on_last_name' AND type='index'
294823
+
294824
+  (0.0ms)  SELECT sql
294825
+ FROM sqlite_master
294826
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294827
+ UNION ALL
294828
+ SELECT sql
294829
+ FROM sqlite_temp_master
294830
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294831
+ 
294832
+  (0.0ms) SELECT sql
294833
+ FROM sqlite_master
294834
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294835
+ UNION ALL
294836
+ SELECT sql
294837
+ FROM sqlite_temp_master
294838
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294839
+
294840
+  (0.0ms)  SELECT sql
294841
+ FROM sqlite_master
294842
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294843
+ UNION ALL
294844
+ SELECT sql
294845
+ FROM sqlite_temp_master
294846
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294847
+ 
294848
+  (0.0ms) SELECT sql
294849
+ FROM sqlite_master
294850
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294851
+ UNION ALL
294852
+ SELECT sql
294853
+ FROM sqlite_temp_master
294854
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294855
+
294856
+  (0.1ms)  SELECT sql
294857
+ FROM sqlite_master
294858
+ WHERE name='unique_index_on_users_email' AND type='index'
294859
+ UNION ALL
294860
+ SELECT sql
294861
+ FROM sqlite_temp_master
294862
+ WHERE name='unique_index_on_users_email' AND type='index'
294863
+ 
294864
+  (0.0ms) SELECT sql
294865
+ FROM sqlite_master
294866
+ WHERE name='index_users_on_email' AND type='index'
294867
+ UNION ALL
294868
+ SELECT sql
294869
+ FROM sqlite_temp_master
294870
+ WHERE name='index_users_on_email' AND type='index'
294871
+
294872
+  (0.0ms)  SELECT sql
294873
+ FROM sqlite_master
294874
+ WHERE name='index_users_on_last_name' AND type='index'
294875
+ UNION ALL
294876
+ SELECT sql
294877
+ FROM sqlite_temp_master
294878
+ WHERE name='index_users_on_last_name' AND type='index'
294879
+ 
294880
+  (0.0ms) SELECT sql
294881
+ FROM sqlite_master
294882
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294883
+ UNION ALL
294884
+ SELECT sql
294885
+ FROM sqlite_temp_master
294886
+ WHERE name='unique_index_on_users_last_name_and_first_name' AND type='index'
294887
+
294888
+  (0.0ms)  SELECT sql
294889
+ FROM sqlite_master
294890
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294891
+ UNION ALL
294892
+ SELECT sql
294893
+ FROM sqlite_temp_master
294894
+ WHERE name='index_users_on_last_name_and_first_name' AND type='index'
294895
+ 
294896
+  (0.0ms) SELECT sql
294897
+ FROM sqlite_master
294898
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294899
+ UNION ALL
294900
+ SELECT sql
294901
+ FROM sqlite_temp_master
294902
+ WHERE name='index_users_on_last_name_and_first_name_and_email' AND type='index'
294903
+
294904
+  (0.0ms)  SELECT sql
294905
+ FROM sqlite_master
294906
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294907
+ UNION ALL
294908
+ SELECT sql
294909
+ FROM sqlite_temp_master
294910
+ WHERE name='index_users_on_employer_id_and_country_code' AND type='index'
294911
+ 
294912
+  (0.0ms) SELECT sql
294913
+ FROM sqlite_master
294914
+ WHERE name='unique_index_on_users_email' AND type='index'
294915
+ UNION ALL
294916
+ SELECT sql
294917
+ FROM sqlite_temp_master
294918
+ WHERE name='unique_index_on_users_email' AND type='index'
294919
+
294920
+  (0.0ms)  SELECT sql
294921
+ FROM sqlite_master
294922
+ WHERE name='index_users_on_email' AND type='index'
294923
+ UNION ALL
294924
+ SELECT sql
294925
+ FROM sqlite_temp_master
294926
+ WHERE name='index_users_on_email' AND type='index'
294927
+ 
294928
+  (0.0ms) rollback transaction
294929
+  (511.5ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
294930
+  (666.1ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
294931
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
294932
+  (59.5ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
294933
+  (18.9ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
294934
+  (38.8ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
294935
+  (26.1ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
294936
+  (46.6ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
294937
+  (36.0ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
294938
+  (50.0ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
294939
+  (26.6ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
294940
+  (27.1ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
294941
+  (21.2ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
294942
+  (18.7ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
294943
+  (26.7ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
294944
+  (28.0ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
294945
+  (12.0ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
294946
+ FOREIGN KEY ("employer_id")
294947
+ REFERENCES "employers" ("id")
294948
+ 
294949
+  (25.7ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
294950
+  (25.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
294951
+  (0.3ms) SELECT version FROM "schema_migrations"
294952
+  (7.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
294953
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
294954
+  (7.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
294955
+  (7.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
294956
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
294957
+  (0.1ms) BEGIN
294958
+ ---------------------------------------------------------------------------------------------
294959
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
294960
+ ---------------------------------------------------------------------------------------------
294961
+  (0.0ms) ROLLBACK
294962
+  (0.0ms) BEGIN
294963
+ -----------------------------------------------------------------------------------------
294964
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
294965
+ -----------------------------------------------------------------------------------------
294966
+  (1.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
294967
+ FROM pg_constraint c
294968
+ JOIN pg_class t1 ON c.conrelid = t1.oid
294969
+ JOIN pg_class t2 ON c.confrelid = t2.oid
294970
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
294971
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
294972
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
294973
+ WHERE c.contype = 'f'
294974
+ AND t1.relname = 'comments'
294975
+ AND t3.nspname = ANY (current_schemas(false))
294976
+ ORDER BY c.conname
294977
+ 
294978
+  (0.1ms) ROLLBACK
294979
+  (0.1ms) BEGIN
294980
+ ------------------------------------------------------------------------------
294981
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
294982
+ ------------------------------------------------------------------------------
294983
+  (0.1ms) ROLLBACK
294984
+  (0.1ms) BEGIN
294985
+ --------------------------------------------------------------------------------------
294986
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
294987
+ --------------------------------------------------------------------------------------
294988
+  (0.1ms) ROLLBACK
294989
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
294990
+  (0.1ms) BEGIN
294991
+ --------------------------------------------------------------------------------------
294992
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
294993
+ --------------------------------------------------------------------------------------
294994
+  (0.1ms) ROLLBACK
294995
+  (0.0ms) BEGIN
294996
+ ---------------------------------------------------------------------------------------------
294997
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
294998
+ ---------------------------------------------------------------------------------------------
294999
+  (0.0ms) ROLLBACK
295000
+  (0.0ms) BEGIN
295001
+ -----------------------------------------------------------------------------------------
295002
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295003
+ -----------------------------------------------------------------------------------------
295004
+  (1.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295005
+ FROM pg_constraint c
295006
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295007
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295008
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295009
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295010
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295011
+ WHERE c.contype = 'f'
295012
+ AND t1.relname = 'comments'
295013
+ AND t3.nspname = ANY (current_schemas(false))
295014
+ ORDER BY c.conname
295015
+ 
295016
+  (1.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295017
+ FROM pg_constraint c
295018
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295019
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295020
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295021
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295022
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295023
+ WHERE c.contype = 'f'
295024
+ AND t1.relname = 'profiles'
295025
+ AND t3.nspname = ANY (current_schemas(false))
295026
+ ORDER BY c.conname
295027
+
295028
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295029
+ FROM pg_constraint c
295030
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295031
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295032
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295033
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295034
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295035
+ WHERE c.contype = 'f'
295036
+ AND t1.relname = 'employers'
295037
+ AND t3.nspname = ANY (current_schemas(false))
295038
+ ORDER BY c.conname
295039
+ 
295040
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295041
+ FROM pg_constraint c
295042
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295043
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295044
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295045
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295046
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295047
+ WHERE c.contype = 'f'
295048
+ AND t1.relname = 'users'
295049
+ AND t3.nspname = ANY (current_schemas(false))
295050
+ ORDER BY c.conname
295051
+
295052
+  (1.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295053
+ FROM pg_constraint c
295054
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295055
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295056
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295057
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295058
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295059
+ WHERE c.contype = 'f'
295060
+ AND t1.relname = 'schema_migrations'
295061
+ AND t3.nspname = ANY (current_schemas(false))
295062
+ ORDER BY c.conname
295063
+ 
295064
+  (0.1ms) ROLLBACK
295065
+  (0.0ms) BEGIN
295066
+ ------------------------------------------------------------------------------
295067
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295068
+ ------------------------------------------------------------------------------
295069
+  (0.0ms) ROLLBACK
295070
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295071
+  (0.1ms) BEGIN
295072
+ ---------------------------------------------------------------------------------------------
295073
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295074
+ ---------------------------------------------------------------------------------------------
295075
+  (0.0ms) ROLLBACK
295076
+  (0.0ms) BEGIN
295077
+ -----------------------------------------------------------------------------------------
295078
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295079
+ -----------------------------------------------------------------------------------------
295080
+  (0.1ms) ROLLBACK
295081
+  (0.1ms) BEGIN
295082
+ ------------------------------------------------------------------------------
295083
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295084
+ ------------------------------------------------------------------------------
295085
+  (0.1ms) ROLLBACK
295086
+  (0.0ms) BEGIN
295087
+ --------------------------------------------------------------------------------------
295088
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295089
+ --------------------------------------------------------------------------------------
295090
+  (0.0ms) ROLLBACK
295091
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295092
+  (0.1ms) BEGIN
295093
+ --------------------------------------------------------------------------------------
295094
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295095
+ --------------------------------------------------------------------------------------
295096
+  (0.0ms) ROLLBACK
295097
+  (0.0ms) BEGIN
295098
+ ------------------------------------------------------------------------------
295099
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295100
+ ------------------------------------------------------------------------------
295101
+  (0.0ms) ROLLBACK
295102
+  (0.1ms) BEGIN
295103
+ ---------------------------------------------------------------------------------------------
295104
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295105
+ ---------------------------------------------------------------------------------------------
295106
+  (0.0ms) ROLLBACK
295107
+  (0.0ms) BEGIN
295108
+ -----------------------------------------------------------------------------------------
295109
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295110
+ -----------------------------------------------------------------------------------------
295111
+  (0.1ms) ROLLBACK
295112
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295113
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295114
+  (0.1ms) BEGIN
295115
+ -----------------------------------------------------------------------------------------
295116
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295117
+ -----------------------------------------------------------------------------------------
295118
+  (0.1ms) ROLLBACK
295119
+  (0.1ms) BEGIN
295120
+ ---------------------------------------------------------------------------------------------
295121
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295122
+ ---------------------------------------------------------------------------------------------
295123
+  (0.0ms) ROLLBACK
295124
+  (0.0ms) BEGIN
295125
+ --------------------------------------------------------------------------------------
295126
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295127
+ --------------------------------------------------------------------------------------
295128
+  (0.0ms) ROLLBACK
295129
+  (0.0ms) BEGIN
295130
+ ------------------------------------------------------------------------------
295131
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295132
+ ------------------------------------------------------------------------------
295133
+  (0.0ms) ROLLBACK
295134
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295135
+  (0.1ms) BEGIN
295136
+ ------------------------------------------------------------------------------
295137
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295138
+ ------------------------------------------------------------------------------
295139
+  (0.0ms) ROLLBACK
295140
+  (0.0ms) BEGIN
295141
+ -----------------------------------------------------------------------------------------
295142
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295143
+ -----------------------------------------------------------------------------------------
295144
+  (0.1ms) ROLLBACK
295145
+  (0.1ms) BEGIN
295146
+ --------------------------------------------------------------------------------------
295147
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295148
+ --------------------------------------------------------------------------------------
295149
+  (0.0ms) ROLLBACK
295150
+  (0.0ms) BEGIN
295151
+ ---------------------------------------------------------------------------------------------
295152
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295153
+ ---------------------------------------------------------------------------------------------
295154
+  (0.0ms) ROLLBACK
295155
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295156
+  (0.1ms) BEGIN
295157
+ -----------------------------------------------------------------------------------------
295158
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295159
+ -----------------------------------------------------------------------------------------
295160
+  (0.1ms) ROLLBACK
295161
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295162
+  (0.1ms) BEGIN
295163
+ -----------------------------------------------------------------------------------------
295164
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295165
+ -----------------------------------------------------------------------------------------
295166
+  (0.1ms) ROLLBACK
295167
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295168
+  (0.1ms) BEGIN
295169
+ -----------------------------------------------------------------------------------------
295170
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295171
+ -----------------------------------------------------------------------------------------
295172
+  (0.1ms) ROLLBACK
295173
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295174
+  (0.1ms) BEGIN
295175
+ -----------------------------------------------------------------------------------------
295176
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295177
+ -----------------------------------------------------------------------------------------
295178
+  (0.1ms) ROLLBACK
295179
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295180
+  (0.1ms) BEGIN
295181
+ -----------------------------------------------------------------------------------------
295182
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295183
+ -----------------------------------------------------------------------------------------
295184
+  (0.1ms) ROLLBACK
295185
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295186
+  (0.1ms) BEGIN
295187
+ -----------------------------------------------------------------------------------------
295188
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295189
+ -----------------------------------------------------------------------------------------
295190
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295191
+ FROM pg_constraint c
295192
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295193
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295194
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295195
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295196
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295197
+ WHERE c.contype = 'f'
295198
+ AND t1.relname = 'comments'
295199
+ AND t3.nspname = ANY (current_schemas(false))
295200
+ ORDER BY c.conname
295201
+ 
295202
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295203
+ FROM pg_constraint c
295204
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295205
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295206
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295207
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295208
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295209
+ WHERE c.contype = 'f'
295210
+ AND t1.relname = 'users'
295211
+ AND t3.nspname = ANY (current_schemas(false))
295212
+ ORDER BY c.conname
295213
+
295214
+  (0.1ms) ROLLBACK
295215
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295216
+  (0.1ms) BEGIN
295217
+ -----------------------------------------------------------------------------------------
295218
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295219
+ -----------------------------------------------------------------------------------------
295220
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295221
+ FROM pg_constraint c
295222
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295223
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295224
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295225
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295226
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295227
+ WHERE c.contype = 'f'
295228
+ AND t1.relname = 'comments'
295229
+ AND t3.nspname = ANY (current_schemas(false))
295230
+ ORDER BY c.conname
295231
+ 
295232
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295233
+ FROM pg_constraint c
295234
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295235
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295236
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295237
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295238
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295239
+ WHERE c.contype = 'f'
295240
+ AND t1.relname = 'users'
295241
+ AND t3.nspname = ANY (current_schemas(false))
295242
+ ORDER BY c.conname
295243
+
295244
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295245
+ FROM pg_constraint c
295246
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295247
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295248
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295249
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295250
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295251
+ WHERE c.contype = 'f'
295252
+ AND t1.relname = 'users'
295253
+ AND t3.nspname = ANY (current_schemas(false))
295254
+ ORDER BY c.conname
295255
+ 
295256
+  (0.1ms) ROLLBACK
295257
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295258
+  (0.1ms) BEGIN
295259
+ -----------------------------------------------------------------------------------------
295260
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295261
+ -----------------------------------------------------------------------------------------
295262
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295263
+ FROM pg_constraint c
295264
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295265
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295266
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295267
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295268
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295269
+ WHERE c.contype = 'f'
295270
+ AND t1.relname = 'comments'
295271
+ AND t3.nspname = ANY (current_schemas(false))
295272
+ ORDER BY c.conname
295273
+ 
295274
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295275
+ FROM pg_constraint c
295276
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295277
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295278
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295279
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295280
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295281
+ WHERE c.contype = 'f'
295282
+ AND t1.relname = 'users'
295283
+ AND t3.nspname = ANY (current_schemas(false))
295284
+ ORDER BY c.conname
295285
+
295286
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295287
+ FROM pg_constraint c
295288
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295289
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295290
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295291
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295292
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295293
+ WHERE c.contype = 'f'
295294
+ AND t1.relname = 'users'
295295
+ AND t3.nspname = ANY (current_schemas(false))
295296
+ ORDER BY c.conname
295297
+ 
295298
+  (0.1ms) ROLLBACK
295299
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295300
+  (0.1ms) BEGIN
295301
+ -----------------------------------------------------------------------------------------
295302
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295303
+ -----------------------------------------------------------------------------------------
295304
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295305
+ FROM pg_constraint c
295306
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295307
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295308
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295309
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295310
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295311
+ WHERE c.contype = 'f'
295312
+ AND t1.relname = 'comments'
295313
+ AND t3.nspname = ANY (current_schemas(false))
295314
+ ORDER BY c.conname
295315
+ 
295316
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295317
+ FROM pg_constraint c
295318
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295319
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295320
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295321
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295322
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295323
+ WHERE c.contype = 'f'
295324
+ AND t1.relname = 'users'
295325
+ AND t3.nspname = ANY (current_schemas(false))
295326
+ ORDER BY c.conname
295327
+
295328
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295329
+ FROM pg_constraint c
295330
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295331
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295332
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295333
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295334
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295335
+ WHERE c.contype = 'f'
295336
+ AND t1.relname = 'users'
295337
+ AND t3.nspname = ANY (current_schemas(false))
295338
+ ORDER BY c.conname
295339
+ 
295340
+  (0.1ms) ROLLBACK
295341
+  (118.2ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
295342
+  (783.8ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
295343
+  (411.0ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
295344
+  (499.3ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
295345
+ SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
295346
+  (28.5ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295347
+  (12.4ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
295348
+  (41.0ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295349
+  (17.6ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
295350
+  (29.3ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295351
+  (23.4ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
295352
+  (17.5ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
295353
+  (17.6ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
295354
+  (20.8ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
295355
+  (21.2ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
295356
+  (21.0ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295357
+  (17.9ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295358
+  (17.4ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
295359
+  (8.3ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
295360
+ FOREIGN KEY ("employer_id")
295361
+ REFERENCES "employers" ("id")
295362
+ 
295363
+  (18.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
295364
+  (17.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
295365
+  (0.1ms) SELECT version FROM "schema_migrations"
295366
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
295367
+  (7.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
295368
+  (7.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
295369
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
295370
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295371
+  (0.1ms) BEGIN
295372
+ ------------------------------------------------------------------------------
295373
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295374
+ ------------------------------------------------------------------------------
295375
+  (0.1ms) ROLLBACK
295376
+  (0.0ms) BEGIN
295377
+ -----------------------------------------------------------------------------------------
295378
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295379
+ -----------------------------------------------------------------------------------------
295380
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295381
+ FROM pg_constraint c
295382
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295383
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295384
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295385
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295386
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295387
+ WHERE c.contype = 'f'
295388
+ AND t1.relname = 'comments'
295389
+ AND t3.nspname = ANY (current_schemas(false))
295390
+ ORDER BY c.conname
295391
+ 
295392
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295393
+ FROM pg_constraint c
295394
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295395
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295396
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295397
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295398
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295399
+ WHERE c.contype = 'f'
295400
+ AND t1.relname = 'users'
295401
+ AND t3.nspname = ANY (current_schemas(false))
295402
+ ORDER BY c.conname
295403
+
295404
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295405
+ FROM pg_constraint c
295406
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295407
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295408
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295409
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295410
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295411
+ WHERE c.contype = 'f'
295412
+ AND t1.relname = 'users'
295413
+ AND t3.nspname = ANY (current_schemas(false))
295414
+ ORDER BY c.conname
295415
+ 
295416
+  (0.1ms) ROLLBACK
295417
+  (0.0ms) BEGIN
295418
+ --------------------------------------------------------------------------------------
295419
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295420
+ --------------------------------------------------------------------------------------
295421
+  (0.0ms) ROLLBACK
295422
+  (0.0ms) BEGIN
295423
+ ---------------------------------------------------------------------------------------------
295424
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295425
+ ---------------------------------------------------------------------------------------------
295426
+  (0.0ms) ROLLBACK
295427
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295428
+  (111.0ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
295429
+  (511.0ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
295430
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
295431
+  (46.4ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295432
+  (12.3ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
295433
+  (35.2ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295434
+  (23.8ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
295435
+  (29.0ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295436
+  (34.7ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
295437
+  (31.4ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
295438
+  (25.7ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
295439
+  (23.5ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
295440
+  (17.9ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
295441
+  (17.7ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295442
+  (12.3ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295443
+  (23.4ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
295444
+  (8.7ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
295445
+ FOREIGN KEY ("employer_id")
295446
+ REFERENCES "employers" ("id")
295447
+ 
295448
+  (8.1ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_a8794354f0"
295449
+ FOREIGN KEY ("profile_id")
295450
+ REFERENCES "profiles" ("id")
295451
+
295452
+  (18.3ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
295453
+  (24.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
295454
+  (0.2ms) SELECT version FROM "schema_migrations"
295455
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
295456
+  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213102131')
295457
+  (7.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
295458
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213103017')
295459
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295460
+  (0.1ms) BEGIN
295461
+ ------------------------------------------------------------------------------
295462
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295463
+ ------------------------------------------------------------------------------
295464
+  (0.1ms) ROLLBACK
295465
+  (0.0ms) BEGIN
295466
+ --------------------------------------------------------------------------------------
295467
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295468
+ --------------------------------------------------------------------------------------
295469
+  (0.0ms) ROLLBACK
295470
+  (0.0ms) BEGIN
295471
+ ---------------------------------------------------------------------------------------------
295472
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295473
+ ---------------------------------------------------------------------------------------------
295474
+  (0.0ms) ROLLBACK
295475
+  (406.6ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
295476
+  (491.5ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
295477
+ SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
295478
+  (41.9ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295479
+  (12.3ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
295480
+  (37.4ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295481
+  (23.3ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
295482
+  (31.8ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295483
+  (29.1ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
295484
+  (21.1ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
295485
+  (18.1ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
295486
+  (21.1ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
295487
+  (18.6ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
295488
+  (12.1ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295489
+  (23.9ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295490
+  (12.6ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
295491
+  (2.9ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
295492
+ FOREIGN KEY ("employer_id")
295493
+ REFERENCES "employers" ("id")
295494
+ 
295495
+  (8.3ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_a8794354f0"
295496
+ FOREIGN KEY ("profile_id")
295497
+ REFERENCES "profiles" ("id")
295498
+
295499
+  (15.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
295500
+  (17.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
295501
+  (0.2ms) SELECT version FROM "schema_migrations"
295502
+  (7.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
295503
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
295504
+  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
295505
+  (7.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
295506
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295507
+  (0.1ms) BEGIN
295508
+ ---------------------------------------------------------------------------------------------
295509
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295510
+ ---------------------------------------------------------------------------------------------
295511
+  (0.0ms) ROLLBACK
295512
+  (0.0ms) BEGIN
295513
+ --------------------------------------------------------------------------------------
295514
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295515
+ --------------------------------------------------------------------------------------
295516
+  (0.0ms) ROLLBACK
295517
+  (0.0ms) BEGIN
295518
+ ------------------------------------------------------------------------------
295519
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295520
+ ------------------------------------------------------------------------------
295521
+  (0.0ms) ROLLBACK
295522
+  (0.0ms) BEGIN
295523
+ -----------------------------------------------------------------------------------------
295524
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295525
+ -----------------------------------------------------------------------------------------
295526
+  (1.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295527
+ FROM pg_constraint c
295528
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295529
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295530
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295531
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295532
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295533
+ WHERE c.contype = 'f'
295534
+ AND t1.relname = 'comments'
295535
+ AND t3.nspname = ANY (current_schemas(false))
295536
+ ORDER BY c.conname
295537
+ 
295538
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295539
+ FROM pg_constraint c
295540
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295541
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295542
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295543
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295544
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295545
+ WHERE c.contype = 'f'
295546
+ AND t1.relname = 'users'
295547
+ AND t3.nspname = ANY (current_schemas(false))
295548
+ ORDER BY c.conname
295549
+
295550
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295551
+ FROM pg_constraint c
295552
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295553
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295554
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295555
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295556
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295557
+ WHERE c.contype = 'f'
295558
+ AND t1.relname = 'users'
295559
+ AND t3.nspname = ANY (current_schemas(false))
295560
+ ORDER BY c.conname
295561
+ 
295562
+  (0.1ms) ROLLBACK
295563
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295564
+  (0.1ms) BEGIN
295565
+ -----------------------------------------------------------------------------------------
295566
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295567
+ -----------------------------------------------------------------------------------------
295568
+  (1.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295569
+ FROM pg_constraint c
295570
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295571
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295572
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295573
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295574
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295575
+ WHERE c.contype = 'f'
295576
+ AND t1.relname = 'comments'
295577
+ AND t3.nspname = ANY (current_schemas(false))
295578
+ ORDER BY c.conname
295579
+ 
295580
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295581
+ FROM pg_constraint c
295582
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295583
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295584
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295585
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295586
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295587
+ WHERE c.contype = 'f'
295588
+ AND t1.relname = 'users'
295589
+ AND t3.nspname = ANY (current_schemas(false))
295590
+ ORDER BY c.conname
295591
+
295592
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295593
+ FROM pg_constraint c
295594
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295595
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295596
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295597
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295598
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295599
+ WHERE c.contype = 'f'
295600
+ AND t1.relname = 'users'
295601
+ AND t3.nspname = ANY (current_schemas(false))
295602
+ ORDER BY c.conname
295603
+ 
295604
+  (0.2ms) ROLLBACK
295605
+  (0.1ms) BEGIN
295606
+ ---------------------------------------------------------------------------------------------
295607
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295608
+ ---------------------------------------------------------------------------------------------
295609
+  (0.0ms) ROLLBACK
295610
+  (0.0ms) BEGIN
295611
+ ------------------------------------------------------------------------------
295612
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295613
+ ------------------------------------------------------------------------------
295614
+  (0.0ms) ROLLBACK
295615
+  (0.0ms) BEGIN
295616
+ --------------------------------------------------------------------------------------
295617
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295618
+ --------------------------------------------------------------------------------------
295619
+  (0.0ms) ROLLBACK
295620
+  (611.2ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
295621
+  (582.9ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
295622
+ SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
295623
+  (52.2ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295624
+  (18.9ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
295625
+  (34.9ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295626
+  (17.9ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
295627
+  (35.0ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
295628
+  (35.0ms) CREATE TABLE "users" ("id" serial primary key, "email" character varying, "first_name" character varying, "last_name" character varying, "profile_id" integer, "employer_id" integer, "country_code" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
295629
+  (29.7ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
295630
+  (29.2ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
295631
+  (12.5ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
295632
+  (24.0ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
295633
+  (12.6ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295634
+  (12.5ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
295635
+  (21.9ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
295636
+  (9.1ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
295637
+ FOREIGN KEY ("employer_id")
295638
+ REFERENCES "employers" ("id")
295639
+ 
295640
+  (24.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
295641
+  (18.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
295642
+  (0.2ms) SELECT version FROM "schema_migrations"
295643
+  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
295644
+  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
295645
+  (7.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
295646
+  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
295647
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
295648
+  (0.1ms) BEGIN
295649
+ -----------------------------------------------------------------------------------------
295650
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295651
+ -----------------------------------------------------------------------------------------
295652
+  (1.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295653
+ FROM pg_constraint c
295654
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295655
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295656
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295657
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295658
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295659
+ WHERE c.contype = 'f'
295660
+ AND t1.relname = 'comments'
295661
+ AND t3.nspname = ANY (current_schemas(false))
295662
+ ORDER BY c.conname
295663
+ 
295664
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295665
+ FROM pg_constraint c
295666
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295667
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295668
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295669
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295670
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295671
+ WHERE c.contype = 'f'
295672
+ AND t1.relname = 'users'
295673
+ AND t3.nspname = ANY (current_schemas(false))
295674
+ ORDER BY c.conname
295675
+
295676
+  (1.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295677
+ FROM pg_constraint c
295678
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295679
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295680
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295681
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295682
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295683
+ WHERE c.contype = 'f'
295684
+ AND t1.relname = 'users'
295685
+ AND t3.nspname = ANY (current_schemas(false))
295686
+ ORDER BY c.conname
295687
+ 
295688
+  (0.1ms) ROLLBACK
295689
+  (0.0ms) BEGIN
295690
+ --------------------------------------------------------------------------------------
295691
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295692
+ --------------------------------------------------------------------------------------
295693
+  (0.0ms) ROLLBACK
295694
+  (0.0ms) BEGIN
295695
+ ------------------------------------------------------------------------------
295696
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295697
+ ------------------------------------------------------------------------------
295698
+  (0.0ms) ROLLBACK
295699
+  (0.0ms) BEGIN
295700
+ ---------------------------------------------------------------------------------------------
295701
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295702
+ ---------------------------------------------------------------------------------------------
295703
+  (0.1ms) ROLLBACK
295704
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
295705
+  (0.1ms) BEGIN
295706
+ ------------------------------------------------------------------------------
295707
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295708
+ ------------------------------------------------------------------------------
295709
+  (0.1ms) ROLLBACK
295710
+  (0.0ms) BEGIN
295711
+ ---------------------------------------------------------------------------------------------
295712
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295713
+ ---------------------------------------------------------------------------------------------
295714
+  (0.0ms) ROLLBACK
295715
+  (0.0ms) BEGIN
295716
+ --------------------------------------------------------------------------------------
295717
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295718
+ --------------------------------------------------------------------------------------
295719
+  (0.0ms) ROLLBACK
295720
+  (0.0ms) BEGIN
295721
+ -----------------------------------------------------------------------------------------
295722
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295723
+ -----------------------------------------------------------------------------------------
295724
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295725
+ FROM pg_constraint c
295726
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295727
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295728
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295729
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295730
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295731
+ WHERE c.contype = 'f'
295732
+ AND t1.relname = 'comments'
295733
+ AND t3.nspname = ANY (current_schemas(false))
295734
+ ORDER BY c.conname
295735
+ 
295736
+  (1.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295737
+ FROM pg_constraint c
295738
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295739
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295740
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295741
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295742
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295743
+ WHERE c.contype = 'f'
295744
+ AND t1.relname = 'users'
295745
+ AND t3.nspname = ANY (current_schemas(false))
295746
+ ORDER BY c.conname
295747
+
295748
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295749
+ FROM pg_constraint c
295750
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295751
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295752
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295753
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295754
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295755
+ WHERE c.contype = 'f'
295756
+ AND t1.relname = 'users'
295757
+ AND t3.nspname = ANY (current_schemas(false))
295758
+ ORDER BY c.conname
295759
+ 
295760
+  (0.1ms) ROLLBACK
295761
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
295762
+  (0.1ms) BEGIN
295763
+ ---------------------------------------------------------------------------------------------
295764
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295765
+ ---------------------------------------------------------------------------------------------
295766
+  (0.0ms) ROLLBACK
295767
+  (0.0ms) BEGIN
295768
+ --------------------------------------------------------------------------------------
295769
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295770
+ --------------------------------------------------------------------------------------
295771
+  (0.0ms) ROLLBACK
295772
+  (0.0ms) BEGIN
295773
+ -----------------------------------------------------------------------------------------
295774
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295775
+ -----------------------------------------------------------------------------------------
295776
+  (1.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295777
+ FROM pg_constraint c
295778
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295779
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295780
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295781
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295782
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295783
+ WHERE c.contype = 'f'
295784
+ AND t1.relname = 'comments'
295785
+ AND t3.nspname = ANY (current_schemas(false))
295786
+ ORDER BY c.conname
295787
+ 
295788
+  (1.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295789
+ FROM pg_constraint c
295790
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295791
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295792
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295793
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295794
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295795
+ WHERE c.contype = 'f'
295796
+ AND t1.relname = 'users'
295797
+ AND t3.nspname = ANY (current_schemas(false))
295798
+ ORDER BY c.conname
295799
+
295800
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295801
+ FROM pg_constraint c
295802
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295803
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295804
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295805
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295806
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295807
+ WHERE c.contype = 'f'
295808
+ AND t1.relname = 'users'
295809
+ AND t3.nspname = ANY (current_schemas(false))
295810
+ ORDER BY c.conname
295811
+ 
295812
+  (0.1ms) ROLLBACK
295813
+  (0.0ms) BEGIN
295814
+ ------------------------------------------------------------------------------
295815
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295816
+ ------------------------------------------------------------------------------
295817
+  (0.0ms) ROLLBACK
295818
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
295819
+  (0.1ms) BEGIN
295820
+ -----------------------------------------------------------------------------------------
295821
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295822
+ -----------------------------------------------------------------------------------------
295823
+  (1.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295824
+ FROM pg_constraint c
295825
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295826
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295827
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295828
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295829
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295830
+ WHERE c.contype = 'f'
295831
+ AND t1.relname = 'comments'
295832
+ AND t3.nspname = ANY (current_schemas(false))
295833
+ ORDER BY c.conname
295834
+ 
295835
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295836
+ FROM pg_constraint c
295837
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295838
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295839
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295840
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295841
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295842
+ WHERE c.contype = 'f'
295843
+ AND t1.relname = 'users'
295844
+ AND t3.nspname = ANY (current_schemas(false))
295845
+ ORDER BY c.conname
295846
+
295847
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295848
+ FROM pg_constraint c
295849
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295850
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295851
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295852
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295853
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295854
+ WHERE c.contype = 'f'
295855
+ AND t1.relname = 'users'
295856
+ AND t3.nspname = ANY (current_schemas(false))
295857
+ ORDER BY c.conname
295858
+ 
295859
+  (0.1ms) ROLLBACK
295860
+  (0.1ms) BEGIN
295861
+ ------------------------------------------------------------------------------
295862
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295863
+ ------------------------------------------------------------------------------
295864
+  (0.1ms) ROLLBACK
295865
+  (0.1ms) BEGIN
295866
+ ---------------------------------------------------------------------------------------------
295867
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295868
+ ---------------------------------------------------------------------------------------------
295869
+  (0.0ms) ROLLBACK
295870
+  (0.0ms) BEGIN
295871
+ --------------------------------------------------------------------------------------
295872
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295873
+ --------------------------------------------------------------------------------------
295874
+  (0.0ms) ROLLBACK
295875
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
295876
+  (0.1ms) BEGIN
295877
+ ---------------------------------------------------------------------------------------------
295878
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295879
+ ---------------------------------------------------------------------------------------------
295880
+  (0.1ms) ROLLBACK
295881
+  (0.0ms) BEGIN
295882
+ -----------------------------------------------------------------------------------------
295883
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295884
+ -----------------------------------------------------------------------------------------
295885
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295886
+ FROM pg_constraint c
295887
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295888
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295889
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295890
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295891
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295892
+ WHERE c.contype = 'f'
295893
+ AND t1.relname = 'comments'
295894
+ AND t3.nspname = ANY (current_schemas(false))
295895
+ ORDER BY c.conname
295896
+ 
295897
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295898
+ FROM pg_constraint c
295899
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295900
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295901
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295902
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295903
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295904
+ WHERE c.contype = 'f'
295905
+ AND t1.relname = 'users'
295906
+ AND t3.nspname = ANY (current_schemas(false))
295907
+ ORDER BY c.conname
295908
+
295909
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295910
+ FROM pg_constraint c
295911
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295912
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295913
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295914
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295915
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295916
+ WHERE c.contype = 'f'
295917
+ AND t1.relname = 'users'
295918
+ AND t3.nspname = ANY (current_schemas(false))
295919
+ ORDER BY c.conname
295920
+ 
295921
+  (0.2ms) ROLLBACK
295922
+  (0.0ms) BEGIN
295923
+ --------------------------------------------------------------------------------------
295924
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295925
+ --------------------------------------------------------------------------------------
295926
+  (0.0ms) ROLLBACK
295927
+  (0.0ms) BEGIN
295928
+ ------------------------------------------------------------------------------
295929
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295930
+ ------------------------------------------------------------------------------
295931
+  (0.0ms) ROLLBACK
295932
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
295933
+  (0.1ms) BEGIN
295934
+ ------------------------------------------------------------------------------
295935
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
295936
+ ------------------------------------------------------------------------------
295937
+  (0.1ms) ROLLBACK
295938
+  (0.0ms) BEGIN
295939
+ ---------------------------------------------------------------------------------------------
295940
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295941
+ ---------------------------------------------------------------------------------------------
295942
+  (0.0ms) ROLLBACK
295943
+  (0.0ms) BEGIN
295944
+ -----------------------------------------------------------------------------------------
295945
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
295946
+ -----------------------------------------------------------------------------------------
295947
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295948
+ FROM pg_constraint c
295949
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295950
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295951
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295952
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295953
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295954
+ WHERE c.contype = 'f'
295955
+ AND t1.relname = 'comments'
295956
+ AND t3.nspname = ANY (current_schemas(false))
295957
+ ORDER BY c.conname
295958
+ 
295959
+  (1.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295960
+ FROM pg_constraint c
295961
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295962
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295963
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295964
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295965
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295966
+ WHERE c.contype = 'f'
295967
+ AND t1.relname = 'users'
295968
+ AND t3.nspname = ANY (current_schemas(false))
295969
+ ORDER BY c.conname
295970
+
295971
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
295972
+ FROM pg_constraint c
295973
+ JOIN pg_class t1 ON c.conrelid = t1.oid
295974
+ JOIN pg_class t2 ON c.confrelid = t2.oid
295975
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
295976
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
295977
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
295978
+ WHERE c.contype = 'f'
295979
+ AND t1.relname = 'users'
295980
+ AND t3.nspname = ANY (current_schemas(false))
295981
+ ORDER BY c.conname
295982
+ 
295983
+  (0.1ms) ROLLBACK
295984
+  (0.1ms) BEGIN
295985
+ --------------------------------------------------------------------------------------
295986
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295987
+ --------------------------------------------------------------------------------------
295988
+  (0.0ms) ROLLBACK
295989
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
295990
+  (0.1ms) BEGIN
295991
+ --------------------------------------------------------------------------------------
295992
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
295993
+ --------------------------------------------------------------------------------------
295994
+  (0.0ms) ROLLBACK
295995
+  (0.0ms) BEGIN
295996
+ ---------------------------------------------------------------------------------------------
295997
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
295998
+ ---------------------------------------------------------------------------------------------
295999
+  (0.0ms) ROLLBACK
296000
+  (0.0ms) BEGIN
296001
+ -----------------------------------------------------------------------------------------
296002
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
296003
+ -----------------------------------------------------------------------------------------
296004
+  (1.3ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
296005
+ FROM pg_constraint c
296006
+ JOIN pg_class t1 ON c.conrelid = t1.oid
296007
+ JOIN pg_class t2 ON c.confrelid = t2.oid
296008
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
296009
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
296010
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
296011
+ WHERE c.contype = 'f'
296012
+ AND t1.relname = 'comments'
296013
+ AND t3.nspname = ANY (current_schemas(false))
296014
+ ORDER BY c.conname
296015
+ 
296016
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
296017
+ FROM pg_constraint c
296018
+ JOIN pg_class t1 ON c.conrelid = t1.oid
296019
+ JOIN pg_class t2 ON c.confrelid = t2.oid
296020
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
296021
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
296022
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
296023
+ WHERE c.contype = 'f'
296024
+ AND t1.relname = 'users'
296025
+ AND t3.nspname = ANY (current_schemas(false))
296026
+ ORDER BY c.conname
296027
+
296028
+  (1.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
296029
+ FROM pg_constraint c
296030
+ JOIN pg_class t1 ON c.conrelid = t1.oid
296031
+ JOIN pg_class t2 ON c.confrelid = t2.oid
296032
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
296033
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
296034
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
296035
+ WHERE c.contype = 'f'
296036
+ AND t1.relname = 'users'
296037
+ AND t3.nspname = ANY (current_schemas(false))
296038
+ ORDER BY c.conname
296039
+ 
296040
+  (0.1ms) ROLLBACK
296041
+  (0.1ms) BEGIN
296042
+ ------------------------------------------------------------------------------
296043
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
296044
+ ------------------------------------------------------------------------------
296045
+  (0.1ms) ROLLBACK