active_record_doctor 1.5.0 → 1.8.0

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.
Files changed (99) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +152 -12
  3. data/lib/active_record_doctor.rb +20 -2
  4. data/lib/active_record_doctor/detectors.rb +13 -0
  5. data/lib/active_record_doctor/detectors/base.rb +64 -0
  6. data/lib/active_record_doctor/{tasks → detectors}/extraneous_indexes.rb +12 -29
  7. data/lib/active_record_doctor/detectors/incorrect_boolean_presence_validation.rb +40 -0
  8. data/lib/active_record_doctor/detectors/incorrect_dependent_option.rb +71 -0
  9. data/lib/active_record_doctor/{tasks → detectors}/missing_foreign_keys.rb +17 -35
  10. data/lib/active_record_doctor/detectors/missing_non_null_constraint.rb +60 -0
  11. data/lib/active_record_doctor/detectors/missing_presence_validation.rb +78 -0
  12. data/lib/active_record_doctor/detectors/missing_unique_indexes.rb +61 -0
  13. data/lib/active_record_doctor/detectors/undefined_table_references.rb +34 -0
  14. data/lib/active_record_doctor/detectors/unindexed_deleted_at.rb +29 -0
  15. data/lib/active_record_doctor/detectors/unindexed_foreign_keys.rb +48 -0
  16. data/lib/active_record_doctor/printers.rb +3 -1
  17. data/lib/active_record_doctor/printers/io_printer.rb +101 -26
  18. data/lib/active_record_doctor/railtie.rb +3 -1
  19. data/lib/active_record_doctor/task.rb +28 -0
  20. data/lib/active_record_doctor/version.rb +3 -1
  21. data/lib/generators/active_record_doctor/add_indexes/add_indexes_generator.rb +15 -11
  22. data/lib/tasks/active_record_doctor.rake +33 -0
  23. data/test/active_record_doctor/detectors/extraneous_indexes_test.rb +67 -0
  24. data/test/active_record_doctor/detectors/incorrect_boolean_presence_validation_test.rb +36 -0
  25. data/test/active_record_doctor/detectors/incorrect_dependent_option_test.rb +117 -0
  26. data/test/active_record_doctor/detectors/missing_foreign_keys_test.rb +24 -0
  27. data/test/active_record_doctor/detectors/missing_non_null_constraint_test.rb +102 -0
  28. data/test/active_record_doctor/detectors/missing_presence_validation_test.rb +107 -0
  29. data/test/active_record_doctor/detectors/missing_unique_indexes_test.rb +114 -0
  30. data/test/active_record_doctor/detectors/undefined_table_references_test.rb +44 -0
  31. data/test/active_record_doctor/detectors/unindexed_deleted_at_test.rb +67 -0
  32. data/test/active_record_doctor/detectors/unindexed_foreign_keys_test.rb +26 -0
  33. data/test/active_record_doctor/printers/io_printer_test.rb +23 -10
  34. data/test/model_factory.rb +78 -0
  35. data/test/setup.rb +126 -0
  36. metadata +93 -149
  37. data/Rakefile +0 -28
  38. data/lib/active_record_doctor/compatibility.rb +0 -11
  39. data/lib/active_record_doctor/tasks.rb +0 -4
  40. data/lib/active_record_doctor/tasks/undefined_table_references.rb +0 -34
  41. data/lib/active_record_doctor/tasks/unindexed_deleted_at.rb +0 -40
  42. data/lib/active_record_doctor/tasks/unindexed_foreign_keys.rb +0 -66
  43. data/lib/tasks/active_record_doctor_tasks.rake +0 -27
  44. data/test/active_record_doctor/tasks/extraneous_indexes_test.rb +0 -27
  45. data/test/active_record_doctor/tasks/missing_foreign_keys_test.rb +0 -19
  46. data/test/active_record_doctor/tasks/undefined_table_references_test.rb +0 -19
  47. data/test/active_record_doctor/tasks/unindexed_deleted_at_test.rb +0 -19
  48. data/test/active_record_doctor/tasks/unindexed_foreign_keys_test.rb +0 -19
  49. data/test/dummy/README.rdoc +0 -28
  50. data/test/dummy/Rakefile +0 -6
  51. data/test/dummy/app/assets/javascripts/application.js +0 -13
  52. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  53. data/test/dummy/app/controllers/application_controller.rb +0 -5
  54. data/test/dummy/app/helpers/application_helper.rb +0 -2
  55. data/test/dummy/app/models/application_record.rb +0 -3
  56. data/test/dummy/app/models/comment.rb +0 -3
  57. data/test/dummy/app/models/contract.rb +0 -3
  58. data/test/dummy/app/models/employer.rb +0 -2
  59. data/test/dummy/app/models/profile.rb +0 -2
  60. data/test/dummy/app/models/user.rb +0 -3
  61. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  62. data/test/dummy/bin/bundle +0 -3
  63. data/test/dummy/bin/rails +0 -4
  64. data/test/dummy/bin/rake +0 -4
  65. data/test/dummy/bin/setup +0 -29
  66. data/test/dummy/config.ru +0 -4
  67. data/test/dummy/config/application.rb +0 -23
  68. data/test/dummy/config/boot.rb +0 -5
  69. data/test/dummy/config/database.yml +0 -19
  70. data/test/dummy/config/database.yml.travis +0 -5
  71. data/test/dummy/config/environment.rb +0 -5
  72. data/test/dummy/config/environments/development.rb +0 -41
  73. data/test/dummy/config/environments/production.rb +0 -79
  74. data/test/dummy/config/environments/test.rb +0 -47
  75. data/test/dummy/config/initializers/assets.rb +0 -11
  76. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  77. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  78. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  79. data/test/dummy/config/initializers/inflections.rb +0 -16
  80. data/test/dummy/config/initializers/mime_types.rb +0 -4
  81. data/test/dummy/config/initializers/session_store.rb +0 -3
  82. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  83. data/test/dummy/config/locales/en.yml +0 -23
  84. data/test/dummy/config/routes.rb +0 -56
  85. data/test/dummy/config/secrets.yml +0 -22
  86. data/test/dummy/db/migrate/20160213101213_create_employers.rb +0 -15
  87. data/test/dummy/db/migrate/20160213101221_create_users.rb +0 -23
  88. data/test/dummy/db/migrate/20160213101232_create_profiles.rb +0 -15
  89. data/test/dummy/db/migrate/20160604081452_create_comments.rb +0 -11
  90. data/test/dummy/db/migrate/base_migration.rb +0 -5
  91. data/test/dummy/db/schema.rb +0 -68
  92. data/test/dummy/log/development.log +0 -532
  93. data/test/dummy/log/test.log +0 -2699
  94. data/test/dummy/public/404.html +0 -67
  95. data/test/dummy/public/422.html +0 -67
  96. data/test/dummy/public/500.html +0 -66
  97. data/test/dummy/public/favicon.ico +0 -0
  98. data/test/support/spy_printer.rb +0 -52
  99. data/test/test_helper.rb +0 -20
@@ -1,2699 +0,0 @@
1
-  (512.4ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
2
-  (586.4ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
3
- SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
4
-  (38.3ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
5
-  (23.9ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
6
-  (41.3ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
7
-  (17.8ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
8
-  (38.5ms) 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)
9
-  (44.2ms) 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) 
10
-  (31.1ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
11
-  (12.2ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
12
-  (17.5ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
13
-  (32.8ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
14
-  (20.9ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
15
-  (16.0ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
16
-  (17.5ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
17
-  (8.7ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
18
- FOREIGN KEY ("employer_id")
19
- REFERENCES "employers" ("id")
20
- 
21
-  (18.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
22
-  (34.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
23
-  (0.3ms) SELECT version FROM "schema_migrations"
24
-  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
25
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
26
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
27
-  (7.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
28
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
29
-  (0.1ms) BEGIN
30
- --------------------------------------------------------------------------------------
31
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
32
- --------------------------------------------------------------------------------------
33
-  (0.0ms) ROLLBACK
34
-  (0.0ms) BEGIN
35
- -----------------------------------------------------------------------------------------
36
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
37
- -----------------------------------------------------------------------------------------
38
-  (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
39
- FROM pg_constraint c
40
- JOIN pg_class t1 ON c.conrelid = t1.oid
41
- JOIN pg_class t2 ON c.confrelid = t2.oid
42
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
43
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
44
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
45
- WHERE c.contype = 'f'
46
- AND t1.relname = 'comments'
47
- AND t3.nspname = ANY (current_schemas(false))
48
- ORDER BY c.conname
49
- 
50
-  (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
51
- FROM pg_constraint c
52
- JOIN pg_class t1 ON c.conrelid = t1.oid
53
- JOIN pg_class t2 ON c.confrelid = t2.oid
54
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
55
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
56
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
57
- WHERE c.contype = 'f'
58
- AND t1.relname = 'users'
59
- AND t3.nspname = ANY (current_schemas(false))
60
- ORDER BY c.conname
61
-
62
-  (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
63
- FROM pg_constraint c
64
- JOIN pg_class t1 ON c.conrelid = t1.oid
65
- JOIN pg_class t2 ON c.confrelid = t2.oid
66
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
67
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
68
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
69
- WHERE c.contype = 'f'
70
- AND t1.relname = 'users'
71
- AND t3.nspname = ANY (current_schemas(false))
72
- ORDER BY c.conname
73
- 
74
-  (0.1ms) ROLLBACK
75
-  (0.1ms) BEGIN
76
- ---------------------------------------------------------------------------------------------
77
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
78
- ---------------------------------------------------------------------------------------------
79
-  (0.0ms) ROLLBACK
80
-  (0.0ms) BEGIN
81
- ------------------------------------------------------------------------------
82
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
83
- ------------------------------------------------------------------------------
84
-  (0.0ms) ROLLBACK
85
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
86
-  (0.2ms) BEGIN
87
- -----------------------------------------------------------------------------------------
88
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
89
- -----------------------------------------------------------------------------------------
90
-  (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
91
- FROM pg_constraint c
92
- JOIN pg_class t1 ON c.conrelid = t1.oid
93
- JOIN pg_class t2 ON c.confrelid = t2.oid
94
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
95
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
96
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
97
- WHERE c.contype = 'f'
98
- AND t1.relname = 'comments'
99
- AND t3.nspname = ANY (current_schemas(false))
100
- ORDER BY c.conname
101
- 
102
-  (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
103
- FROM pg_constraint c
104
- JOIN pg_class t1 ON c.conrelid = t1.oid
105
- JOIN pg_class t2 ON c.confrelid = t2.oid
106
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
107
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
108
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
109
- WHERE c.contype = 'f'
110
- AND t1.relname = 'users'
111
- AND t3.nspname = ANY (current_schemas(false))
112
- ORDER BY c.conname
113
-
114
-  (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
115
- FROM pg_constraint c
116
- JOIN pg_class t1 ON c.conrelid = t1.oid
117
- JOIN pg_class t2 ON c.confrelid = t2.oid
118
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
119
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
120
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
121
- WHERE c.contype = 'f'
122
- AND t1.relname = 'users'
123
- AND t3.nspname = ANY (current_schemas(false))
124
- ORDER BY c.conname
125
- 
126
-  (0.1ms) ROLLBACK
127
-  (0.0ms) BEGIN
128
- ------------------------------------------------------------------------------
129
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
130
- ------------------------------------------------------------------------------
131
-  (0.0ms) ROLLBACK
132
-  (0.0ms) BEGIN
133
- --------------------------------------------------------------------------------------
134
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
135
- --------------------------------------------------------------------------------------
136
-  (0.0ms) ROLLBACK
137
-  (0.0ms) BEGIN
138
- ---------------------------------------------------------------------------------------------
139
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
140
- ---------------------------------------------------------------------------------------------
141
-  (0.0ms) ROLLBACK
142
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
143
-  (0.1ms) BEGIN
144
- ----------------------------------------------------------------------------------
145
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
146
- ----------------------------------------------------------------------------------
147
-  (0.1ms) ROLLBACK
148
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
149
-  (0.1ms) BEGIN
150
- ----------------------------------------------------------------------------------
151
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
152
- ----------------------------------------------------------------------------------
153
-  (0.1ms) ROLLBACK
154
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
155
-  (0.1ms) BEGIN
156
- ----------------------------------------------------------------------------------
157
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
158
- ----------------------------------------------------------------------------------
159
-  (0.2ms) ROLLBACK
160
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
161
-  (0.2ms) BEGIN
162
- ----------------------------------------------------------------------------------
163
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
164
- ----------------------------------------------------------------------------------
165
-  (0.1ms) ROLLBACK
166
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
167
-  (0.2ms) BEGIN
168
- ----------------------------------------------------------------------------------
169
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
170
- ----------------------------------------------------------------------------------
171
-  (0.1ms) ROLLBACK
172
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
173
-  (0.1ms) BEGIN
174
- ----------------------------------------------------------------------------------
175
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
176
- ----------------------------------------------------------------------------------
177
-  (0.1ms) ROLLBACK
178
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
179
-  (0.1ms) BEGIN
180
- ----------------------------------------------------------------------------------
181
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
182
- ----------------------------------------------------------------------------------
183
-  (0.2ms) ROLLBACK
184
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
185
-  (0.1ms) BEGIN
186
- ----------------------------------------------------------------------------------
187
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
188
- ----------------------------------------------------------------------------------
189
-  (0.1ms) ROLLBACK
190
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
191
-  (0.1ms) BEGIN
192
- ----------------------------------------------------------------------------------
193
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
194
- ----------------------------------------------------------------------------------
195
-  (0.1ms) ROLLBACK
196
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
197
-  (0.1ms) BEGIN
198
- ----------------------------------------------------------------------------------
199
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
200
- ----------------------------------------------------------------------------------
201
-  (0.1ms) ROLLBACK
202
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
203
-  (0.2ms) BEGIN
204
- ----------------------------------------------------------------------------------
205
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
206
- ----------------------------------------------------------------------------------
207
-  (0.1ms) ROLLBACK
208
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
209
-  (0.1ms) BEGIN
210
- ---------------------------------------------------------------------------------------------
211
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
212
- ---------------------------------------------------------------------------------------------
213
-  (0.0ms) ROLLBACK
214
-  (0.0ms) BEGIN
215
- ----------------------------------------------------------------------------------
216
- ActiveRecordDoctor::Tasks::UndefinedTablesTest: test_undefined_tables_are_reported
217
- ----------------------------------------------------------------------------------
218
-  (0.1ms) ROLLBACK
219
-  (0.0ms) BEGIN
220
- --------------------------------------------------------------------------------------
221
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
222
- --------------------------------------------------------------------------------------
223
-  (0.0ms) ROLLBACK
224
-  (0.0ms) BEGIN
225
- ------------------------------------------------------------------------------
226
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
227
- ------------------------------------------------------------------------------
228
-  (0.1ms) ROLLBACK
229
-  (0.0ms) BEGIN
230
- -----------------------------------------------------------------------------------------
231
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
232
- -----------------------------------------------------------------------------------------
233
-  (1.6ms) 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
234
- FROM pg_constraint c
235
- JOIN pg_class t1 ON c.conrelid = t1.oid
236
- JOIN pg_class t2 ON c.confrelid = t2.oid
237
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
238
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
239
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
240
- WHERE c.contype = 'f'
241
- AND t1.relname = 'comments'
242
- AND t3.nspname = ANY (current_schemas(false))
243
- ORDER BY c.conname
244
- 
245
-  (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
246
- FROM pg_constraint c
247
- JOIN pg_class t1 ON c.conrelid = t1.oid
248
- JOIN pg_class t2 ON c.confrelid = t2.oid
249
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
250
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
251
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
252
- WHERE c.contype = 'f'
253
- AND t1.relname = 'users'
254
- AND t3.nspname = ANY (current_schemas(false))
255
- ORDER BY c.conname
256
-
257
-  (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
258
- FROM pg_constraint c
259
- JOIN pg_class t1 ON c.conrelid = t1.oid
260
- JOIN pg_class t2 ON c.confrelid = t2.oid
261
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
262
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
263
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
264
- WHERE c.contype = 'f'
265
- AND t1.relname = 'users'
266
- AND t3.nspname = ANY (current_schemas(false))
267
- ORDER BY c.conname
268
- 
269
-  (0.1ms) ROLLBACK
270
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
271
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
272
-  (0.1ms) BEGIN
273
- -----------------------------------------------------------------------------------------
274
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
275
- -----------------------------------------------------------------------------------------
276
-  (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
277
- FROM pg_constraint c
278
- JOIN pg_class t1 ON c.conrelid = t1.oid
279
- JOIN pg_class t2 ON c.confrelid = t2.oid
280
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
281
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
282
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
283
- WHERE c.contype = 'f'
284
- AND t1.relname = 'comments'
285
- AND t3.nspname = ANY (current_schemas(false))
286
- ORDER BY c.conname
287
- 
288
-  (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
289
- FROM pg_constraint c
290
- JOIN pg_class t1 ON c.conrelid = t1.oid
291
- JOIN pg_class t2 ON c.confrelid = t2.oid
292
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
293
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
294
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
295
- WHERE c.contype = 'f'
296
- AND t1.relname = 'users'
297
- AND t3.nspname = ANY (current_schemas(false))
298
- ORDER BY c.conname
299
-
300
-  (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
301
- FROM pg_constraint c
302
- JOIN pg_class t1 ON c.conrelid = t1.oid
303
- JOIN pg_class t2 ON c.confrelid = t2.oid
304
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
305
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
306
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
307
- WHERE c.contype = 'f'
308
- AND t1.relname = 'users'
309
- AND t3.nspname = ANY (current_schemas(false))
310
- ORDER BY c.conname
311
- 
312
-  (0.1ms) ROLLBACK
313
-  (0.0ms) BEGIN
314
- ------------------------------------------------------------------------------
315
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
316
- ------------------------------------------------------------------------------
317
-  (0.0ms) ROLLBACK
318
-  (0.0ms) BEGIN
319
- -----------------------------------------------------------------------------------------------------
320
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
321
- -----------------------------------------------------------------------------------------------------
322
-  (0.1ms) ROLLBACK
323
-  (0.0ms) BEGIN
324
- --------------------------------------------------------------------------------------
325
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
326
- --------------------------------------------------------------------------------------
327
-  (0.0ms) ROLLBACK
328
-  (0.0ms) BEGIN
329
- ---------------------------------------------------------------------------------------------
330
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
331
- ---------------------------------------------------------------------------------------------
332
-  (0.1ms) ROLLBACK
333
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
334
-  (0.1ms) BEGIN
335
- ------------------------------------------------------------------------------
336
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
337
- ------------------------------------------------------------------------------
338
-  (0.1ms) ROLLBACK
339
-  (0.1ms) BEGIN
340
- -----------------------------------------------------------------------------------------------------
341
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
342
- -----------------------------------------------------------------------------------------------------
343
-  (0.1ms) ROLLBACK
344
-  (0.1ms) BEGIN
345
- --------------------------------------------------------------------------------------
346
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
347
- --------------------------------------------------------------------------------------
348
-  (0.0ms) ROLLBACK
349
-  (0.0ms) BEGIN
350
- -----------------------------------------------------------------------------------------
351
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
352
- -----------------------------------------------------------------------------------------
353
-  (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
354
- FROM pg_constraint c
355
- JOIN pg_class t1 ON c.conrelid = t1.oid
356
- JOIN pg_class t2 ON c.confrelid = t2.oid
357
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
358
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
359
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
360
- WHERE c.contype = 'f'
361
- AND t1.relname = 'comments'
362
- AND t3.nspname = ANY (current_schemas(false))
363
- ORDER BY c.conname
364
- 
365
-  (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
366
- FROM pg_constraint c
367
- JOIN pg_class t1 ON c.conrelid = t1.oid
368
- JOIN pg_class t2 ON c.confrelid = t2.oid
369
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
370
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
371
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
372
- WHERE c.contype = 'f'
373
- AND t1.relname = 'users'
374
- AND t3.nspname = ANY (current_schemas(false))
375
- ORDER BY c.conname
376
-
377
-  (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
378
- FROM pg_constraint c
379
- JOIN pg_class t1 ON c.conrelid = t1.oid
380
- JOIN pg_class t2 ON c.confrelid = t2.oid
381
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
382
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
383
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
384
- WHERE c.contype = 'f'
385
- AND t1.relname = 'users'
386
- AND t3.nspname = ANY (current_schemas(false))
387
- ORDER BY c.conname
388
- 
389
-  (0.2ms) ROLLBACK
390
-  (0.1ms) BEGIN
391
- ---------------------------------------------------------------------------------------------
392
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
393
- ---------------------------------------------------------------------------------------------
394
-  (0.0ms) ROLLBACK
395
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
396
-  (0.1ms) BEGIN
397
- ------------------------------------------------------------------------------
398
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
399
- ------------------------------------------------------------------------------
400
-  (0.1ms) ROLLBACK
401
-  (0.0ms) BEGIN
402
- -----------------------------------------------------------------------------------------
403
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
404
- -----------------------------------------------------------------------------------------
405
-  (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
406
- FROM pg_constraint c
407
- JOIN pg_class t1 ON c.conrelid = t1.oid
408
- JOIN pg_class t2 ON c.confrelid = t2.oid
409
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
410
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
411
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
412
- WHERE c.contype = 'f'
413
- AND t1.relname = 'comments'
414
- AND t3.nspname = ANY (current_schemas(false))
415
- ORDER BY c.conname
416
- 
417
-  (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
418
- FROM pg_constraint c
419
- JOIN pg_class t1 ON c.conrelid = t1.oid
420
- JOIN pg_class t2 ON c.confrelid = t2.oid
421
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
422
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
423
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
424
- WHERE c.contype = 'f'
425
- AND t1.relname = 'users'
426
- AND t3.nspname = ANY (current_schemas(false))
427
- ORDER BY c.conname
428
-
429
-  (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
430
- FROM pg_constraint c
431
- JOIN pg_class t1 ON c.conrelid = t1.oid
432
- JOIN pg_class t2 ON c.confrelid = t2.oid
433
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
434
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
435
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
436
- WHERE c.contype = 'f'
437
- AND t1.relname = 'users'
438
- AND t3.nspname = ANY (current_schemas(false))
439
- ORDER BY c.conname
440
- 
441
-  (0.1ms) ROLLBACK
442
-  (0.0ms) BEGIN
443
- -----------------------------------------------------------------------------------------------------
444
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
445
- -----------------------------------------------------------------------------------------------------
446
-  (0.0ms) ROLLBACK
447
-  (0.0ms) BEGIN
448
- ---------------------------------------------------------------------------------------------
449
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
450
- ---------------------------------------------------------------------------------------------
451
-  (0.0ms) ROLLBACK
452
-  (0.0ms) BEGIN
453
- --------------------------------------------------------------------------------------
454
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
455
- --------------------------------------------------------------------------------------
456
-  (0.0ms) ROLLBACK
457
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
458
-  (0.2ms) BEGIN
459
- ---------------------------------------------------------------------------------------------
460
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
461
- ---------------------------------------------------------------------------------------------
462
-  (0.0ms) ROLLBACK
463
-  (0.0ms) BEGIN
464
- ------------------------------------------------------------------------------
465
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
466
- ------------------------------------------------------------------------------
467
-  (0.0ms) ROLLBACK
468
-  (0.0ms) BEGIN
469
- -----------------------------------------------------------------------------------------------------
470
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
471
- -----------------------------------------------------------------------------------------------------
472
-  (0.0ms) ROLLBACK
473
-  (0.0ms) BEGIN
474
- -----------------------------------------------------------------------------------------
475
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
476
- -----------------------------------------------------------------------------------------
477
-  (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
478
- FROM pg_constraint c
479
- JOIN pg_class t1 ON c.conrelid = t1.oid
480
- JOIN pg_class t2 ON c.confrelid = t2.oid
481
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
482
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
483
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
484
- WHERE c.contype = 'f'
485
- AND t1.relname = 'comments'
486
- AND t3.nspname = ANY (current_schemas(false))
487
- ORDER BY c.conname
488
- 
489
-  (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
490
- FROM pg_constraint c
491
- JOIN pg_class t1 ON c.conrelid = t1.oid
492
- JOIN pg_class t2 ON c.confrelid = t2.oid
493
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
494
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
495
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
496
- WHERE c.contype = 'f'
497
- AND t1.relname = 'users'
498
- AND t3.nspname = ANY (current_schemas(false))
499
- ORDER BY c.conname
500
-
501
-  (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
502
- FROM pg_constraint c
503
- JOIN pg_class t1 ON c.conrelid = t1.oid
504
- JOIN pg_class t2 ON c.confrelid = t2.oid
505
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
506
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
507
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
508
- WHERE c.contype = 'f'
509
- AND t1.relname = 'users'
510
- AND t3.nspname = ANY (current_schemas(false))
511
- ORDER BY c.conname
512
- 
513
-  (0.1ms) ROLLBACK
514
-  (0.1ms) BEGIN
515
- --------------------------------------------------------------------------------------
516
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
517
- --------------------------------------------------------------------------------------
518
-  (0.0ms) ROLLBACK
519
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
520
-  (0.1ms) BEGIN
521
- ---------------------------------------------------------------------------------------------
522
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
523
- ---------------------------------------------------------------------------------------------
524
-  (0.0ms) ROLLBACK
525
-  (0.0ms) BEGIN
526
- ------------------------------------------------------------------------------
527
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
528
- ------------------------------------------------------------------------------
529
-  (0.0ms) ROLLBACK
530
-  (0.0ms) BEGIN
531
- -----------------------------------------------------------------------------------------------------
532
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
533
- -----------------------------------------------------------------------------------------------------
534
-  (0.0ms) ROLLBACK
535
-  (0.0ms) BEGIN
536
- --------------------------------------------------------------------------------------
537
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
538
- --------------------------------------------------------------------------------------
539
-  (0.0ms) ROLLBACK
540
-  (0.0ms) BEGIN
541
- -----------------------------------------------------------------------------------------
542
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
543
- -----------------------------------------------------------------------------------------
544
-  (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
545
- FROM pg_constraint c
546
- JOIN pg_class t1 ON c.conrelid = t1.oid
547
- JOIN pg_class t2 ON c.confrelid = t2.oid
548
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
549
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
550
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
551
- WHERE c.contype = 'f'
552
- AND t1.relname = 'comments'
553
- AND t3.nspname = ANY (current_schemas(false))
554
- ORDER BY c.conname
555
- 
556
-  (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
557
- FROM pg_constraint c
558
- JOIN pg_class t1 ON c.conrelid = t1.oid
559
- JOIN pg_class t2 ON c.confrelid = t2.oid
560
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
561
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
562
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
563
- WHERE c.contype = 'f'
564
- AND t1.relname = 'users'
565
- AND t3.nspname = ANY (current_schemas(false))
566
- ORDER BY c.conname
567
-
568
-  (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
569
- FROM pg_constraint c
570
- JOIN pg_class t1 ON c.conrelid = t1.oid
571
- JOIN pg_class t2 ON c.confrelid = t2.oid
572
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
573
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
574
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
575
- WHERE c.contype = 'f'
576
- AND t1.relname = 'users'
577
- AND t3.nspname = ANY (current_schemas(false))
578
- ORDER BY c.conname
579
- 
580
-  (0.1ms) ROLLBACK
581
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
582
-  (0.1ms) BEGIN
583
- ------------------------------------------------------------------------------
584
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
585
- ------------------------------------------------------------------------------
586
-  (0.1ms) ROLLBACK
587
-  (0.1ms) BEGIN
588
- --------------------------------------------------------------------------------------
589
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
590
- --------------------------------------------------------------------------------------
591
-  (0.0ms) ROLLBACK
592
-  (0.0ms) BEGIN
593
- ---------------------------------------------------------------------------------------------
594
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
595
- ---------------------------------------------------------------------------------------------
596
-  (0.0ms) ROLLBACK
597
-  (0.0ms) BEGIN
598
- -----------------------------------------------------------------------------------------------------
599
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
600
- -----------------------------------------------------------------------------------------------------
601
-  (0.0ms) ROLLBACK
602
-  (0.0ms) BEGIN
603
- -----------------------------------------------------------------------------------------
604
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
605
- -----------------------------------------------------------------------------------------
606
-  (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
607
- FROM pg_constraint c
608
- JOIN pg_class t1 ON c.conrelid = t1.oid
609
- JOIN pg_class t2 ON c.confrelid = t2.oid
610
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
611
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
612
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
613
- WHERE c.contype = 'f'
614
- AND t1.relname = 'comments'
615
- AND t3.nspname = ANY (current_schemas(false))
616
- ORDER BY c.conname
617
- 
618
-  (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
619
- FROM pg_constraint c
620
- JOIN pg_class t1 ON c.conrelid = t1.oid
621
- JOIN pg_class t2 ON c.confrelid = t2.oid
622
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
623
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
624
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
625
- WHERE c.contype = 'f'
626
- AND t1.relname = 'users'
627
- AND t3.nspname = ANY (current_schemas(false))
628
- ORDER BY c.conname
629
-
630
-  (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
631
- FROM pg_constraint c
632
- JOIN pg_class t1 ON c.conrelid = t1.oid
633
- JOIN pg_class t2 ON c.confrelid = t2.oid
634
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
635
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
636
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
637
- WHERE c.contype = 'f'
638
- AND t1.relname = 'users'
639
- AND t3.nspname = ANY (current_schemas(false))
640
- ORDER BY c.conname
641
- 
642
-  (0.1ms) ROLLBACK
643
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
644
-  (0.1ms) BEGIN
645
- -----------------------------------------------------------------------------------------
646
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
647
- -----------------------------------------------------------------------------------------
648
-  (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
649
- FROM pg_constraint c
650
- JOIN pg_class t1 ON c.conrelid = t1.oid
651
- JOIN pg_class t2 ON c.confrelid = t2.oid
652
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
653
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
654
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
655
- WHERE c.contype = 'f'
656
- AND t1.relname = 'comments'
657
- AND t3.nspname = ANY (current_schemas(false))
658
- ORDER BY c.conname
659
- 
660
-  (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
661
- FROM pg_constraint c
662
- JOIN pg_class t1 ON c.conrelid = t1.oid
663
- JOIN pg_class t2 ON c.confrelid = t2.oid
664
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
665
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
666
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
667
- WHERE c.contype = 'f'
668
- AND t1.relname = 'users'
669
- AND t3.nspname = ANY (current_schemas(false))
670
- ORDER BY c.conname
671
-
672
-  (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
673
- FROM pg_constraint c
674
- JOIN pg_class t1 ON c.conrelid = t1.oid
675
- JOIN pg_class t2 ON c.confrelid = t2.oid
676
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
677
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
678
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
679
- WHERE c.contype = 'f'
680
- AND t1.relname = 'users'
681
- AND t3.nspname = ANY (current_schemas(false))
682
- ORDER BY c.conname
683
- 
684
-  (0.1ms) ROLLBACK
685
-  (0.1ms) BEGIN
686
- ------------------------------------------------------------------------------
687
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
688
- ------------------------------------------------------------------------------
689
-  (0.1ms) ROLLBACK
690
-  (0.1ms) BEGIN
691
- --------------------------------------------------------------------------------------
692
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
693
- --------------------------------------------------------------------------------------
694
-  (0.0ms) ROLLBACK
695
-  (0.0ms) BEGIN
696
- -----------------------------------------------------------------------------------------------------
697
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
698
- -----------------------------------------------------------------------------------------------------
699
-  (0.0ms) ROLLBACK
700
-  (0.0ms) BEGIN
701
- ---------------------------------------------------------------------------------------------
702
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
703
- ---------------------------------------------------------------------------------------------
704
-  (0.0ms) ROLLBACK
705
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
706
-  (0.2ms) BEGIN
707
- -----------------------------------------------------------------------------------------
708
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
709
- -----------------------------------------------------------------------------------------
710
-  (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
711
- FROM pg_constraint c
712
- JOIN pg_class t1 ON c.conrelid = t1.oid
713
- JOIN pg_class t2 ON c.confrelid = t2.oid
714
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
715
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
716
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
717
- WHERE c.contype = 'f'
718
- AND t1.relname = 'comments'
719
- AND t3.nspname = ANY (current_schemas(false))
720
- ORDER BY c.conname
721
- 
722
-  (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
723
- FROM pg_constraint c
724
- JOIN pg_class t1 ON c.conrelid = t1.oid
725
- JOIN pg_class t2 ON c.confrelid = t2.oid
726
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
727
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
728
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
729
- WHERE c.contype = 'f'
730
- AND t1.relname = 'users'
731
- AND t3.nspname = ANY (current_schemas(false))
732
- ORDER BY c.conname
733
-
734
-  (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
735
- FROM pg_constraint c
736
- JOIN pg_class t1 ON c.conrelid = t1.oid
737
- JOIN pg_class t2 ON c.confrelid = t2.oid
738
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
739
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
740
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
741
- WHERE c.contype = 'f'
742
- AND t1.relname = 'users'
743
- AND t3.nspname = ANY (current_schemas(false))
744
- ORDER BY c.conname
745
- 
746
-  (0.2ms) ROLLBACK
747
-  (0.1ms) BEGIN
748
- -----------------------------------------------------------------------------------------------------
749
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
750
- -----------------------------------------------------------------------------------------------------
751
-  (0.1ms) ROLLBACK
752
-  (0.1ms) BEGIN
753
- --------------------------------------------------------------------------------------
754
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
755
- --------------------------------------------------------------------------------------
756
-  (0.0ms) ROLLBACK
757
-  (0.0ms) BEGIN
758
- ---------------------------------------------------------------------------------------------
759
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
760
- ---------------------------------------------------------------------------------------------
761
-  (0.0ms) ROLLBACK
762
-  (0.0ms) BEGIN
763
- ------------------------------------------------------------------------------
764
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
765
- ------------------------------------------------------------------------------
766
-  (0.0ms) ROLLBACK
767
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
768
-  (0.1ms) BEGIN
769
- ---------------------------------------------------------------------------------------------
770
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
771
- ---------------------------------------------------------------------------------------------
772
-  (0.0ms) ROLLBACK
773
-  (0.0ms) BEGIN
774
- -----------------------------------------------------------------------------------------------------
775
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
776
- -----------------------------------------------------------------------------------------------------
777
-  (0.1ms) ROLLBACK
778
-  (0.1ms) BEGIN
779
- -----------------------------------------------------------------------------------------
780
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
781
- -----------------------------------------------------------------------------------------
782
-  (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
783
- FROM pg_constraint c
784
- JOIN pg_class t1 ON c.conrelid = t1.oid
785
- JOIN pg_class t2 ON c.confrelid = t2.oid
786
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
787
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
788
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
789
- WHERE c.contype = 'f'
790
- AND t1.relname = 'comments'
791
- AND t3.nspname = ANY (current_schemas(false))
792
- ORDER BY c.conname
793
- 
794
-  (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
795
- FROM pg_constraint c
796
- JOIN pg_class t1 ON c.conrelid = t1.oid
797
- JOIN pg_class t2 ON c.confrelid = t2.oid
798
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
799
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
800
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
801
- WHERE c.contype = 'f'
802
- AND t1.relname = 'users'
803
- AND t3.nspname = ANY (current_schemas(false))
804
- ORDER BY c.conname
805
-
806
-  (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
807
- FROM pg_constraint c
808
- JOIN pg_class t1 ON c.conrelid = t1.oid
809
- JOIN pg_class t2 ON c.confrelid = t2.oid
810
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
811
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
812
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
813
- WHERE c.contype = 'f'
814
- AND t1.relname = 'users'
815
- AND t3.nspname = ANY (current_schemas(false))
816
- ORDER BY c.conname
817
- 
818
-  (0.1ms) ROLLBACK
819
-  (0.0ms) BEGIN
820
- ------------------------------------------------------------------------------
821
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
822
- ------------------------------------------------------------------------------
823
-  (0.1ms) ROLLBACK
824
-  (0.1ms) BEGIN
825
- --------------------------------------------------------------------------------------
826
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
827
- --------------------------------------------------------------------------------------
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
1721
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1722
-  (0.2ms) BEGIN
1723
- -----------------------------------------------------------------------------------------
1724
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1725
- -----------------------------------------------------------------------------------------
1726
-  (0.1ms) ROLLBACK
1727
-  (208.8ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
1728
-  (581.3ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
1729
- SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1730
-  (45.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)
1731
-  (24.3ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
1732
-  (30.6ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1733
-  (18.9ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
1734
-  (38.5ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1735
-  (35.8ms) CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" USING btree ("first_name", "last_name")
1736
-  (39.8ms) 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)
1737
-  (18.9ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
1738
-  (23.8ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
1739
-  (18.4ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
1740
-  (28.9ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
1741
-  (32.7ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
1742
-  (23.6ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
1743
-  (31.4ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
1744
-  (7.0ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
1745
- FOREIGN KEY ("employer_id")
1746
- REFERENCES "employers" ("id")
1747
-
1748
-  (29.6ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
1749
-  (18.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1750
-  (0.4ms) SELECT version FROM "schema_migrations"
1751
-  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
1752
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
1753
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
1754
-  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
1755
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1756
-  (0.1ms) BEGIN
1757
- -----------------------------------------------------------------------------------------
1758
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1759
- -----------------------------------------------------------------------------------------
1760
-  (0.1ms) ROLLBACK
1761
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1762
-  (0.1ms) BEGIN
1763
- -----------------------------------------------------------------------------------------
1764
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1765
- -----------------------------------------------------------------------------------------
1766
-  (0.1ms) ROLLBACK
1767
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1768
-  (0.1ms) BEGIN
1769
- -----------------------------------------------------------------------------------------
1770
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1771
- -----------------------------------------------------------------------------------------
1772
-  (0.1ms) ROLLBACK
1773
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1774
-  (0.1ms) BEGIN
1775
- -----------------------------------------------------------------------------------------
1776
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1777
- -----------------------------------------------------------------------------------------
1778
-  (0.1ms) ROLLBACK
1779
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1780
-  (0.1ms) BEGIN
1781
- -----------------------------------------------------------------------------------------
1782
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1783
- -----------------------------------------------------------------------------------------
1784
-  (0.1ms) ROLLBACK
1785
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1786
-  (0.1ms) BEGIN
1787
- -----------------------------------------------------------------------------------------
1788
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1789
- -----------------------------------------------------------------------------------------
1790
-  (0.1ms) ROLLBACK
1791
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1792
-  (0.1ms) BEGIN
1793
- -----------------------------------------------------------------------------------------
1794
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1795
- -----------------------------------------------------------------------------------------
1796
-  (0.1ms) ROLLBACK
1797
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
1798
-  (0.1ms) BEGIN
1799
- -----------------------------------------------------------------------------------------
1800
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1801
- -----------------------------------------------------------------------------------------
1802
-  (0.1ms) ROLLBACK
1803
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1804
-  (0.1ms) BEGIN
1805
- -----------------------------------------------------------------------------------------
1806
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1807
- -----------------------------------------------------------------------------------------
1808
-  (0.1ms) ROLLBACK
1809
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1810
-  (0.1ms) BEGIN
1811
- -----------------------------------------------------------------------------------------
1812
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1813
- -----------------------------------------------------------------------------------------
1814
-  (0.1ms) ROLLBACK
1815
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1816
-  (0.1ms) BEGIN
1817
- -----------------------------------------------------------------------------------------
1818
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1819
- -----------------------------------------------------------------------------------------
1820
-  (0.1ms) ROLLBACK
1821
-  (213.1ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
1822
-  (569.5ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
1823
- SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1824
-  (47.3ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1825
-  (17.9ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
1826
-  (41.6ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1827
-  (18.2ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")
1828
-  (40.2ms) CREATE INDEX "index_employers_on_name" ON "employers" USING btree ("name") WHERE (deleted_at IS NULL)
1829
-  (36.1ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1830
-  (22.0ms) CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" USING btree ("first_name", "last_name")
1831
-  (50.2ms) 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) 
1832
-  (25.1ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
1833
-  (26.9ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
1834
-  (26.8ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
1835
-  (27.7ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
1836
-  (17.8ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
1837
-  (17.9ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
1838
-  (21.0ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
1839
-  (9.0ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
1840
- FOREIGN KEY ("employer_id")
1841
- REFERENCES "employers" ("id")
1842
- 
1843
-  (21.2ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
1844
-  (23.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1845
-  (0.3ms) SELECT version FROM "schema_migrations"
1846
-  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
1847
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
1848
-  (8.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
1849
-  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
1850
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1851
-  (0.2ms) BEGIN
1852
- -----------------------------------------------------------------------------------------
1853
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1854
- -----------------------------------------------------------------------------------------
1855
-  (0.0ms) ROLLBACK
1856
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1857
-  (0.1ms) BEGIN
1858
- -----------------------------------------------------------------------------------------
1859
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1860
- -----------------------------------------------------------------------------------------
1861
-  (0.1ms) ROLLBACK
1862
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1863
-  (0.1ms) BEGIN
1864
- -----------------------------------------------------------------------------------------
1865
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1866
- -----------------------------------------------------------------------------------------
1867
-  (0.0ms) ROLLBACK
1868
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1869
-  (0.1ms) BEGIN
1870
- -----------------------------------------------------------------------------------------
1871
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1872
- -----------------------------------------------------------------------------------------
1873
-  (0.1ms) ROLLBACK
1874
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1875
-  (0.1ms) BEGIN
1876
- -----------------------------------------------------------------------------------------
1877
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1878
- -----------------------------------------------------------------------------------------
1879
-  (0.1ms) ROLLBACK
1880
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1881
-  (0.1ms) BEGIN
1882
- -----------------------------------------------------------------------------------------
1883
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1884
- -----------------------------------------------------------------------------------------
1885
-  (0.0ms) ROLLBACK
1886
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1887
-  (0.1ms) BEGIN
1888
- -----------------------------------------------------------------------------------------
1889
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1890
- -----------------------------------------------------------------------------------------
1891
-  (0.1ms) ROLLBACK
1892
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1893
-  (0.1ms) BEGIN
1894
- -----------------------------------------------------------------------------------------------------
1895
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
1896
- -----------------------------------------------------------------------------------------------------
1897
-  (0.0ms) ROLLBACK
1898
-  (0.0ms) BEGIN
1899
- -----------------------------------------------------------------------------------------
1900
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1901
- -----------------------------------------------------------------------------------------
1902
-  (0.1ms) ROLLBACK
1903
-  (0.0ms) BEGIN
1904
- -----------------------------------------------------------------------------------------
1905
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
1906
- -----------------------------------------------------------------------------------------
1907
-  (1.9ms) 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
1908
- FROM pg_constraint c
1909
- JOIN pg_class t1 ON c.conrelid = t1.oid
1910
- JOIN pg_class t2 ON c.confrelid = t2.oid
1911
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1912
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1913
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
1914
- WHERE c.contype = 'f'
1915
- AND t1.relname = 'comments'
1916
- AND t3.nspname = ANY (current_schemas(false))
1917
- ORDER BY c.conname
1918
- 
1919
-  (1.6ms) 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
1920
- FROM pg_constraint c
1921
- JOIN pg_class t1 ON c.conrelid = t1.oid
1922
- JOIN pg_class t2 ON c.confrelid = t2.oid
1923
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1924
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1925
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
1926
- WHERE c.contype = 'f'
1927
- AND t1.relname = 'users'
1928
- AND t3.nspname = ANY (current_schemas(false))
1929
- ORDER BY c.conname
1930
-
1931
-  (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
1932
- FROM pg_constraint c
1933
- JOIN pg_class t1 ON c.conrelid = t1.oid
1934
- JOIN pg_class t2 ON c.confrelid = t2.oid
1935
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1936
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1937
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
1938
- WHERE c.contype = 'f'
1939
- AND t1.relname = 'users'
1940
- AND t3.nspname = ANY (current_schemas(false))
1941
- ORDER BY c.conname
1942
- 
1943
-  (0.1ms) ROLLBACK
1944
-  (0.1ms) BEGIN
1945
- ------------------------------------------------------------------------------
1946
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
1947
- ------------------------------------------------------------------------------
1948
-  (0.1ms) ROLLBACK
1949
-  (0.1ms) BEGIN
1950
- --------------------------------------------------------------------------------------
1951
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
1952
- --------------------------------------------------------------------------------------
1953
-  (0.0ms) ROLLBACK
1954
-  (0.0ms) BEGIN
1955
- ---------------------------------------------------------------------------------------------
1956
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1957
- ---------------------------------------------------------------------------------------------
1958
-  (0.0ms) ROLLBACK
1959
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1960
-  (0.1ms) BEGIN
1961
- -----------------------------------------------------------------------------------------
1962
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1963
- -----------------------------------------------------------------------------------------
1964
-  (0.1ms) ROLLBACK
1965
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1966
-  (0.1ms) BEGIN
1967
- -----------------------------------------------------------------------------------------
1968
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1969
- -----------------------------------------------------------------------------------------
1970
-  (0.1ms) ROLLBACK
1971
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1972
-  (0.1ms) BEGIN
1973
- -----------------------------------------------------------------------------------------
1974
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1975
- -----------------------------------------------------------------------------------------
1976
-  (0.0ms) ROLLBACK
1977
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
1978
-  (0.1ms) BEGIN
1979
- -----------------------------------------------------------------------------------------
1980
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
1981
- -----------------------------------------------------------------------------------------
1982
-  (0.1ms) ROLLBACK
1983
-  (213.3ms) DROP DATABASE IF EXISTS "active_record_doctor_test"
1984
-  (597.5ms) CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
1985
- SQL (0.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
1986
-  (63.1ms) CREATE TABLE "comments" ("id" serial primary key, "commentable_id" integer, "commentable_type" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1987
-  (25.3ms) CREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")
1988
-  (48.3ms) CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
1989
-  (25.0ms) CREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id") WHERE (deleted_at IS NULL)
1990
-  (25.3ms) CREATE INDEX "index_employers_on_name" ON "employers" USING btree ("name") WHERE (deleted_at IS NULL)
1991
-  (40.5ms) CREATE TABLE "profiles" ("id" serial primary key, "first_name" character varying, "last_name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
1992
-  (28.5ms) CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" USING btree ("first_name", "last_name")
1993
-  (43.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) 
1994
-  (21.7ms) CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
1995
-  (18.7ms) CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
1996
-  (26.8ms) CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
1997
-  (28.0ms) CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
1998
-  (21.6ms) CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
1999
-  (25.0ms) CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
2000
-  (24.1ms) CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
2001
-  (9.7ms) ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
2002
- FOREIGN KEY ("employer_id")
2003
- REFERENCES "employers" ("id")
2004
- 
2005
-  (19.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
2006
-  (14.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2007
-  (0.2ms) SELECT version FROM "schema_migrations"
2008
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
2009
-  (2.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
2010
-  (7.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
2011
-  (7.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
2012
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2013
-  (0.1ms) BEGIN
2014
- -----------------------------------------------------------------------------------------
2015
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2016
- -----------------------------------------------------------------------------------------
2017
-  (0.1ms) ROLLBACK
2018
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2019
-  (0.1ms) BEGIN
2020
- ---------------------------------------------------------------------------------------------
2021
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2022
- ---------------------------------------------------------------------------------------------
2023
-  (0.1ms) ROLLBACK
2024
-  (0.0ms) BEGIN
2025
- -----------------------------------------------------------------------------------------
2026
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2027
- -----------------------------------------------------------------------------------------
2028
-  (0.1ms) ROLLBACK
2029
-  (0.0ms) BEGIN
2030
- -----------------------------------------------------------------------------------------------------
2031
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2032
- -----------------------------------------------------------------------------------------------------
2033
-  (0.0ms) ROLLBACK
2034
-  (0.1ms) BEGIN
2035
- --------------------------------------------------------------------------------------
2036
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2037
- --------------------------------------------------------------------------------------
2038
-  (0.0ms) ROLLBACK
2039
-  (0.0ms) BEGIN
2040
- ------------------------------------------------------------------------------
2041
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2042
- ------------------------------------------------------------------------------
2043
-  (0.0ms) ROLLBACK
2044
-  (0.0ms) BEGIN
2045
- -----------------------------------------------------------------------------------------
2046
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2047
- -----------------------------------------------------------------------------------------
2048
-  (1.7ms) 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
2049
- FROM pg_constraint c
2050
- JOIN pg_class t1 ON c.conrelid = t1.oid
2051
- JOIN pg_class t2 ON c.confrelid = t2.oid
2052
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2053
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2054
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2055
- WHERE c.contype = 'f'
2056
- AND t1.relname = 'comments'
2057
- AND t3.nspname = ANY (current_schemas(false))
2058
- ORDER BY c.conname
2059
- 
2060
-  (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
2061
- FROM pg_constraint c
2062
- JOIN pg_class t1 ON c.conrelid = t1.oid
2063
- JOIN pg_class t2 ON c.confrelid = t2.oid
2064
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2065
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2066
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2067
- WHERE c.contype = 'f'
2068
- AND t1.relname = 'users'
2069
- AND t3.nspname = ANY (current_schemas(false))
2070
- ORDER BY c.conname
2071
-
2072
-  (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
2073
- FROM pg_constraint c
2074
- JOIN pg_class t1 ON c.conrelid = t1.oid
2075
- JOIN pg_class t2 ON c.confrelid = t2.oid
2076
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2077
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2078
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2079
- WHERE c.contype = 'f'
2080
- AND t1.relname = 'users'
2081
- AND t3.nspname = ANY (current_schemas(false))
2082
- ORDER BY c.conname
2083
- 
2084
-  (0.2ms) ROLLBACK
2085
- ActiveRecord::SchemaMigration Load (15.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2086
-  (0.1ms) BEGIN
2087
- -----------------------------------------------------------------------------------------
2088
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2089
- -----------------------------------------------------------------------------------------
2090
-  (0.1ms) ROLLBACK
2091
-  (0.1ms) BEGIN
2092
- ------------------------------------------------------------------------------
2093
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2094
- ------------------------------------------------------------------------------
2095
-  (0.0ms) ROLLBACK
2096
-  (0.0ms) BEGIN
2097
- -----------------------------------------------------------------------------------------
2098
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2099
- -----------------------------------------------------------------------------------------
2100
-  (11.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
2101
- FROM pg_constraint c
2102
- JOIN pg_class t1 ON c.conrelid = t1.oid
2103
- JOIN pg_class t2 ON c.confrelid = t2.oid
2104
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2105
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2106
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2107
- WHERE c.contype = 'f'
2108
- AND t1.relname = 'comments'
2109
- AND t3.nspname = ANY (current_schemas(false))
2110
- ORDER BY c.conname
2111
- 
2112
-  (12.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
2113
- FROM pg_constraint c
2114
- JOIN pg_class t1 ON c.conrelid = t1.oid
2115
- JOIN pg_class t2 ON c.confrelid = t2.oid
2116
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2117
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2118
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2119
- WHERE c.contype = 'f'
2120
- AND t1.relname = 'users'
2121
- AND t3.nspname = ANY (current_schemas(false))
2122
- ORDER BY c.conname
2123
-
2124
-  (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
2125
- FROM pg_constraint c
2126
- JOIN pg_class t1 ON c.conrelid = t1.oid
2127
- JOIN pg_class t2 ON c.confrelid = t2.oid
2128
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2129
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2130
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2131
- WHERE c.contype = 'f'
2132
- AND t1.relname = 'users'
2133
- AND t3.nspname = ANY (current_schemas(false))
2134
- ORDER BY c.conname
2135
- 
2136
-  (0.2ms) ROLLBACK
2137
-  (0.1ms) BEGIN
2138
- ---------------------------------------------------------------------------------------------
2139
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2140
- ---------------------------------------------------------------------------------------------
2141
-  (0.0ms) ROLLBACK
2142
-  (0.0ms) BEGIN
2143
- --------------------------------------------------------------------------------------
2144
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2145
- --------------------------------------------------------------------------------------
2146
-  (0.0ms) ROLLBACK
2147
-  (0.0ms) BEGIN
2148
- -----------------------------------------------------------------------------------------------------
2149
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2150
- -----------------------------------------------------------------------------------------------------
2151
-  (0.1ms) ROLLBACK
2152
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2153
-  (0.1ms) BEGIN
2154
- ------------------------------------------------------------------------------
2155
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2156
- ------------------------------------------------------------------------------
2157
-  (0.1ms) ROLLBACK
2158
-  (0.1ms) BEGIN
2159
- ---------------------------------------------------------------------------------------------
2160
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2161
- ---------------------------------------------------------------------------------------------
2162
-  (0.0ms) ROLLBACK
2163
-  (0.0ms) BEGIN
2164
- -----------------------------------------------------------------------------------------
2165
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2166
- -----------------------------------------------------------------------------------------
2167
-  (0.0ms) ROLLBACK
2168
-  (0.0ms) BEGIN
2169
- -----------------------------------------------------------------------------------------------------
2170
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2171
- -----------------------------------------------------------------------------------------------------
2172
-  (0.0ms) ROLLBACK
2173
-  (0.0ms) BEGIN
2174
- --------------------------------------------------------------------------------------
2175
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2176
- --------------------------------------------------------------------------------------
2177
-  (0.0ms) ROLLBACK
2178
-  (0.0ms) BEGIN
2179
- -----------------------------------------------------------------------------------------
2180
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2181
- -----------------------------------------------------------------------------------------
2182
-  (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
2183
- FROM pg_constraint c
2184
- JOIN pg_class t1 ON c.conrelid = t1.oid
2185
- JOIN pg_class t2 ON c.confrelid = t2.oid
2186
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2187
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2188
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2189
- WHERE c.contype = 'f'
2190
- AND t1.relname = 'comments'
2191
- AND t3.nspname = ANY (current_schemas(false))
2192
- ORDER BY c.conname
2193
- 
2194
-  (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
2195
- FROM pg_constraint c
2196
- JOIN pg_class t1 ON c.conrelid = t1.oid
2197
- JOIN pg_class t2 ON c.confrelid = t2.oid
2198
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2199
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2200
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2201
- WHERE c.contype = 'f'
2202
- AND t1.relname = 'users'
2203
- AND t3.nspname = ANY (current_schemas(false))
2204
- ORDER BY c.conname
2205
-
2206
-  (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
2207
- FROM pg_constraint c
2208
- JOIN pg_class t1 ON c.conrelid = t1.oid
2209
- JOIN pg_class t2 ON c.confrelid = t2.oid
2210
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2211
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2212
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2213
- WHERE c.contype = 'f'
2214
- AND t1.relname = 'users'
2215
- AND t3.nspname = ANY (current_schemas(false))
2216
- ORDER BY c.conname
2217
- 
2218
-  (0.2ms) ROLLBACK
2219
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2220
-  (0.1ms) BEGIN
2221
- -----------------------------------------------------------------------------------------
2222
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2223
- -----------------------------------------------------------------------------------------
2224
-  (1.6ms) 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
2225
- FROM pg_constraint c
2226
- JOIN pg_class t1 ON c.conrelid = t1.oid
2227
- JOIN pg_class t2 ON c.confrelid = t2.oid
2228
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2229
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2230
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2231
- WHERE c.contype = 'f'
2232
- AND t1.relname = 'comments'
2233
- AND t3.nspname = ANY (current_schemas(false))
2234
- ORDER BY c.conname
2235
- 
2236
-  (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
2237
- FROM pg_constraint c
2238
- JOIN pg_class t1 ON c.conrelid = t1.oid
2239
- JOIN pg_class t2 ON c.confrelid = t2.oid
2240
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2241
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2242
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2243
- WHERE c.contype = 'f'
2244
- AND t1.relname = 'users'
2245
- AND t3.nspname = ANY (current_schemas(false))
2246
- ORDER BY c.conname
2247
-
2248
-  (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
2249
- FROM pg_constraint c
2250
- JOIN pg_class t1 ON c.conrelid = t1.oid
2251
- JOIN pg_class t2 ON c.confrelid = t2.oid
2252
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2253
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2254
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2255
- WHERE c.contype = 'f'
2256
- AND t1.relname = 'users'
2257
- AND t3.nspname = ANY (current_schemas(false))
2258
- ORDER BY c.conname
2259
- 
2260
-  (0.1ms) ROLLBACK
2261
-  (0.1ms) BEGIN
2262
- -----------------------------------------------------------------------------------------
2263
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2264
- -----------------------------------------------------------------------------------------
2265
-  (0.1ms) ROLLBACK
2266
-  (0.1ms) BEGIN
2267
- ------------------------------------------------------------------------------
2268
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2269
- ------------------------------------------------------------------------------
2270
-  (0.1ms) ROLLBACK
2271
-  (0.0ms) BEGIN
2272
- ---------------------------------------------------------------------------------------------
2273
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2274
- ---------------------------------------------------------------------------------------------
2275
-  (0.0ms) ROLLBACK
2276
-  (0.0ms) BEGIN
2277
- --------------------------------------------------------------------------------------
2278
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2279
- --------------------------------------------------------------------------------------
2280
-  (0.0ms) ROLLBACK
2281
-  (0.0ms) BEGIN
2282
- -----------------------------------------------------------------------------------------------------
2283
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2284
- -----------------------------------------------------------------------------------------------------
2285
-  (0.1ms) ROLLBACK
2286
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2287
-  (0.2ms) BEGIN
2288
- --------------------------------------------------------------------------------------
2289
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2290
- --------------------------------------------------------------------------------------
2291
-  (0.0ms) ROLLBACK
2292
-  (0.0ms) BEGIN
2293
- -----------------------------------------------------------------------------------------
2294
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2295
- -----------------------------------------------------------------------------------------
2296
-  (0.1ms) ROLLBACK
2297
-  (0.1ms) BEGIN
2298
- ------------------------------------------------------------------------------
2299
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2300
- ------------------------------------------------------------------------------
2301
-  (0.1ms) ROLLBACK
2302
-  (0.0ms) BEGIN
2303
- -----------------------------------------------------------------------------------------
2304
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2305
- -----------------------------------------------------------------------------------------
2306
-  (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
2307
- FROM pg_constraint c
2308
- JOIN pg_class t1 ON c.conrelid = t1.oid
2309
- JOIN pg_class t2 ON c.confrelid = t2.oid
2310
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2311
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2312
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2313
- WHERE c.contype = 'f'
2314
- AND t1.relname = 'comments'
2315
- AND t3.nspname = ANY (current_schemas(false))
2316
- ORDER BY c.conname
2317
- 
2318
-  (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
2319
- FROM pg_constraint c
2320
- JOIN pg_class t1 ON c.conrelid = t1.oid
2321
- JOIN pg_class t2 ON c.confrelid = t2.oid
2322
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2323
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2324
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2325
- WHERE c.contype = 'f'
2326
- AND t1.relname = 'users'
2327
- AND t3.nspname = ANY (current_schemas(false))
2328
- ORDER BY c.conname
2329
-
2330
-  (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
2331
- FROM pg_constraint c
2332
- JOIN pg_class t1 ON c.conrelid = t1.oid
2333
- JOIN pg_class t2 ON c.confrelid = t2.oid
2334
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2335
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2336
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2337
- WHERE c.contype = 'f'
2338
- AND t1.relname = 'users'
2339
- AND t3.nspname = ANY (current_schemas(false))
2340
- ORDER BY c.conname
2341
- 
2342
-  (0.1ms) ROLLBACK
2343
-  (0.0ms) BEGIN
2344
- -----------------------------------------------------------------------------------------------------
2345
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2346
- -----------------------------------------------------------------------------------------------------
2347
-  (0.1ms) ROLLBACK
2348
-  (0.0ms) BEGIN
2349
- ---------------------------------------------------------------------------------------------
2350
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2351
- ---------------------------------------------------------------------------------------------
2352
-  (0.0ms) ROLLBACK
2353
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2354
-  (0.2ms) BEGIN
2355
- ---------------------------------------------------------------------------------------------
2356
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2357
- ---------------------------------------------------------------------------------------------
2358
-  (0.0ms) ROLLBACK
2359
-  (0.0ms) BEGIN
2360
- -----------------------------------------------------------------------------------------------------
2361
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2362
- -----------------------------------------------------------------------------------------------------
2363
-  (0.1ms) ROLLBACK
2364
-  (0.0ms) BEGIN
2365
- -----------------------------------------------------------------------------------------
2366
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2367
- -----------------------------------------------------------------------------------------
2368
-  (0.0ms) ROLLBACK
2369
-  (0.0ms) BEGIN
2370
- -----------------------------------------------------------------------------------------
2371
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2372
- -----------------------------------------------------------------------------------------
2373
-  (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
2374
- FROM pg_constraint c
2375
- JOIN pg_class t1 ON c.conrelid = t1.oid
2376
- JOIN pg_class t2 ON c.confrelid = t2.oid
2377
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2378
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2379
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2380
- WHERE c.contype = 'f'
2381
- AND t1.relname = 'comments'
2382
- AND t3.nspname = ANY (current_schemas(false))
2383
- ORDER BY c.conname
2384
- 
2385
-  (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
2386
- FROM pg_constraint c
2387
- JOIN pg_class t1 ON c.conrelid = t1.oid
2388
- JOIN pg_class t2 ON c.confrelid = t2.oid
2389
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2390
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2391
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2392
- WHERE c.contype = 'f'
2393
- AND t1.relname = 'users'
2394
- AND t3.nspname = ANY (current_schemas(false))
2395
- ORDER BY c.conname
2396
-
2397
-  (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
2398
- FROM pg_constraint c
2399
- JOIN pg_class t1 ON c.conrelid = t1.oid
2400
- JOIN pg_class t2 ON c.confrelid = t2.oid
2401
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2402
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2403
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2404
- WHERE c.contype = 'f'
2405
- AND t1.relname = 'users'
2406
- AND t3.nspname = ANY (current_schemas(false))
2407
- ORDER BY c.conname
2408
- 
2409
-  (0.1ms) ROLLBACK
2410
-  (0.1ms) BEGIN
2411
- ------------------------------------------------------------------------------
2412
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2413
- ------------------------------------------------------------------------------
2414
-  (0.1ms) ROLLBACK
2415
-  (0.1ms) BEGIN
2416
- --------------------------------------------------------------------------------------
2417
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2418
- --------------------------------------------------------------------------------------
2419
-  (0.0ms) ROLLBACK
2420
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2421
-  (0.1ms) BEGIN
2422
- -----------------------------------------------------------------------------------------
2423
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2424
- -----------------------------------------------------------------------------------------
2425
-  (0.0ms) ROLLBACK
2426
-  (0.0ms) BEGIN
2427
- --------------------------------------------------------------------------------------
2428
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2429
- --------------------------------------------------------------------------------------
2430
-  (0.0ms) ROLLBACK
2431
-  (0.0ms) BEGIN
2432
- -----------------------------------------------------------------------------------------------------
2433
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2434
- -----------------------------------------------------------------------------------------------------
2435
-  (0.1ms) ROLLBACK
2436
-  (0.1ms) BEGIN
2437
- ------------------------------------------------------------------------------
2438
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2439
- ------------------------------------------------------------------------------
2440
-  (0.1ms) ROLLBACK
2441
-  (0.0ms) BEGIN
2442
- ---------------------------------------------------------------------------------------------
2443
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2444
- ---------------------------------------------------------------------------------------------
2445
-  (0.0ms) ROLLBACK
2446
-  (0.0ms) BEGIN
2447
- -----------------------------------------------------------------------------------------
2448
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2449
- -----------------------------------------------------------------------------------------
2450
-  (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
2451
- FROM pg_constraint c
2452
- JOIN pg_class t1 ON c.conrelid = t1.oid
2453
- JOIN pg_class t2 ON c.confrelid = t2.oid
2454
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2455
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2456
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2457
- WHERE c.contype = 'f'
2458
- AND t1.relname = 'comments'
2459
- AND t3.nspname = ANY (current_schemas(false))
2460
- ORDER BY c.conname
2461
- 
2462
-  (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
2463
- FROM pg_constraint c
2464
- JOIN pg_class t1 ON c.conrelid = t1.oid
2465
- JOIN pg_class t2 ON c.confrelid = t2.oid
2466
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2467
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2468
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2469
- WHERE c.contype = 'f'
2470
- AND t1.relname = 'users'
2471
- AND t3.nspname = ANY (current_schemas(false))
2472
- ORDER BY c.conname
2473
-
2474
-  (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
2475
- FROM pg_constraint c
2476
- JOIN pg_class t1 ON c.conrelid = t1.oid
2477
- JOIN pg_class t2 ON c.confrelid = t2.oid
2478
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2479
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2480
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2481
- WHERE c.contype = 'f'
2482
- AND t1.relname = 'users'
2483
- AND t3.nspname = ANY (current_schemas(false))
2484
- ORDER BY c.conname
2485
- 
2486
-  (0.1ms) ROLLBACK
2487
- ActiveRecord::SchemaMigration Load (1.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
2488
-  (0.2ms) BEGIN
2489
- -----------------------------------------------------------------------------------------
2490
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2491
- -----------------------------------------------------------------------------------------
2492
-  (0.1ms) ROLLBACK
2493
-  (0.0ms) BEGIN
2494
- -----------------------------------------------------------------------------------------------------
2495
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2496
- -----------------------------------------------------------------------------------------------------
2497
-  (0.0ms) ROLLBACK
2498
-  (0.0ms) BEGIN
2499
- -----------------------------------------------------------------------------------------
2500
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2501
- -----------------------------------------------------------------------------------------
2502
-  (2.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
2503
- FROM pg_constraint c
2504
- JOIN pg_class t1 ON c.conrelid = t1.oid
2505
- JOIN pg_class t2 ON c.confrelid = t2.oid
2506
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2507
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2508
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2509
- WHERE c.contype = 'f'
2510
- AND t1.relname = 'comments'
2511
- AND t3.nspname = ANY (current_schemas(false))
2512
- ORDER BY c.conname
2513
- 
2514
-  (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
2515
- FROM pg_constraint c
2516
- JOIN pg_class t1 ON c.conrelid = t1.oid
2517
- JOIN pg_class t2 ON c.confrelid = t2.oid
2518
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2519
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2520
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2521
- WHERE c.contype = 'f'
2522
- AND t1.relname = 'users'
2523
- AND t3.nspname = ANY (current_schemas(false))
2524
- ORDER BY c.conname
2525
-
2526
-  (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
2527
- FROM pg_constraint c
2528
- JOIN pg_class t1 ON c.conrelid = t1.oid
2529
- JOIN pg_class t2 ON c.confrelid = t2.oid
2530
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2531
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2532
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2533
- WHERE c.contype = 'f'
2534
- AND t1.relname = 'users'
2535
- AND t3.nspname = ANY (current_schemas(false))
2536
- ORDER BY c.conname
2537
- 
2538
-  (0.1ms) ROLLBACK
2539
-  (0.1ms) BEGIN
2540
- --------------------------------------------------------------------------------------
2541
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2542
- --------------------------------------------------------------------------------------
2543
-  (0.0ms) ROLLBACK
2544
-  (0.0ms) BEGIN
2545
- ---------------------------------------------------------------------------------------------
2546
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2547
- ---------------------------------------------------------------------------------------------
2548
-  (0.0ms) ROLLBACK
2549
-  (0.0ms) BEGIN
2550
- ------------------------------------------------------------------------------
2551
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2552
- ------------------------------------------------------------------------------
2553
-  (0.0ms) ROLLBACK
2554
- ActiveRecord::SchemaMigration Load (1.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
2555
-  (0.2ms) BEGIN
2556
- --------------------------------------------------------------------------------------
2557
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2558
- --------------------------------------------------------------------------------------
2559
-  (0.0ms) ROLLBACK
2560
-  (0.0ms) BEGIN
2561
- ---------------------------------------------------------------------------------------------
2562
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2563
- ---------------------------------------------------------------------------------------------
2564
-  (0.0ms) ROLLBACK
2565
-  (0.0ms) BEGIN
2566
- ------------------------------------------------------------------------------
2567
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2568
- ------------------------------------------------------------------------------
2569
-  (0.0ms) ROLLBACK
2570
-  (0.0ms) BEGIN
2571
- -----------------------------------------------------------------------------------------
2572
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2573
- -----------------------------------------------------------------------------------------
2574
-  (0.1ms) ROLLBACK
2575
-  (0.0ms) BEGIN
2576
- -----------------------------------------------------------------------------------------------------
2577
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2578
- -----------------------------------------------------------------------------------------------------
2579
-  (0.0ms) ROLLBACK
2580
-  (0.0ms) BEGIN
2581
- -----------------------------------------------------------------------------------------
2582
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2583
- -----------------------------------------------------------------------------------------
2584
-  (6.6ms) 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
2585
- FROM pg_constraint c
2586
- JOIN pg_class t1 ON c.conrelid = t1.oid
2587
- JOIN pg_class t2 ON c.confrelid = t2.oid
2588
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2589
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2590
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2591
- WHERE c.contype = 'f'
2592
- AND t1.relname = 'comments'
2593
- AND t3.nspname = ANY (current_schemas(false))
2594
- ORDER BY c.conname
2595
- 
2596
-  (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
2597
- FROM pg_constraint c
2598
- JOIN pg_class t1 ON c.conrelid = t1.oid
2599
- JOIN pg_class t2 ON c.confrelid = t2.oid
2600
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2601
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2602
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2603
- WHERE c.contype = 'f'
2604
- AND t1.relname = 'users'
2605
- AND t3.nspname = ANY (current_schemas(false))
2606
- ORDER BY c.conname
2607
-
2608
-  (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
2609
- FROM pg_constraint c
2610
- JOIN pg_class t1 ON c.conrelid = t1.oid
2611
- JOIN pg_class t2 ON c.confrelid = t2.oid
2612
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2613
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2614
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2615
- WHERE c.contype = 'f'
2616
- AND t1.relname = 'users'
2617
- AND t3.nspname = ANY (current_schemas(false))
2618
- ORDER BY c.conname
2619
- 
2620
-  (0.1ms) ROLLBACK
2621
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2622
-  (0.1ms) BEGIN
2623
- -----------------------------------------------------------------------------------------
2624
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2625
- -----------------------------------------------------------------------------------------
2626
-  (0.0ms) ROLLBACK
2627
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2628
-  (0.1ms) BEGIN
2629
- -----------------------------------------------------------------------------------------
2630
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2631
- -----------------------------------------------------------------------------------------
2632
-  (0.1ms) ROLLBACK
2633
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2634
-  (0.2ms) BEGIN
2635
- --------------------------------------------------------------------------------------
2636
- ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
2637
- --------------------------------------------------------------------------------------
2638
-  (0.0ms) ROLLBACK
2639
-  (0.0ms) BEGIN
2640
- -----------------------------------------------------------------------------------------
2641
- ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
2642
- -----------------------------------------------------------------------------------------
2643
-  (0.0ms) ROLLBACK
2644
-  (0.1ms) BEGIN
2645
- ------------------------------------------------------------------------------
2646
- ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
2647
- ------------------------------------------------------------------------------
2648
-  (0.0ms) ROLLBACK
2649
-  (0.0ms) BEGIN
2650
- -----------------------------------------------------------------------------------------------------
2651
- ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
2652
- -----------------------------------------------------------------------------------------------------
2653
-  (0.0ms) ROLLBACK
2654
-  (0.0ms) BEGIN
2655
- ---------------------------------------------------------------------------------------------
2656
- ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
2657
- ---------------------------------------------------------------------------------------------
2658
-  (0.0ms) ROLLBACK
2659
-  (0.0ms) BEGIN
2660
- -----------------------------------------------------------------------------------------
2661
- ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
2662
- -----------------------------------------------------------------------------------------
2663
-  (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
2664
- FROM pg_constraint c
2665
- JOIN pg_class t1 ON c.conrelid = t1.oid
2666
- JOIN pg_class t2 ON c.confrelid = t2.oid
2667
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2668
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2669
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2670
- WHERE c.contype = 'f'
2671
- AND t1.relname = 'comments'
2672
- AND t3.nspname = ANY (current_schemas(false))
2673
- ORDER BY c.conname
2674
- 
2675
-  (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
2676
- FROM pg_constraint c
2677
- JOIN pg_class t1 ON c.conrelid = t1.oid
2678
- JOIN pg_class t2 ON c.confrelid = t2.oid
2679
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2680
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2681
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2682
- WHERE c.contype = 'f'
2683
- AND t1.relname = 'users'
2684
- AND t3.nspname = ANY (current_schemas(false))
2685
- ORDER BY c.conname
2686
-
2687
-  (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
2688
- FROM pg_constraint c
2689
- JOIN pg_class t1 ON c.conrelid = t1.oid
2690
- JOIN pg_class t2 ON c.confrelid = t2.oid
2691
- JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
2692
- JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
2693
- JOIN pg_namespace t3 ON c.connamespace = t3.oid
2694
- WHERE c.contype = 'f'
2695
- AND t1.relname = 'users'
2696
- AND t3.nspname = ANY (current_schemas(false))
2697
- ORDER BY c.conname
2698
- 
2699
-  (0.1ms) ROLLBACK