active_record_doctor 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b34a82d16d09817af606ea87f37d3fd58ed4d90c
4
- data.tar.gz: 295e95a5bd798fb32fb601b323e534ce1f8d99a7
3
+ metadata.gz: b6e1c0cae1aa647256ff7eafb6a839e1b21efa82
4
+ data.tar.gz: 6ca222532fbd13abd9aba412c4dfa3ece725ec94
5
5
  SHA512:
6
- metadata.gz: 91e990085d0d24165b8ed2c2ffed14e012b903fad6d20239822fb737ba64b117956dc39222be5818cef6bec23ef765eeee8d5d9c37399a52296464a6a27af477
7
- data.tar.gz: dc076f6c5526717552dca94594d845cbfc105c19d305c38f1dba1442a0d48e5a28197efaabf4cb8d3be259ecf5e5822c337833aa097c899a4c15076866038d45
6
+ metadata.gz: 06e9c8db1abc13bdc3cadbf7c72b2d6f25d7fa8b87be116227dcb7a59aaf9475cb35f1cca9d5e679ffed123741d77424bf0a4a80e7a72c53c00a004a830f11c6
7
+ data.tar.gz: 0501fb31dd03bc30a9d51344f632fcec82e1ee4ceaa7e2e288360676b39c98978e7129a43c5e368098e1c7d16ea332dfcf863db5b2910bb37cb778326ff3f2b5
@@ -24,8 +24,9 @@ module ActiveRecordDoctor
24
24
  def undefined_table_references
25
25
  Rails.application.eager_load!
26
26
 
27
- ActiveRecord::Base.subclasses.reject do |model|
28
- model.connection.tables.include?(model.table_name)
27
+ ActiveRecord::Base.descendants.select do |model|
28
+ model.table_name.present? &&
29
+ !model.connection.tables.include?(model.table_name)
29
30
  end
30
31
  end
31
32
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordDoctor
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
@@ -0,0 +1,3 @@
1
+ class ApplicationRecord < ActiveRecord::Base
2
+ self.table_name = nil
3
+ end
@@ -1,3 +1,3 @@
1
- class Contract < ActiveRecord::Base
1
+ class Contract < ApplicationRecord
2
2
  self.table_name = 'contract_records'
3
3
  end
@@ -826,3 +826,895 @@ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
826
826
  ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
827
827
  --------------------------------------------------------------------------------------
828
828
   (0.0ms) ROLLBACK
829
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
830
+  (0.2ms) BEGIN
831
+ ---------------------------------------------------------------------------------------------
832
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
833
+ ---------------------------------------------------------------------------------------------
834
+  (0.0ms) ROLLBACK
835
+  (0.0ms) BEGIN
836
+ -----------------------------------------------------------------------------------------------------
837
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
838
+ -----------------------------------------------------------------------------------------------------
839
+  (0.0ms) ROLLBACK
840
+  (0.0ms) BEGIN
841
+ -----------------------------------------------------------------------------------------
842
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
843
+ -----------------------------------------------------------------------------------------
844
+  (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
845
+ FROM pg_constraint c
846
+ JOIN pg_class t1 ON c.conrelid = t1.oid
847
+ JOIN pg_class t2 ON c.confrelid = t2.oid
848
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
849
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
850
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
851
+ WHERE c.contype = 'f'
852
+ AND t1.relname = 'comments'
853
+ AND t3.nspname = ANY (current_schemas(false))
854
+ ORDER BY c.conname
855
+ 
856
+  (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
857
+ FROM pg_constraint c
858
+ JOIN pg_class t1 ON c.conrelid = t1.oid
859
+ JOIN pg_class t2 ON c.confrelid = t2.oid
860
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
861
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
862
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
863
+ WHERE c.contype = 'f'
864
+ AND t1.relname = 'users'
865
+ AND t3.nspname = ANY (current_schemas(false))
866
+ ORDER BY c.conname
867
+
868
+  (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
869
+ FROM pg_constraint c
870
+ JOIN pg_class t1 ON c.conrelid = t1.oid
871
+ JOIN pg_class t2 ON c.confrelid = t2.oid
872
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
873
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
874
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
875
+ WHERE c.contype = 'f'
876
+ AND t1.relname = 'users'
877
+ AND t3.nspname = ANY (current_schemas(false))
878
+ ORDER BY c.conname
879
+ 
880
+  (0.1ms) ROLLBACK
881
+  (0.1ms) BEGIN
882
+ --------------------------------------------------------------------------------------
883
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
884
+ --------------------------------------------------------------------------------------
885
+  (0.0ms) ROLLBACK
886
+  (0.0ms) BEGIN
887
+ ------------------------------------------------------------------------------
888
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
889
+ ------------------------------------------------------------------------------
890
+  (0.0ms) ROLLBACK
891
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
892
+  (0.2ms) BEGIN
893
+ -----------------------------------------------------------------------------------------
894
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
895
+ -----------------------------------------------------------------------------------------
896
+  (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
897
+ FROM pg_constraint c
898
+ JOIN pg_class t1 ON c.conrelid = t1.oid
899
+ JOIN pg_class t2 ON c.confrelid = t2.oid
900
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
901
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
902
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
903
+ WHERE c.contype = 'f'
904
+ AND t1.relname = 'comments'
905
+ AND t3.nspname = ANY (current_schemas(false))
906
+ ORDER BY c.conname
907
+ 
908
+  (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
909
+ FROM pg_constraint c
910
+ JOIN pg_class t1 ON c.conrelid = t1.oid
911
+ JOIN pg_class t2 ON c.confrelid = t2.oid
912
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
913
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
914
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
915
+ WHERE c.contype = 'f'
916
+ AND t1.relname = 'users'
917
+ AND t3.nspname = ANY (current_schemas(false))
918
+ ORDER BY c.conname
919
+
920
+  (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
921
+ FROM pg_constraint c
922
+ JOIN pg_class t1 ON c.conrelid = t1.oid
923
+ JOIN pg_class t2 ON c.confrelid = t2.oid
924
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
925
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
926
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
927
+ WHERE c.contype = 'f'
928
+ AND t1.relname = 'users'
929
+ AND t3.nspname = ANY (current_schemas(false))
930
+ ORDER BY c.conname
931
+ 
932
+  (0.1ms) ROLLBACK
933
+  (0.1ms) BEGIN
934
+ --------------------------------------------------------------------------------------
935
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
936
+ --------------------------------------------------------------------------------------
937
+  (0.0ms) ROLLBACK
938
+  (0.0ms) BEGIN
939
+ ------------------------------------------------------------------------------
940
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
941
+ ------------------------------------------------------------------------------
942
+  (0.0ms) ROLLBACK
943
+  (0.0ms) BEGIN
944
+ ---------------------------------------------------------------------------------------------
945
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
946
+ ---------------------------------------------------------------------------------------------
947
+  (0.0ms) ROLLBACK
948
+  (0.0ms) BEGIN
949
+ -----------------------------------------------------------------------------------------------------
950
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
951
+ -----------------------------------------------------------------------------------------------------
952
+  (0.1ms) ROLLBACK
953
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
954
+  (0.1ms) BEGIN
955
+ ---------------------------------------------------------------------------------------------
956
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
957
+ ---------------------------------------------------------------------------------------------
958
+  (0.0ms) ROLLBACK
959
+  (0.0ms) BEGIN
960
+ -----------------------------------------------------------------------------------------
961
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
962
+ -----------------------------------------------------------------------------------------
963
+  (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
964
+ FROM pg_constraint c
965
+ JOIN pg_class t1 ON c.conrelid = t1.oid
966
+ JOIN pg_class t2 ON c.confrelid = t2.oid
967
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
968
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
969
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
970
+ WHERE c.contype = 'f'
971
+ AND t1.relname = 'comments'
972
+ AND t3.nspname = ANY (current_schemas(false))
973
+ ORDER BY c.conname
974
+ 
975
+  (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
976
+ FROM pg_constraint c
977
+ JOIN pg_class t1 ON c.conrelid = t1.oid
978
+ JOIN pg_class t2 ON c.confrelid = t2.oid
979
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
980
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
981
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
982
+ WHERE c.contype = 'f'
983
+ AND t1.relname = 'users'
984
+ AND t3.nspname = ANY (current_schemas(false))
985
+ ORDER BY c.conname
986
+
987
+  (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
988
+ FROM pg_constraint c
989
+ JOIN pg_class t1 ON c.conrelid = t1.oid
990
+ JOIN pg_class t2 ON c.confrelid = t2.oid
991
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
992
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
993
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
994
+ WHERE c.contype = 'f'
995
+ AND t1.relname = 'users'
996
+ AND t3.nspname = ANY (current_schemas(false))
997
+ ORDER BY c.conname
998
+ 
999
+  (0.1ms) ROLLBACK
1000
+  (0.1ms) BEGIN
1001
+ ------------------------------------------------------------------------------
1002
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1003
+ ------------------------------------------------------------------------------
1004
+  (0.1ms) ROLLBACK
1005
+  (0.0ms) BEGIN
1006
+ --------------------------------------------------------------------------------------
1007
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1008
+ --------------------------------------------------------------------------------------
1009
+  (0.0ms) ROLLBACK
1010
+  (0.0ms) BEGIN
1011
+ -----------------------------------------------------------------------------------------------------
1012
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1013
+ -----------------------------------------------------------------------------------------------------
1014
+  (0.1ms) ROLLBACK
1015
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1016
+  (0.1ms) BEGIN
1017
+ -----------------------------------------------------------------------------------------
1018
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1019
+ -----------------------------------------------------------------------------------------
1020
+  (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
1021
+ FROM pg_constraint c
1022
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1023
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1024
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1025
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1026
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1027
+ WHERE c.contype = 'f'
1028
+ AND t1.relname = 'comments'
1029
+ AND t3.nspname = ANY (current_schemas(false))
1030
+ ORDER BY c.conname
1031
+ 
1032
+  (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
1033
+ FROM pg_constraint c
1034
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1035
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1036
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1037
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1038
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1039
+ WHERE c.contype = 'f'
1040
+ AND t1.relname = 'users'
1041
+ AND t3.nspname = ANY (current_schemas(false))
1042
+ ORDER BY c.conname
1043
+
1044
+  (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
1045
+ FROM pg_constraint c
1046
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1047
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1048
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1049
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1050
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1051
+ WHERE c.contype = 'f'
1052
+ AND t1.relname = 'users'
1053
+ AND t3.nspname = ANY (current_schemas(false))
1054
+ ORDER BY c.conname
1055
+ 
1056
+  (0.1ms) ROLLBACK
1057
+  (0.1ms) BEGIN
1058
+ -----------------------------------------------------------------------------------------------------
1059
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1060
+ -----------------------------------------------------------------------------------------------------
1061
+  (0.1ms) ROLLBACK
1062
+  (0.1ms) BEGIN
1063
+ --------------------------------------------------------------------------------------
1064
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1065
+ --------------------------------------------------------------------------------------
1066
+  (0.0ms) ROLLBACK
1067
+  (0.0ms) BEGIN
1068
+ ---------------------------------------------------------------------------------------------
1069
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1070
+ ---------------------------------------------------------------------------------------------
1071
+  (0.0ms) ROLLBACK
1072
+  (0.0ms) BEGIN
1073
+ ------------------------------------------------------------------------------
1074
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1075
+ ------------------------------------------------------------------------------
1076
+  (0.0ms) ROLLBACK
1077
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1078
+  (0.1ms) BEGIN
1079
+ --------------------------------------------------------------------------------------
1080
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1081
+ --------------------------------------------------------------------------------------
1082
+  (0.0ms) ROLLBACK
1083
+  (0.0ms) BEGIN
1084
+ ---------------------------------------------------------------------------------------------
1085
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1086
+ ---------------------------------------------------------------------------------------------
1087
+  (0.0ms) ROLLBACK
1088
+  (0.0ms) BEGIN
1089
+ -----------------------------------------------------------------------------------------------------
1090
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1091
+ -----------------------------------------------------------------------------------------------------
1092
+  (0.1ms) ROLLBACK
1093
+  (0.0ms) BEGIN
1094
+ -----------------------------------------------------------------------------------------
1095
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1096
+ -----------------------------------------------------------------------------------------
1097
+  (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
1098
+ FROM pg_constraint c
1099
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1100
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1101
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1102
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1103
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1104
+ WHERE c.contype = 'f'
1105
+ AND t1.relname = 'comments'
1106
+ AND t3.nspname = ANY (current_schemas(false))
1107
+ ORDER BY c.conname
1108
+ 
1109
+  (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
1110
+ FROM pg_constraint c
1111
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1112
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1113
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1114
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1115
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1116
+ WHERE c.contype = 'f'
1117
+ AND t1.relname = 'users'
1118
+ AND t3.nspname = ANY (current_schemas(false))
1119
+ ORDER BY c.conname
1120
+
1121
+  (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
1122
+ FROM pg_constraint c
1123
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1124
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1125
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1126
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1127
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1128
+ WHERE c.contype = 'f'
1129
+ AND t1.relname = 'users'
1130
+ AND t3.nspname = ANY (current_schemas(false))
1131
+ ORDER BY c.conname
1132
+ 
1133
+  (0.1ms) ROLLBACK
1134
+  (0.0ms) BEGIN
1135
+ ------------------------------------------------------------------------------
1136
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1137
+ ------------------------------------------------------------------------------
1138
+  (0.1ms) ROLLBACK
1139
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1140
+  (0.1ms) BEGIN
1141
+ -----------------------------------------------------------------------------------------
1142
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1143
+ -----------------------------------------------------------------------------------------
1144
+  (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
1145
+ FROM pg_constraint c
1146
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1147
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1148
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1149
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1150
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1151
+ WHERE c.contype = 'f'
1152
+ AND t1.relname = 'comments'
1153
+ AND t3.nspname = ANY (current_schemas(false))
1154
+ ORDER BY c.conname
1155
+ 
1156
+  (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
1157
+ FROM pg_constraint c
1158
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1159
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1160
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1161
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1162
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1163
+ WHERE c.contype = 'f'
1164
+ AND t1.relname = 'users'
1165
+ AND t3.nspname = ANY (current_schemas(false))
1166
+ ORDER BY c.conname
1167
+
1168
+  (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
1169
+ FROM pg_constraint c
1170
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1171
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1172
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1173
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1174
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1175
+ WHERE c.contype = 'f'
1176
+ AND t1.relname = 'users'
1177
+ AND t3.nspname = ANY (current_schemas(false))
1178
+ ORDER BY c.conname
1179
+ 
1180
+  (0.1ms) ROLLBACK
1181
+  (0.1ms) BEGIN
1182
+ ------------------------------------------------------------------------------
1183
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1184
+ ------------------------------------------------------------------------------
1185
+  (0.1ms) ROLLBACK
1186
+  (0.1ms) BEGIN
1187
+ ---------------------------------------------------------------------------------------------
1188
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1189
+ ---------------------------------------------------------------------------------------------
1190
+  (0.0ms) ROLLBACK
1191
+  (0.0ms) BEGIN
1192
+ --------------------------------------------------------------------------------------
1193
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1194
+ --------------------------------------------------------------------------------------
1195
+  (0.0ms) ROLLBACK
1196
+  (0.0ms) BEGIN
1197
+ -----------------------------------------------------------------------------------------------------
1198
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1199
+ -----------------------------------------------------------------------------------------------------
1200
+  (0.0ms) ROLLBACK
1201
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1202
+  (0.2ms) BEGIN
1203
+ ---------------------------------------------------------------------------------------------
1204
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1205
+ ---------------------------------------------------------------------------------------------
1206
+  (0.0ms) ROLLBACK
1207
+  (0.0ms) BEGIN
1208
+ -----------------------------------------------------------------------------------------------------
1209
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1210
+ -----------------------------------------------------------------------------------------------------
1211
+  (0.1ms) ROLLBACK
1212
+  (0.0ms) BEGIN
1213
+ -----------------------------------------------------------------------------------------
1214
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1215
+ -----------------------------------------------------------------------------------------
1216
+  (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
1217
+ FROM pg_constraint c
1218
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1219
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1220
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1221
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1222
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1223
+ WHERE c.contype = 'f'
1224
+ AND t1.relname = 'comments'
1225
+ AND t3.nspname = ANY (current_schemas(false))
1226
+ ORDER BY c.conname
1227
+ 
1228
+  (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
1229
+ FROM pg_constraint c
1230
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1231
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1232
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1233
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1234
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1235
+ WHERE c.contype = 'f'
1236
+ AND t1.relname = 'users'
1237
+ AND t3.nspname = ANY (current_schemas(false))
1238
+ ORDER BY c.conname
1239
+
1240
+  (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
1241
+ FROM pg_constraint c
1242
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1243
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1244
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1245
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1246
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1247
+ WHERE c.contype = 'f'
1248
+ AND t1.relname = 'users'
1249
+ AND t3.nspname = ANY (current_schemas(false))
1250
+ ORDER BY c.conname
1251
+ 
1252
+  (0.1ms) ROLLBACK
1253
+  (0.1ms) BEGIN
1254
+ ------------------------------------------------------------------------------
1255
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1256
+ ------------------------------------------------------------------------------
1257
+  (0.2ms) ROLLBACK
1258
+  (0.1ms) BEGIN
1259
+ --------------------------------------------------------------------------------------
1260
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1261
+ --------------------------------------------------------------------------------------
1262
+  (0.0ms) ROLLBACK
1263
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1264
+  (0.1ms) BEGIN
1265
+ -----------------------------------------------------------------------------------------
1266
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1267
+ -----------------------------------------------------------------------------------------
1268
+  (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
1269
+ FROM pg_constraint c
1270
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1271
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1272
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1273
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1274
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1275
+ WHERE c.contype = 'f'
1276
+ AND t1.relname = 'comments'
1277
+ AND t3.nspname = ANY (current_schemas(false))
1278
+ ORDER BY c.conname
1279
+ 
1280
+  (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
1281
+ FROM pg_constraint c
1282
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1283
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1284
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1285
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1286
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1287
+ WHERE c.contype = 'f'
1288
+ AND t1.relname = 'users'
1289
+ AND t3.nspname = ANY (current_schemas(false))
1290
+ ORDER BY c.conname
1291
+
1292
+  (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
1293
+ FROM pg_constraint c
1294
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1295
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1296
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1297
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1298
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1299
+ WHERE c.contype = 'f'
1300
+ AND t1.relname = 'users'
1301
+ AND t3.nspname = ANY (current_schemas(false))
1302
+ ORDER BY c.conname
1303
+ 
1304
+  (0.1ms) ROLLBACK
1305
+  (0.1ms) BEGIN
1306
+ ------------------------------------------------------------------------------
1307
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1308
+ ------------------------------------------------------------------------------
1309
+  (0.1ms) ROLLBACK
1310
+  (0.1ms) BEGIN
1311
+ ---------------------------------------------------------------------------------------------
1312
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1313
+ ---------------------------------------------------------------------------------------------
1314
+  (0.0ms) ROLLBACK
1315
+  (0.0ms) BEGIN
1316
+ --------------------------------------------------------------------------------------
1317
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1318
+ --------------------------------------------------------------------------------------
1319
+  (0.0ms) ROLLBACK
1320
+  (0.0ms) BEGIN
1321
+ -----------------------------------------------------------------------------------------------------
1322
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1323
+ -----------------------------------------------------------------------------------------------------
1324
+  (0.0ms) ROLLBACK
1325
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1326
+  (0.1ms) BEGIN
1327
+ -----------------------------------------------------------------------------------------------------
1328
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1329
+ -----------------------------------------------------------------------------------------------------
1330
+  (0.1ms) ROLLBACK
1331
+  (0.0ms) BEGIN
1332
+ ---------------------------------------------------------------------------------------------
1333
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1334
+ ---------------------------------------------------------------------------------------------
1335
+  (0.0ms) ROLLBACK
1336
+  (0.0ms) BEGIN
1337
+ -----------------------------------------------------------------------------------------
1338
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1339
+ -----------------------------------------------------------------------------------------
1340
+  (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
1341
+ FROM pg_constraint c
1342
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1343
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1344
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1345
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1346
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1347
+ WHERE c.contype = 'f'
1348
+ AND t1.relname = 'comments'
1349
+ AND t3.nspname = ANY (current_schemas(false))
1350
+ ORDER BY c.conname
1351
+ 
1352
+  (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
1353
+ FROM pg_constraint c
1354
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1355
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1356
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1357
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1358
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1359
+ WHERE c.contype = 'f'
1360
+ AND t1.relname = 'users'
1361
+ AND t3.nspname = ANY (current_schemas(false))
1362
+ ORDER BY c.conname
1363
+
1364
+  (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
1365
+ FROM pg_constraint c
1366
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1367
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1368
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1369
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1370
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1371
+ WHERE c.contype = 'f'
1372
+ AND t1.relname = 'users'
1373
+ AND t3.nspname = ANY (current_schemas(false))
1374
+ ORDER BY c.conname
1375
+ 
1376
+  (0.1ms) ROLLBACK
1377
+  (0.1ms) BEGIN
1378
+ --------------------------------------------------------------------------------------
1379
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1380
+ --------------------------------------------------------------------------------------
1381
+  (0.0ms) ROLLBACK
1382
+  (0.0ms) BEGIN
1383
+ ------------------------------------------------------------------------------
1384
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1385
+ ------------------------------------------------------------------------------
1386
+  (0.0ms) ROLLBACK
1387
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1388
+  (0.1ms) BEGIN
1389
+ -----------------------------------------------------------------------------------------------------
1390
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1391
+ -----------------------------------------------------------------------------------------------------
1392
+  (0.1ms) ROLLBACK
1393
+  (0.0ms) BEGIN
1394
+ ---------------------------------------------------------------------------------------------
1395
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1396
+ ---------------------------------------------------------------------------------------------
1397
+  (0.1ms) ROLLBACK
1398
+  (0.0ms) BEGIN
1399
+ -----------------------------------------------------------------------------------------
1400
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1401
+ -----------------------------------------------------------------------------------------
1402
+  (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
1403
+ FROM pg_constraint c
1404
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1405
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1406
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1407
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1408
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1409
+ WHERE c.contype = 'f'
1410
+ AND t1.relname = 'comments'
1411
+ AND t3.nspname = ANY (current_schemas(false))
1412
+ ORDER BY c.conname
1413
+ 
1414
+  (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
1415
+ FROM pg_constraint c
1416
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1417
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1418
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1419
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1420
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1421
+ WHERE c.contype = 'f'
1422
+ AND t1.relname = 'users'
1423
+ AND t3.nspname = ANY (current_schemas(false))
1424
+ ORDER BY c.conname
1425
+
1426
+  (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
1427
+ FROM pg_constraint c
1428
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1429
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1430
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1431
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1432
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1433
+ WHERE c.contype = 'f'
1434
+ AND t1.relname = 'users'
1435
+ AND t3.nspname = ANY (current_schemas(false))
1436
+ ORDER BY c.conname
1437
+ 
1438
+  (0.1ms) ROLLBACK
1439
+  (0.0ms) BEGIN
1440
+ ------------------------------------------------------------------------------
1441
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1442
+ ------------------------------------------------------------------------------
1443
+  (0.0ms) ROLLBACK
1444
+  (0.1ms) BEGIN
1445
+ --------------------------------------------------------------------------------------
1446
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1447
+ --------------------------------------------------------------------------------------
1448
+  (0.0ms) ROLLBACK
1449
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1450
+  (0.2ms) BEGIN
1451
+ -----------------------------------------------------------------------------------------
1452
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1453
+ -----------------------------------------------------------------------------------------
1454
+  (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
1455
+ FROM pg_constraint c
1456
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1457
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1458
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1459
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1460
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1461
+ WHERE c.contype = 'f'
1462
+ AND t1.relname = 'comments'
1463
+ AND t3.nspname = ANY (current_schemas(false))
1464
+ ORDER BY c.conname
1465
+ 
1466
+  (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
1467
+ FROM pg_constraint c
1468
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1469
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1470
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1471
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1472
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1473
+ WHERE c.contype = 'f'
1474
+ AND t1.relname = 'users'
1475
+ AND t3.nspname = ANY (current_schemas(false))
1476
+ ORDER BY c.conname
1477
+
1478
+  (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
1479
+ FROM pg_constraint c
1480
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1481
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1482
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1483
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1484
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1485
+ WHERE c.contype = 'f'
1486
+ AND t1.relname = 'users'
1487
+ AND t3.nspname = ANY (current_schemas(false))
1488
+ ORDER BY c.conname
1489
+ 
1490
+  (0.1ms) ROLLBACK
1491
+  (0.1ms) BEGIN
1492
+ --------------------------------------------------------------------------------------
1493
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1494
+ --------------------------------------------------------------------------------------
1495
+  (0.0ms) ROLLBACK
1496
+  (0.0ms) BEGIN
1497
+ ------------------------------------------------------------------------------
1498
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1499
+ ------------------------------------------------------------------------------
1500
+  (0.0ms) ROLLBACK
1501
+  (0.0ms) BEGIN
1502
+ ---------------------------------------------------------------------------------------------
1503
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1504
+ ---------------------------------------------------------------------------------------------
1505
+  (0.0ms) ROLLBACK
1506
+  (0.0ms) BEGIN
1507
+ -----------------------------------------------------------------------------------------------------
1508
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1509
+ -----------------------------------------------------------------------------------------------------
1510
+  (0.1ms) ROLLBACK
1511
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1512
+  (0.1ms) BEGIN
1513
+ -----------------------------------------------------------------------------------------------------
1514
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1515
+ -----------------------------------------------------------------------------------------------------
1516
+  (0.1ms) ROLLBACK
1517
+  (0.0ms) BEGIN
1518
+ -----------------------------------------------------------------------------------------
1519
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1520
+ -----------------------------------------------------------------------------------------
1521
+  (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
1522
+ FROM pg_constraint c
1523
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1524
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1525
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1526
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1527
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1528
+ WHERE c.contype = 'f'
1529
+ AND t1.relname = 'comments'
1530
+ AND t3.nspname = ANY (current_schemas(false))
1531
+ ORDER BY c.conname
1532
+ 
1533
+  (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
1534
+ FROM pg_constraint c
1535
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1536
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1537
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1538
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1539
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1540
+ WHERE c.contype = 'f'
1541
+ AND t1.relname = 'users'
1542
+ AND t3.nspname = ANY (current_schemas(false))
1543
+ ORDER BY c.conname
1544
+
1545
+  (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
1546
+ FROM pg_constraint c
1547
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1548
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1549
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1550
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1551
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1552
+ WHERE c.contype = 'f'
1553
+ AND t1.relname = 'users'
1554
+ AND t3.nspname = ANY (current_schemas(false))
1555
+ ORDER BY c.conname
1556
+ 
1557
+  (0.1ms) ROLLBACK
1558
+  (0.1ms) BEGIN
1559
+ --------------------------------------------------------------------------------------
1560
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1561
+ --------------------------------------------------------------------------------------
1562
+  (0.0ms) ROLLBACK
1563
+  (0.0ms) BEGIN
1564
+ ---------------------------------------------------------------------------------------------
1565
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1566
+ ---------------------------------------------------------------------------------------------
1567
+  (0.0ms) ROLLBACK
1568
+  (0.0ms) BEGIN
1569
+ ------------------------------------------------------------------------------
1570
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1571
+ ------------------------------------------------------------------------------
1572
+  (0.0ms) ROLLBACK
1573
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1574
+  (0.1ms) BEGIN
1575
+ ---------------------------------------------------------------------------------------------
1576
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1577
+ ---------------------------------------------------------------------------------------------
1578
+  (0.0ms) ROLLBACK
1579
+  (0.0ms) BEGIN
1580
+ --------------------------------------------------------------------------------------
1581
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1582
+ --------------------------------------------------------------------------------------
1583
+  (0.0ms) ROLLBACK
1584
+  (0.0ms) BEGIN
1585
+ ------------------------------------------------------------------------------
1586
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1587
+ ------------------------------------------------------------------------------
1588
+  (0.0ms) ROLLBACK
1589
+  (0.0ms) BEGIN
1590
+ -----------------------------------------------------------------------------------------
1591
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1592
+ -----------------------------------------------------------------------------------------
1593
+  (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
1594
+ FROM pg_constraint c
1595
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1596
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1597
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1598
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1599
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1600
+ WHERE c.contype = 'f'
1601
+ AND t1.relname = 'comments'
1602
+ AND t3.nspname = ANY (current_schemas(false))
1603
+ ORDER BY c.conname
1604
+ 
1605
+  (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
1606
+ FROM pg_constraint c
1607
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1608
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1609
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1610
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1611
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1612
+ WHERE c.contype = 'f'
1613
+ AND t1.relname = 'users'
1614
+ AND t3.nspname = ANY (current_schemas(false))
1615
+ ORDER BY c.conname
1616
+
1617
+  (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
1618
+ FROM pg_constraint c
1619
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1620
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1621
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1622
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1623
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1624
+ WHERE c.contype = 'f'
1625
+ AND t1.relname = 'users'
1626
+ AND t3.nspname = ANY (current_schemas(false))
1627
+ ORDER BY c.conname
1628
+ 
1629
+  (0.1ms) ROLLBACK
1630
+  (0.1ms) BEGIN
1631
+ -----------------------------------------------------------------------------------------------------
1632
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1633
+ -----------------------------------------------------------------------------------------------------
1634
+  (0.1ms) ROLLBACK
1635
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1636
+  (0.1ms) BEGIN
1637
+ -----------------------------------------------------------------------------------------------------
1638
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1639
+ -----------------------------------------------------------------------------------------------------
1640
+  (0.1ms) ROLLBACK
1641
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1642
+  (0.2ms) BEGIN
1643
+ -----------------------------------------------------------------------------------------------------
1644
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1645
+ -----------------------------------------------------------------------------------------------------
1646
+  (0.1ms) ROLLBACK
1647
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1648
+  (0.2ms) BEGIN
1649
+ -----------------------------------------------------------------------------------------------------
1650
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1651
+ -----------------------------------------------------------------------------------------------------
1652
+  (0.1ms) ROLLBACK
1653
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1654
+  (0.2ms) BEGIN
1655
+ -----------------------------------------------------------------------------------------------------
1656
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1657
+ -----------------------------------------------------------------------------------------------------
1658
+  (0.0ms) ROLLBACK
1659
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1660
+  (0.2ms) BEGIN
1661
+ -----------------------------------------------------------------------------------------------------
1662
+ ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1663
+ -----------------------------------------------------------------------------------------------------
1664
+  (0.0ms) ROLLBACK
1665
+  (0.0ms) BEGIN
1666
+ -----------------------------------------------------------------------------------------
1667
+ ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1668
+ -----------------------------------------------------------------------------------------
1669
+  (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
1670
+ FROM pg_constraint c
1671
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1672
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1673
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1674
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1675
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1676
+ WHERE c.contype = 'f'
1677
+ AND t1.relname = 'comments'
1678
+ AND t3.nspname = ANY (current_schemas(false))
1679
+ ORDER BY c.conname
1680
+ 
1681
+  (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
1682
+ FROM pg_constraint c
1683
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1684
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1685
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1686
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1687
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1688
+ WHERE c.contype = 'f'
1689
+ AND t1.relname = 'users'
1690
+ AND t3.nspname = ANY (current_schemas(false))
1691
+ ORDER BY c.conname
1692
+
1693
+  (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
1694
+ FROM pg_constraint c
1695
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1696
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1697
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1698
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1699
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1700
+ WHERE c.contype = 'f'
1701
+ AND t1.relname = 'users'
1702
+ AND t3.nspname = ANY (current_schemas(false))
1703
+ ORDER BY c.conname
1704
+ 
1705
+  (0.1ms) ROLLBACK
1706
+  (0.1ms) BEGIN
1707
+ ------------------------------------------------------------------------------
1708
+ ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1709
+ ------------------------------------------------------------------------------
1710
+  (0.1ms) ROLLBACK
1711
+  (0.0ms) BEGIN
1712
+ --------------------------------------------------------------------------------------
1713
+ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1714
+ --------------------------------------------------------------------------------------
1715
+  (0.0ms) ROLLBACK
1716
+  (0.0ms) BEGIN
1717
+ ---------------------------------------------------------------------------------------------
1718
+ ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1719
+ ---------------------------------------------------------------------------------------------
1720
+  (0.0ms) ROLLBACK
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_doctor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Navis
@@ -101,6 +101,7 @@ files:
101
101
  - test/dummy/app/assets/stylesheets/application.css
102
102
  - test/dummy/app/controllers/application_controller.rb
103
103
  - test/dummy/app/helpers/application_helper.rb
104
+ - test/dummy/app/models/application_record.rb
104
105
  - test/dummy/app/models/comment.rb
105
106
  - test/dummy/app/models/contract.rb
106
107
  - test/dummy/app/models/employer.rb
@@ -193,6 +194,7 @@ test_files:
193
194
  - test/dummy/app/models/contract.rb
194
195
  - test/dummy/app/models/employer.rb
195
196
  - test/dummy/app/models/user.rb
197
+ - test/dummy/app/models/application_record.rb
196
198
  - test/dummy/db/schema.rb
197
199
  - test/dummy/db/migrate/20160213101213_create_employers.rb
198
200
  - test/dummy/db/migrate/20160604081452_create_comments.rb