active_record_doctor 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1718,3 +1718,982 @@ ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_re
1718
1718
  ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
1719
1719
  ---------------------------------------------------------------------------------------------
1720
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