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.
- checksums.yaml +4 -4
- data/README.md +19 -0
- data/lib/active_record_doctor/printers/io_printer.rb +9 -0
- data/lib/active_record_doctor/tasks/unindexed_deleted_at.rb +40 -0
- data/lib/active_record_doctor/version.rb +1 -1
- data/lib/tasks/active_record_doctor_tasks.rake +5 -0
- data/test/active_record_doctor/tasks/unindexed_deleted_at_test.rb +19 -0
- data/test/dummy/db/migrate/20160213101213_create_employers.rb +3 -1
- data/test/dummy/db/migrate/20160213101232_create_profiles.rb +3 -0
- data/test/dummy/db/schema.rb +6 -1
- data/test/dummy/log/development.log +396 -0
- data/test/dummy/log/test.log +979 -0
- data/test/support/spy_printer.rb +10 -1
- metadata +5 -2
data/test/dummy/log/test.log
CHANGED
@@ -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
|
[1m[35m (0.0ms)[0m ROLLBACK
|
1721
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1722
|
+
[1m[35m (0.2ms)[0m BEGIN
|
1723
|
+
-----------------------------------------------------------------------------------------
|
1724
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1725
|
+
-----------------------------------------------------------------------------------------
|
1726
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1727
|
+
[1m[36m (208.8ms)[0m [1mDROP DATABASE IF EXISTS "active_record_doctor_test"[0m
|
1728
|
+
[1m[35m (581.3ms)[0m CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
|
1729
|
+
[1m[36mSQL (0.2ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
1730
|
+
[1m[35m (45.2ms)[0m 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
|
+
[1m[36m (24.3ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
1732
|
+
[1m[35m (30.6ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
1733
|
+
[1m[36m (18.9ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")[0m
|
1734
|
+
[1m[35m (38.5ms)[0m 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
|
+
[1m[36m (35.8ms)[0m [1mCREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" USING btree ("first_name", "last_name")[0m
|
1736
|
+
[1m[35m (39.8ms)[0m 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
|
+
[1m[36m (18.9ms)[0m [1mCREATE INDEX "index_users_on_email" ON "users" USING btree ("email")[0m
|
1738
|
+
[1m[35m (23.8ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")
|
1739
|
+
[1m[36m (18.4ms)[0m [1mCREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")[0m
|
1740
|
+
[1m[35m (28.9ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")
|
1741
|
+
[1m[36m (32.7ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
1742
|
+
[1m[35m (23.6ms)[0m CREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
1743
|
+
[1m[36m (31.4ms)[0m [1mCREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")[0m
|
1744
|
+
[1m[35m (7.0ms)[0m ALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
1745
|
+
FOREIGN KEY ("employer_id")
|
1746
|
+
REFERENCES "employers" ("id")
|
1747
|
+
|
1748
|
+
[1m[36m (29.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL) [0m
|
1749
|
+
[1m[35m (18.1ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
1750
|
+
[1m[36m (0.4ms)[0m [1mSELECT version FROM "schema_migrations"[0m
|
1751
|
+
[1m[35m (2.2ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160604081452')
|
1752
|
+
[1m[36m (7.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101213')[0m
|
1753
|
+
[1m[35m (7.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101232')
|
1754
|
+
[1m[36m (2.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101221')[0m
|
1755
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1756
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1757
|
+
-----------------------------------------------------------------------------------------
|
1758
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1759
|
+
-----------------------------------------------------------------------------------------
|
1760
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1761
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1762
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1763
|
+
-----------------------------------------------------------------------------------------
|
1764
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1765
|
+
-----------------------------------------------------------------------------------------
|
1766
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1767
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1768
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1769
|
+
-----------------------------------------------------------------------------------------
|
1770
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1771
|
+
-----------------------------------------------------------------------------------------
|
1772
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1773
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1774
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1775
|
+
-----------------------------------------------------------------------------------------
|
1776
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1777
|
+
-----------------------------------------------------------------------------------------
|
1778
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1779
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1780
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1781
|
+
-----------------------------------------------------------------------------------------
|
1782
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1783
|
+
-----------------------------------------------------------------------------------------
|
1784
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1785
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1786
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1787
|
+
-----------------------------------------------------------------------------------------
|
1788
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1789
|
+
-----------------------------------------------------------------------------------------
|
1790
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1791
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1792
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1793
|
+
-----------------------------------------------------------------------------------------
|
1794
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1795
|
+
-----------------------------------------------------------------------------------------
|
1796
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1797
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1798
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1799
|
+
-----------------------------------------------------------------------------------------
|
1800
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1801
|
+
-----------------------------------------------------------------------------------------
|
1802
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1803
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1804
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1805
|
+
-----------------------------------------------------------------------------------------
|
1806
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1807
|
+
-----------------------------------------------------------------------------------------
|
1808
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1809
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1810
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1811
|
+
-----------------------------------------------------------------------------------------
|
1812
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1813
|
+
-----------------------------------------------------------------------------------------
|
1814
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1815
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1816
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1817
|
+
-----------------------------------------------------------------------------------------
|
1818
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1819
|
+
-----------------------------------------------------------------------------------------
|
1820
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1821
|
+
[1m[36m (213.1ms)[0m [1mDROP DATABASE IF EXISTS "active_record_doctor_test"[0m
|
1822
|
+
[1m[35m (569.5ms)[0m CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
|
1823
|
+
[1m[36mSQL (0.3ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
1824
|
+
[1m[35m (47.3ms)[0m 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
|
+
[1m[36m (17.9ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
1826
|
+
[1m[35m (41.6ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
1827
|
+
[1m[36m (18.2ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id")[0m
|
1828
|
+
[1m[35m (40.2ms)[0m CREATE INDEX "index_employers_on_name" ON "employers" USING btree ("name") WHERE (deleted_at IS NULL)
|
1829
|
+
[1m[36m (36.1ms)[0m [1mCREATE 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) [0m
|
1830
|
+
[1m[35m (22.0ms)[0m CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" USING btree ("first_name", "last_name")
|
1831
|
+
[1m[36m (50.2ms)[0m [1mCREATE 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) [0m
|
1832
|
+
[1m[35m (25.1ms)[0m CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
|
1833
|
+
[1m[36m (26.9ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")[0m
|
1834
|
+
[1m[35m (26.8ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
|
1835
|
+
[1m[36m (27.7ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")[0m
|
1836
|
+
[1m[35m (17.8ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
1837
|
+
[1m[36m (17.9ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
1838
|
+
[1m[35m (21.0ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
|
1839
|
+
[1m[36m (9.0ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
1840
|
+
FOREIGN KEY ("employer_id")
|
1841
|
+
REFERENCES "employers" ("id")
|
1842
|
+
[0m
|
1843
|
+
[1m[35m (21.2ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
1844
|
+
[1m[36m (23.5ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
1845
|
+
[1m[35m (0.3ms)[0m SELECT version FROM "schema_migrations"
|
1846
|
+
[1m[36m (2.2ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160604081452')[0m
|
1847
|
+
[1m[35m (7.6ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
|
1848
|
+
[1m[36m (8.1ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101232')[0m
|
1849
|
+
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
|
1850
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1851
|
+
[1m[35m (0.2ms)[0m BEGIN
|
1852
|
+
-----------------------------------------------------------------------------------------
|
1853
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1854
|
+
-----------------------------------------------------------------------------------------
|
1855
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
1856
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1857
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1858
|
+
-----------------------------------------------------------------------------------------
|
1859
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1860
|
+
-----------------------------------------------------------------------------------------
|
1861
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1862
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1863
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1864
|
+
-----------------------------------------------------------------------------------------
|
1865
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1866
|
+
-----------------------------------------------------------------------------------------
|
1867
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
1868
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1869
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1870
|
+
-----------------------------------------------------------------------------------------
|
1871
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1872
|
+
-----------------------------------------------------------------------------------------
|
1873
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1874
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1875
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1876
|
+
-----------------------------------------------------------------------------------------
|
1877
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1878
|
+
-----------------------------------------------------------------------------------------
|
1879
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1880
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1881
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1882
|
+
-----------------------------------------------------------------------------------------
|
1883
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1884
|
+
-----------------------------------------------------------------------------------------
|
1885
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
1886
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1887
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1888
|
+
-----------------------------------------------------------------------------------------
|
1889
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1890
|
+
-----------------------------------------------------------------------------------------
|
1891
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1892
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1893
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1894
|
+
-----------------------------------------------------------------------------------------------------
|
1895
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
1896
|
+
-----------------------------------------------------------------------------------------------------
|
1897
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
1898
|
+
[1m[35m (0.0ms)[0m BEGIN
|
1899
|
+
-----------------------------------------------------------------------------------------
|
1900
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1901
|
+
-----------------------------------------------------------------------------------------
|
1902
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1903
|
+
[1m[35m (0.0ms)[0m BEGIN
|
1904
|
+
-----------------------------------------------------------------------------------------
|
1905
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
1906
|
+
-----------------------------------------------------------------------------------------
|
1907
|
+
[1m[36m (1.9ms)[0m [1mSELECT 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
|
+
[0m
|
1919
|
+
[1m[35m (1.6ms)[0m 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
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
1943
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
1944
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1945
|
+
------------------------------------------------------------------------------
|
1946
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
1947
|
+
------------------------------------------------------------------------------
|
1948
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
1949
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
1950
|
+
--------------------------------------------------------------------------------------
|
1951
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
1952
|
+
--------------------------------------------------------------------------------------
|
1953
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
1954
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
1955
|
+
---------------------------------------------------------------------------------------------
|
1956
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
1957
|
+
---------------------------------------------------------------------------------------------
|
1958
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
1959
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1960
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1961
|
+
-----------------------------------------------------------------------------------------
|
1962
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1963
|
+
-----------------------------------------------------------------------------------------
|
1964
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1965
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1966
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1967
|
+
-----------------------------------------------------------------------------------------
|
1968
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1969
|
+
-----------------------------------------------------------------------------------------
|
1970
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1971
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1972
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1973
|
+
-----------------------------------------------------------------------------------------
|
1974
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1975
|
+
-----------------------------------------------------------------------------------------
|
1976
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
1977
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
1978
|
+
[1m[35m (0.1ms)[0m BEGIN
|
1979
|
+
-----------------------------------------------------------------------------------------
|
1980
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
1981
|
+
-----------------------------------------------------------------------------------------
|
1982
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
1983
|
+
[1m[36m (213.3ms)[0m [1mDROP DATABASE IF EXISTS "active_record_doctor_test"[0m
|
1984
|
+
[1m[35m (597.5ms)[0m CREATE DATABASE "active_record_doctor_test" ENCODING = 'unicode'
|
1985
|
+
[1m[36mSQL (0.1ms)[0m [1mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
1986
|
+
[1m[35m (63.1ms)[0m 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
|
+
[1m[36m (25.3ms)[0m [1mCREATE INDEX "index_comments_on_commentable_type_and_commentable_id" ON "comments" USING btree ("commentable_type", "commentable_id")[0m
|
1988
|
+
[1m[35m (48.3ms)[0m CREATE TABLE "employers" ("id" serial primary key, "name" character varying, "deleted_at" timestamp, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
|
1989
|
+
[1m[36m (25.0ms)[0m [1mCREATE INDEX "index_employers_on_id" ON "employers" USING btree ("id") WHERE (deleted_at IS NULL)[0m
|
1990
|
+
[1m[35m (25.3ms)[0m CREATE INDEX "index_employers_on_name" ON "employers" USING btree ("name") WHERE (deleted_at IS NULL)
|
1991
|
+
[1m[36m (40.5ms)[0m [1mCREATE 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) [0m
|
1992
|
+
[1m[35m (28.5ms)[0m CREATE INDEX "index_profiles_on_first_name_and_last_name" ON "profiles" USING btree ("first_name", "last_name")
|
1993
|
+
[1m[36m (43.1ms)[0m [1mCREATE 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) [0m
|
1994
|
+
[1m[35m (21.7ms)[0m CREATE INDEX "index_users_on_email" ON "users" USING btree ("email")
|
1995
|
+
[1m[36m (18.7ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_email" ON "users" USING btree ("email")[0m
|
1996
|
+
[1m[35m (26.8ms)[0m CREATE INDEX "index_users_on_employer_id_and_country_code" ON "users" USING btree ("employer_id", "country_code")
|
1997
|
+
[1m[36m (28.0ms)[0m [1mCREATE INDEX "index_users_on_last_name_and_first_name_and_email" ON "users" USING btree ("last_name", "first_name", "email")[0m
|
1998
|
+
[1m[35m (21.6ms)[0m CREATE INDEX "index_users_on_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")
|
1999
|
+
[1m[36m (25.0ms)[0m [1mCREATE UNIQUE INDEX "unique_index_on_users_last_name_and_first_name" ON "users" USING btree ("last_name", "first_name")[0m
|
2000
|
+
[1m[35m (24.1ms)[0m CREATE INDEX "index_users_on_last_name" ON "users" USING btree ("last_name")
|
2001
|
+
[1m[36m (9.7ms)[0m [1mALTER TABLE "users" ADD CONSTRAINT "fk_rails_e0dbdd604c"
|
2002
|
+
FOREIGN KEY ("employer_id")
|
2003
|
+
REFERENCES "employers" ("id")
|
2004
|
+
[0m
|
2005
|
+
[1m[35m (19.0ms)[0m CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
|
2006
|
+
[1m[36m (14.7ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
2007
|
+
[1m[35m (0.2ms)[0m SELECT version FROM "schema_migrations"
|
2008
|
+
[1m[36m (7.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160604081452')[0m
|
2009
|
+
[1m[35m (2.1ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101213')
|
2010
|
+
[1m[36m (7.6ms)[0m [1mINSERT INTO "schema_migrations" (version) VALUES ('20160213101232')[0m
|
2011
|
+
[1m[35m (7.9ms)[0m INSERT INTO "schema_migrations" (version) VALUES ('20160213101221')
|
2012
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2013
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2014
|
+
-----------------------------------------------------------------------------------------
|
2015
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2016
|
+
-----------------------------------------------------------------------------------------
|
2017
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2018
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2019
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2020
|
+
---------------------------------------------------------------------------------------------
|
2021
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2022
|
+
---------------------------------------------------------------------------------------------
|
2023
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2024
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2025
|
+
-----------------------------------------------------------------------------------------
|
2026
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2027
|
+
-----------------------------------------------------------------------------------------
|
2028
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2029
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2030
|
+
-----------------------------------------------------------------------------------------------------
|
2031
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2032
|
+
-----------------------------------------------------------------------------------------------------
|
2033
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2034
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2035
|
+
--------------------------------------------------------------------------------------
|
2036
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2037
|
+
--------------------------------------------------------------------------------------
|
2038
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2039
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2040
|
+
------------------------------------------------------------------------------
|
2041
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2042
|
+
------------------------------------------------------------------------------
|
2043
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2044
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2045
|
+
-----------------------------------------------------------------------------------------
|
2046
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2047
|
+
-----------------------------------------------------------------------------------------
|
2048
|
+
[1m[36m (1.7ms)[0m [1mSELECT 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
|
+
[0m
|
2060
|
+
[1m[35m (1.5ms)[0m 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
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2084
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
2085
|
+
[1m[36mActiveRecord::SchemaMigration Load (15.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2086
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2087
|
+
-----------------------------------------------------------------------------------------
|
2088
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2089
|
+
-----------------------------------------------------------------------------------------
|
2090
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2091
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2092
|
+
------------------------------------------------------------------------------
|
2093
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2094
|
+
------------------------------------------------------------------------------
|
2095
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2096
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2097
|
+
-----------------------------------------------------------------------------------------
|
2098
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2099
|
+
-----------------------------------------------------------------------------------------
|
2100
|
+
[1m[36m (11.4ms)[0m [1mSELECT 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
|
+
[0m
|
2112
|
+
[1m[35m (12.1ms)[0m 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
|
+
[1m[36m (1.4ms)[0m [1mSELECT 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
|
+
[0m
|
2136
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
2137
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
2138
|
+
---------------------------------------------------------------------------------------------
|
2139
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2140
|
+
---------------------------------------------------------------------------------------------
|
2141
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2142
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2143
|
+
--------------------------------------------------------------------------------------
|
2144
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2145
|
+
--------------------------------------------------------------------------------------
|
2146
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2147
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2148
|
+
-----------------------------------------------------------------------------------------------------
|
2149
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2150
|
+
-----------------------------------------------------------------------------------------------------
|
2151
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2152
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2153
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2154
|
+
------------------------------------------------------------------------------
|
2155
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2156
|
+
------------------------------------------------------------------------------
|
2157
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2158
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2159
|
+
---------------------------------------------------------------------------------------------
|
2160
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2161
|
+
---------------------------------------------------------------------------------------------
|
2162
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2163
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2164
|
+
-----------------------------------------------------------------------------------------
|
2165
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2166
|
+
-----------------------------------------------------------------------------------------
|
2167
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2168
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2169
|
+
-----------------------------------------------------------------------------------------------------
|
2170
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2171
|
+
-----------------------------------------------------------------------------------------------------
|
2172
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2173
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2174
|
+
--------------------------------------------------------------------------------------
|
2175
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2176
|
+
--------------------------------------------------------------------------------------
|
2177
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2178
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2179
|
+
-----------------------------------------------------------------------------------------
|
2180
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2181
|
+
-----------------------------------------------------------------------------------------
|
2182
|
+
[1m[36m (1.8ms)[0m [1mSELECT 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
|
+
[0m
|
2194
|
+
[1m[35m (1.4ms)[0m 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
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2218
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
2219
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2220
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2221
|
+
-----------------------------------------------------------------------------------------
|
2222
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2223
|
+
-----------------------------------------------------------------------------------------
|
2224
|
+
[1m[36m (1.6ms)[0m [1mSELECT 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
|
+
[0m
|
2236
|
+
[1m[35m (1.3ms)[0m 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
|
+
[1m[36m (1.2ms)[0m [1mSELECT 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
|
+
[0m
|
2260
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2261
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
2262
|
+
-----------------------------------------------------------------------------------------
|
2263
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2264
|
+
-----------------------------------------------------------------------------------------
|
2265
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2266
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
2267
|
+
------------------------------------------------------------------------------
|
2268
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2269
|
+
------------------------------------------------------------------------------
|
2270
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2271
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2272
|
+
---------------------------------------------------------------------------------------------
|
2273
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2274
|
+
---------------------------------------------------------------------------------------------
|
2275
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2276
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2277
|
+
--------------------------------------------------------------------------------------
|
2278
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2279
|
+
--------------------------------------------------------------------------------------
|
2280
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2281
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2282
|
+
-----------------------------------------------------------------------------------------------------
|
2283
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2284
|
+
-----------------------------------------------------------------------------------------------------
|
2285
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2286
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2287
|
+
[1m[35m (0.2ms)[0m BEGIN
|
2288
|
+
--------------------------------------------------------------------------------------
|
2289
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2290
|
+
--------------------------------------------------------------------------------------
|
2291
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2292
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2293
|
+
-----------------------------------------------------------------------------------------
|
2294
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2295
|
+
-----------------------------------------------------------------------------------------
|
2296
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2297
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2298
|
+
------------------------------------------------------------------------------
|
2299
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2300
|
+
------------------------------------------------------------------------------
|
2301
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2302
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2303
|
+
-----------------------------------------------------------------------------------------
|
2304
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2305
|
+
-----------------------------------------------------------------------------------------
|
2306
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2318
|
+
[1m[35m (1.4ms)[0m 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
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2342
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2343
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2344
|
+
-----------------------------------------------------------------------------------------------------
|
2345
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2346
|
+
-----------------------------------------------------------------------------------------------------
|
2347
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2348
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2349
|
+
---------------------------------------------------------------------------------------------
|
2350
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2351
|
+
---------------------------------------------------------------------------------------------
|
2352
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2353
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2354
|
+
[1m[35m (0.2ms)[0m BEGIN
|
2355
|
+
---------------------------------------------------------------------------------------------
|
2356
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2357
|
+
---------------------------------------------------------------------------------------------
|
2358
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2359
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2360
|
+
-----------------------------------------------------------------------------------------------------
|
2361
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2362
|
+
-----------------------------------------------------------------------------------------------------
|
2363
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2364
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2365
|
+
-----------------------------------------------------------------------------------------
|
2366
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2367
|
+
-----------------------------------------------------------------------------------------
|
2368
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2369
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2370
|
+
-----------------------------------------------------------------------------------------
|
2371
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2372
|
+
-----------------------------------------------------------------------------------------
|
2373
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2385
|
+
[1m[35m (1.3ms)[0m 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
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2409
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2410
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
2411
|
+
------------------------------------------------------------------------------
|
2412
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2413
|
+
------------------------------------------------------------------------------
|
2414
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2415
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
2416
|
+
--------------------------------------------------------------------------------------
|
2417
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2418
|
+
--------------------------------------------------------------------------------------
|
2419
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2420
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2421
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2422
|
+
-----------------------------------------------------------------------------------------
|
2423
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2424
|
+
-----------------------------------------------------------------------------------------
|
2425
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2426
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2427
|
+
--------------------------------------------------------------------------------------
|
2428
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2429
|
+
--------------------------------------------------------------------------------------
|
2430
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2431
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2432
|
+
-----------------------------------------------------------------------------------------------------
|
2433
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2434
|
+
-----------------------------------------------------------------------------------------------------
|
2435
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2436
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2437
|
+
------------------------------------------------------------------------------
|
2438
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2439
|
+
------------------------------------------------------------------------------
|
2440
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2441
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2442
|
+
---------------------------------------------------------------------------------------------
|
2443
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2444
|
+
---------------------------------------------------------------------------------------------
|
2445
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2446
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2447
|
+
-----------------------------------------------------------------------------------------
|
2448
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2449
|
+
-----------------------------------------------------------------------------------------
|
2450
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2462
|
+
[1m[35m (1.5ms)[0m 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
|
+
[1m[36m (1.5ms)[0m [1mSELECT 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
|
+
[0m
|
2486
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2487
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.0ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2488
|
+
[1m[35m (0.2ms)[0m BEGIN
|
2489
|
+
-----------------------------------------------------------------------------------------
|
2490
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2491
|
+
-----------------------------------------------------------------------------------------
|
2492
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2493
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2494
|
+
-----------------------------------------------------------------------------------------------------
|
2495
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2496
|
+
-----------------------------------------------------------------------------------------------------
|
2497
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2498
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2499
|
+
-----------------------------------------------------------------------------------------
|
2500
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2501
|
+
-----------------------------------------------------------------------------------------
|
2502
|
+
[1m[36m (2.4ms)[0m [1mSELECT 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
|
+
[0m
|
2514
|
+
[1m[35m (1.4ms)[0m 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
|
+
[1m[36m (1.2ms)[0m [1mSELECT 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
|
+
[0m
|
2538
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2539
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
2540
|
+
--------------------------------------------------------------------------------------
|
2541
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2542
|
+
--------------------------------------------------------------------------------------
|
2543
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2544
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2545
|
+
---------------------------------------------------------------------------------------------
|
2546
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2547
|
+
---------------------------------------------------------------------------------------------
|
2548
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2549
|
+
[1m[36m (0.0ms)[0m [1mBEGIN[0m
|
2550
|
+
------------------------------------------------------------------------------
|
2551
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2552
|
+
------------------------------------------------------------------------------
|
2553
|
+
[1m[35m (0.0ms)[0m ROLLBACK
|
2554
|
+
[1m[36mActiveRecord::SchemaMigration Load (1.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2555
|
+
[1m[35m (0.2ms)[0m BEGIN
|
2556
|
+
--------------------------------------------------------------------------------------
|
2557
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2558
|
+
--------------------------------------------------------------------------------------
|
2559
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2560
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2561
|
+
---------------------------------------------------------------------------------------------
|
2562
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2563
|
+
---------------------------------------------------------------------------------------------
|
2564
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2565
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2566
|
+
------------------------------------------------------------------------------
|
2567
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2568
|
+
------------------------------------------------------------------------------
|
2569
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2570
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2571
|
+
-----------------------------------------------------------------------------------------
|
2572
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2573
|
+
-----------------------------------------------------------------------------------------
|
2574
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2575
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2576
|
+
-----------------------------------------------------------------------------------------------------
|
2577
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2578
|
+
-----------------------------------------------------------------------------------------------------
|
2579
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2580
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2581
|
+
-----------------------------------------------------------------------------------------
|
2582
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2583
|
+
-----------------------------------------------------------------------------------------
|
2584
|
+
[1m[36m (6.6ms)[0m [1mSELECT 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
|
+
[0m
|
2596
|
+
[1m[35m (1.4ms)[0m 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
|
+
[1m[36m (1.2ms)[0m [1mSELECT 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
|
+
[0m
|
2620
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
2621
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2622
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2623
|
+
-----------------------------------------------------------------------------------------
|
2624
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2625
|
+
-----------------------------------------------------------------------------------------
|
2626
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2627
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2628
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2629
|
+
-----------------------------------------------------------------------------------------
|
2630
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2631
|
+
-----------------------------------------------------------------------------------------
|
2632
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
2633
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2634
|
+
[1m[35m (0.2ms)[0m BEGIN
|
2635
|
+
--------------------------------------------------------------------------------------
|
2636
|
+
ActiveRecordDoctor::Tasks::ExtraneousIndexesTest: test_extraneous_indexes_are_reported
|
2637
|
+
--------------------------------------------------------------------------------------
|
2638
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2639
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2640
|
+
-----------------------------------------------------------------------------------------
|
2641
|
+
ActiveRecordDoctor::Tasks::UnindexedDeletedAtTest: test_unindexed_deleted_at_are_reported
|
2642
|
+
-----------------------------------------------------------------------------------------
|
2643
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2644
|
+
[1m[35m (0.1ms)[0m BEGIN
|
2645
|
+
------------------------------------------------------------------------------
|
2646
|
+
ActiveRecordDoctor::Printers::IOPrinterTest: test_print_unindexed_foreign_keys
|
2647
|
+
------------------------------------------------------------------------------
|
2648
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2649
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2650
|
+
-----------------------------------------------------------------------------------------------------
|
2651
|
+
ActiveRecordDoctor::Tasks::UndefinedTableReferencesTest: test_undefined_table_references_are_reported
|
2652
|
+
-----------------------------------------------------------------------------------------------------
|
2653
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2654
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2655
|
+
---------------------------------------------------------------------------------------------
|
2656
|
+
ActiveRecordDoctor::Tasks::UnindexedForeignKeysTest: test_unindexed_foreign_keys_are_reported
|
2657
|
+
---------------------------------------------------------------------------------------------
|
2658
|
+
[1m[36m (0.0ms)[0m [1mROLLBACK[0m
|
2659
|
+
[1m[35m (0.0ms)[0m BEGIN
|
2660
|
+
-----------------------------------------------------------------------------------------
|
2661
|
+
ActiveRecordDoctor::Tasks::MissingForeignKeysTest: test_missing_foreign_keys_are_reported
|
2662
|
+
-----------------------------------------------------------------------------------------
|
2663
|
+
[1m[36m (1.8ms)[0m [1mSELECT 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
|
+
[0m
|
2675
|
+
[1m[35m (1.3ms)[0m 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
|
+
[1m[36m (1.3ms)[0m [1mSELECT 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
|
+
[0m
|
2699
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|