mas-rad_core 0.0.45 → 0.0.46

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,1451 @@
1
+  (3.9ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
2
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
+ Migrating to CreateLookupFirms (20141211110031)
6
+  (0.2ms) BEGIN
7
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/danm/Work/cultivate/mas/rad/mas-rad_core/db/migrate/20141211110031_create_lookup_firms.rb:8)
8
+  (5.1ms) CREATE TABLE "lookup_firms" ("id" serial primary key, "fca_number" integer NOT NULL, "registered_name" character varying DEFAULT '' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
9
+  (0.9ms) CREATE UNIQUE INDEX "index_lookup_firms_on_fca_number" ON "lookup_firms" ("fca_number")
10
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141211110031"]]
11
+  (0.4ms) COMMIT
12
+ Migrating to CreatePrincipals (20141221140208)
13
+  (0.2ms) BEGIN
14
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block (2 levels) in change at /Users/danm/Work/cultivate/mas/rad/mas-rad_core/db/migrate/20141221140208_create_principals.rb:19)
15
+  (3.6ms) CREATE TABLE "principals" ("id" serial primary key, "fca_number" integer, "token" character varying, "website_address" character varying, "first_name" character varying, "last_name" character varying, "job_title" character varying, "email_address" character varying, "telephone_number" character varying, "confirmed_disclaimer" boolean DEFAULT 'f', "created_at" timestamp, "updated_at" timestamp)
16
+  (0.8ms) CREATE UNIQUE INDEX "index_principals_on_fca_number" ON "principals" ("fca_number")
17
+  (1.1ms) CREATE UNIQUE INDEX "index_principals_on_token" ON "principals" ("token")
18
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141221140208"]]
19
+  (0.6ms) COMMIT
20
+ Migrating to AddLastSignInAtToPrincipal (20141222150416)
21
+  (0.3ms) BEGIN
22
+  (0.6ms) ALTER TABLE "principals" ADD "last_sign_in_at" timestamp
23
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141222150416"]]
24
+  (0.4ms) COMMIT
25
+ Migrating to CreateLookupSubsidiaries (20141230112136)
26
+  (0.1ms) BEGIN
27
+  (4.3ms) CREATE TABLE "lookup_subsidiaries" ("id" serial primary key, "fca_number" integer NOT NULL, "name" character varying DEFAULT '' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
28
+  (1.1ms) CREATE INDEX "index_lookup_subsidiaries_on_fca_number" ON "lookup_subsidiaries" ("fca_number")
29
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141230112136"]]
30
+  (0.5ms) COMMIT
31
+ Migrating to RemoveLastSignInAtFromPrincipals (20150106115732)
32
+  (0.5ms) BEGIN
33
+  (1.3ms) ALTER TABLE "principals" DROP "last_sign_in_at"
34
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150106115732"]]
35
+  (0.4ms) COMMIT
36
+ Migrating to CreateLookupAdvisers (20150114144343)
37
+  (0.1ms) BEGIN
38
+  (3.2ms) CREATE TABLE "lookup_advisers" ("id" serial primary key, "reference_number" character varying NOT NULL, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
39
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114144343"]]
40
+  (0.5ms) COMMIT
41
+ Migrating to CreateFirms (20150114151447)
42
+  (0.2ms) BEGIN
43
+  (3.8ms) CREATE TABLE "firms" ("id" serial primary key, "fca_number" integer NOT NULL, "registered_name" character varying NOT NULL, "email_address" character varying, "telephone_number" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
44
+  (0.9ms) CREATE UNIQUE INDEX "index_firms_on_fca_number" ON "firms" ("fca_number")
45
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114151447"]]
46
+  (0.5ms) COMMIT
47
+ Migrating to AddAddressToFirm (20150115130949)
48
+  (0.3ms) BEGIN
49
+  (0.4ms) ALTER TABLE "firms" ADD "address_line_one" character varying
50
+  (0.3ms) ALTER TABLE "firms" ADD "address_line_two" character varying
51
+  (0.3ms) ALTER TABLE "firms" ADD "address_town" character varying
52
+  (0.3ms) ALTER TABLE "firms" ADD "address_county" character varying
53
+  (0.3ms) ALTER TABLE "firms" ADD "address_postcode" character varying
54
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150115130949"]]
55
+  (0.4ms) COMMIT
56
+ Migrating to CreateInPersonAdviceMethods (20150119102735)
57
+  (0.2ms) BEGIN
58
+  (3.9ms) CREATE TABLE "in_person_advice_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
59
+  (1.1ms) CREATE TABLE "firms_in_person_advice_methods" ("firm_id" integer NOT NULL, "in_person_advice_method_id" integer NOT NULL) 
60
+  (0.9ms) CREATE UNIQUE INDEX "firms_in_person_advice_methods_index" ON "firms_in_person_advice_methods" ("firm_id", "in_person_advice_method_id")
61
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119102735"]]
62
+  (0.5ms) COMMIT
63
+ Migrating to CreateOtherAdviceMethods (20150119111754)
64
+  (0.2ms) BEGIN
65
+  (3.4ms) CREATE TABLE "other_advice_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
66
+  (0.6ms) CREATE TABLE "firms_other_advice_methods" ("firm_id" integer NOT NULL, "other_advice_method_id" integer NOT NULL) 
67
+  (1.3ms) CREATE UNIQUE INDEX "firms_other_advice_methods_index" ON "firms_other_advice_methods" ("firm_id", "other_advice_method_id")
68
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119111754"]]
69
+  (0.5ms) COMMIT
70
+ Migrating to AddFreeInitialMeetingToFirm (20150119114218)
71
+  (0.2ms) BEGIN
72
+  (0.3ms) ALTER TABLE "firms" ADD "free_initial_meeting" boolean
73
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119114218"]]
74
+  (0.4ms) COMMIT
75
+ Migrating to CreateInitialMeetingDurations (20150119125208)
76
+  (0.2ms) BEGIN
77
+  (3.2ms) CREATE TABLE "initial_meeting_durations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
78
+  (0.3ms) ALTER TABLE "firms" ADD "initial_meeting_duration_id" integer
79
+  (0.9ms) CREATE INDEX "index_firms_on_initial_meeting_duration_id" ON "firms" ("initial_meeting_duration_id")
80
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119125208"]]
81
+  (0.5ms) COMMIT
82
+ Migrating to CreateInitialAdviceFeeStructures (20150119152325)
83
+  (0.2ms) BEGIN
84
+  (3.6ms) CREATE TABLE "initial_advice_fee_structures" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
85
+  (1.3ms) CREATE TABLE "firms_initial_advice_fee_structures" ("firm_id" integer NOT NULL, "initial_advice_fee_structure_id" integer NOT NULL) 
86
+  (0.9ms) CREATE UNIQUE INDEX "firms_initial_advice_fee_structures_index" ON "firms_initial_advice_fee_structures" ("firm_id", "initial_advice_fee_structure_id")
87
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152325"]]
88
+  (0.6ms) COMMIT
89
+ Migrating to CreateOngoingAdviceFeeStructures (20150119152336)
90
+  (0.3ms) BEGIN
91
+  (4.3ms) CREATE TABLE "ongoing_advice_fee_structures" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
92
+  (0.7ms) CREATE TABLE "firms_ongoing_advice_fee_structures" ("firm_id" integer NOT NULL, "ongoing_advice_fee_structure_id" integer NOT NULL) 
93
+  (1.3ms) CREATE UNIQUE INDEX "firms_ongoing_advice_fee_structures_index" ON "firms_ongoing_advice_fee_structures" ("firm_id", "ongoing_advice_fee_structure_id")
94
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152336"]]
95
+  (0.6ms) COMMIT
96
+ Migrating to CreateAllowedPaymentMethods (20150120133717)
97
+  (0.4ms) BEGIN
98
+  (5.0ms) CREATE TABLE "allowed_payment_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
99
+  (1.1ms) CREATE TABLE "allowed_payment_methods_firms" ("firm_id" integer NOT NULL, "allowed_payment_method_id" integer NOT NULL) 
100
+  (1.3ms) CREATE UNIQUE INDEX "firms_allowed_payment_methods_index" ON "allowed_payment_methods_firms" ("firm_id", "allowed_payment_method_id")
101
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120133717"]]
102
+  (0.5ms) COMMIT
103
+ Migrating to AddMinimumFixedFeeToFirm (20150120141928)
104
+  (0.3ms) BEGIN
105
+  (0.9ms) ALTER TABLE "firms" ADD "minimum_fixed_fee" integer
106
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120141928"]]
107
+  (0.4ms) COMMIT
108
+ Migrating to CreateInvestmentSizes (20150120150738)
109
+  (0.2ms) BEGIN
110
+  (5.0ms) CREATE TABLE "investment_sizes" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
111
+  (1.2ms) CREATE TABLE "firms_investment_sizes" ("firm_id" integer NOT NULL, "investment_size_id" integer NOT NULL) 
112
+  (2.2ms) CREATE UNIQUE INDEX "firms_investment_sizes_index" ON "firms_investment_sizes" ("firm_id", "investment_size_id")
113
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120150738"]]
114
+  (0.5ms) COMMIT
115
+ Migrating to CreateAdvisers (20150121110757)
116
+  (0.3ms) BEGIN
117
+  (4.9ms) CREATE TABLE "advisers" ("id" serial primary key, "reference_number" character varying NOT NULL, "name" character varying NOT NULL, "firm_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
118
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121110757"]]
119
+  (0.4ms) COMMIT
120
+ Migrating to AddBusinessIncomeBreakdownFieldsToFirm (20150121123437)
121
+  (0.2ms) BEGIN
122
+  (0.4ms) ALTER TABLE "firms" ADD "retirement_income_products_percent" integer
123
+  (0.3ms) ALTER TABLE "firms" ADD "pension_transfer_percent" integer
124
+  (0.3ms) ALTER TABLE "firms" ADD "long_term_care_percent" integer
125
+  (0.3ms) ALTER TABLE "firms" ADD "equity_release_percent" integer
126
+  (0.3ms) ALTER TABLE "firms" ADD "inheritance_tax_and_estate_planning_percent" integer
127
+  (0.2ms) ALTER TABLE "firms" ADD "wills_and_probate_percent" integer
128
+  (0.3ms) ALTER TABLE "firms" ADD "other_percent" integer
129
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121123437"]]
130
+  (0.4ms) COMMIT
131
+ Migrating to CreateQualifications (20150121134845)
132
+  (0.2ms) BEGIN
133
+  (4.5ms) CREATE TABLE "qualifications" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
134
+  (0.7ms) CREATE TABLE "advisers_qualifications" ("adviser_id" integer NOT NULL, "qualification_id" integer NOT NULL) 
135
+  (1.1ms) CREATE UNIQUE INDEX "advisers_qualifications_index" ON "advisers_qualifications" ("adviser_id", "qualification_id")
136
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121134845"]]
137
+  (0.5ms) COMMIT
138
+ Migrating to CreateAccreditations (20150121154458)
139
+  (0.3ms) BEGIN
140
+  (3.8ms) CREATE TABLE "accreditations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
141
+  (0.7ms) CREATE TABLE "accreditations_advisers" ("adviser_id" integer NOT NULL, "accreditation_id" integer NOT NULL) 
142
+  (0.9ms) CREATE UNIQUE INDEX "advisers_accreditations_index" ON "accreditations_advisers" ("adviser_id", "accreditation_id")
143
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121154458"]]
144
+  (0.6ms) COMMIT
145
+ Migrating to CreateProfessionalStandings (20150121173015)
146
+  (0.4ms) BEGIN
147
+  (4.2ms) CREATE TABLE "professional_standings" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
148
+  (0.8ms) CREATE TABLE "advisers_professional_standings" ("adviser_id" integer NOT NULL, "professional_standing_id" integer NOT NULL) 
149
+  (1.0ms) CREATE UNIQUE INDEX "advisers_professional_standings_index" ON "advisers_professional_standings" ("adviser_id", "professional_standing_id")
150
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121173015"]]
151
+  (0.5ms) COMMIT
152
+ Migrating to CreateProfessionalBodies (20150121181341)
153
+  (0.7ms) BEGIN
154
+  (4.4ms) CREATE TABLE "professional_bodies" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
155
+  (1.1ms) CREATE TABLE "advisers_professional_bodies" ("adviser_id" integer NOT NULL, "professional_body_id" integer NOT NULL) 
156
+  (1.2ms) CREATE UNIQUE INDEX "advisers_professional_bodies_index" ON "advisers_professional_bodies" ("adviser_id", "professional_body_id")
157
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121181341"]]
158
+  (0.6ms) COMMIT
159
+ Migrating to AddConfirmedDisclaimerToAdvisers (20150121183728)
160
+  (0.3ms) BEGIN
161
+  (0.5ms) ALTER TABLE "advisers" ADD "confirmed_disclaimer" boolean NOT NULL
162
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121183728"]]
163
+  (0.5ms) COMMIT
164
+ Migrating to AddGeographicalFieldsToAdviser (20150124124350)
165
+  (0.2ms) BEGIN
166
+  (4.6ms) ALTER TABLE "advisers" ADD "postcode" character varying DEFAULT '' NOT NULL
167
+  (3.6ms) ALTER TABLE "advisers" ADD "travel_distance" integer DEFAULT 0 NOT NULL
168
+  (3.8ms) ALTER TABLE "advisers" ADD "covers_whole_of_uk" boolean DEFAULT 'f' NOT NULL
169
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150124124350"]]
170
+  (1.9ms) COMMIT
171
+ Migrating to AddParentIdToFirms (20150125145457)
172
+  (0.4ms) BEGIN
173
+  (0.5ms) ALTER TABLE "firms" ADD "parent_id" integer
174
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125145457"]]
175
+  (0.4ms) COMMIT
176
+ Migrating to RemoveUniqueConstraintFromFirmsFcaNumber (20150125164156)
177
+  (0.2ms) BEGIN
178
+  (1.0ms) DROP INDEX "index_firms_on_fca_number"
179
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125164156"]]
180
+  (0.6ms) COMMIT
181
+ Migrating to AddOrderingOnReferenceData (20150127084858)
182
+  (0.2ms) BEGIN
183
+  (5.5ms) ALTER TABLE "accreditations" ADD "order" integer DEFAULT 0 NOT NULL
184
+ Accreditation Load (0.9ms) SELECT "accreditations".* FROM "accreditations" ORDER BY "accreditations"."id" ASC
185
+  (7.8ms) ALTER TABLE "allowed_payment_methods" ADD "order" integer DEFAULT 0 NOT NULL
186
+ AllowedPaymentMethod Load (0.8ms) SELECT "allowed_payment_methods".* FROM "allowed_payment_methods" ORDER BY "allowed_payment_methods"."id" ASC
187
+  (5.8ms) ALTER TABLE "in_person_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
188
+ InPersonAdviceMethod Load (0.7ms) SELECT "in_person_advice_methods".* FROM "in_person_advice_methods" ORDER BY "in_person_advice_methods"."id" ASC
189
+  (8.1ms) ALTER TABLE "initial_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
190
+ InitialAdviceFeeStructure Load (0.6ms) SELECT "initial_advice_fee_structures".* FROM "initial_advice_fee_structures" ORDER BY "initial_advice_fee_structures"."id" ASC
191
+  (5.3ms) ALTER TABLE "initial_meeting_durations" ADD "order" integer DEFAULT 0 NOT NULL
192
+ InitialMeetingDuration Load (0.4ms) SELECT "initial_meeting_durations".* FROM "initial_meeting_durations" ORDER BY "initial_meeting_durations"."id" ASC
193
+  (3.6ms) ALTER TABLE "investment_sizes" ADD "order" integer DEFAULT 0 NOT NULL
194
+ InvestmentSize Load (0.7ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."id" ASC
195
+  (4.3ms) ALTER TABLE "ongoing_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
196
+ OngoingAdviceFeeStructure Load (0.5ms) SELECT "ongoing_advice_fee_structures".* FROM "ongoing_advice_fee_structures" ORDER BY "ongoing_advice_fee_structures"."id" ASC
197
+  (4.8ms) ALTER TABLE "other_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
198
+ OtherAdviceMethod Load (0.5ms) SELECT "other_advice_methods".* FROM "other_advice_methods" ORDER BY "other_advice_methods"."id" ASC
199
+  (3.6ms) ALTER TABLE "professional_bodies" ADD "order" integer DEFAULT 0 NOT NULL
200
+ ProfessionalBody Load (0.4ms) SELECT "professional_bodies".* FROM "professional_bodies" ORDER BY "professional_bodies"."id" ASC
201
+  (3.7ms) ALTER TABLE "professional_standings" ADD "order" integer DEFAULT 0 NOT NULL
202
+ ProfessionalStanding Load (0.5ms) SELECT "professional_standings".* FROM "professional_standings" ORDER BY "professional_standings"."id" ASC
203
+  (4.5ms) ALTER TABLE "qualifications" ADD "order" integer DEFAULT 0 NOT NULL
204
+ Qualification Load (0.5ms) SELECT "qualifications".* FROM "qualifications" ORDER BY "qualifications"."id" ASC
205
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150127084858"]]
206
+  (2.9ms) COMMIT
207
+ Migrating to RemoveCoversWholeOfUkFromAdvisers (20150209144836)
208
+  (0.8ms) BEGIN
209
+ Adviser Load (1.0ms) SELECT "advisers".* FROM "advisers" WHERE "advisers"."covers_whole_of_uk" = 't' ORDER BY "advisers"."id" ASC LIMIT 1000
210
+  (0.7ms) ALTER TABLE "advisers" DROP "covers_whole_of_uk"
211
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150209144836"]]
212
+  (0.5ms) COMMIT
213
+ Migrating to AddLatitudeAndLongitudeToFirm (20150210113610)
214
+  (0.2ms) BEGIN
215
+  (0.9ms) ALTER TABLE "firms" ADD "latitude" float
216
+  (1.3ms) ALTER TABLE "firms" ADD "longitude" float
217
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150210113610"]]
218
+  (0.4ms) COMMIT
219
+ Migrating to AddLatitudeAndLongitudeToAdvisers (20150222092417)
220
+  (0.2ms) BEGIN
221
+  (0.6ms) ALTER TABLE "advisers" ADD "latitude" float
222
+  (0.4ms) ALTER TABLE "advisers" ADD "longitude" float
223
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150222092417"]]
224
+  (0.4ms) COMMIT
225
+ Migrating to AddCyNameToOtherAdviceMethods (20150228095315)
226
+  (0.2ms) BEGIN
227
+  (1.2ms) ALTER TABLE "other_advice_methods" ADD "cy_name" character varying
228
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150228095315"]]
229
+  (0.5ms) COMMIT
230
+ Migrating to AddCyNameToInvestmentSize (20150305150719)
231
+  (0.2ms) BEGIN
232
+  (0.5ms) ALTER TABLE "investment_sizes" ADD "cy_name" character varying
233
+ InvestmentSize Load (0.6ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."order" ASC
234
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150305150719"]]
235
+  (0.4ms) COMMIT
236
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
237
+  (3.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
238
+ FROM pg_constraint c
239
+ JOIN pg_class t1 ON c.conrelid = t1.oid
240
+ JOIN pg_class t2 ON c.confrelid = t2.oid
241
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
242
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
243
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
244
+ WHERE c.contype = 'f'
245
+ AND t1.relname = 'accreditations'
246
+ AND t3.nspname = ANY (current_schemas(false))
247
+ ORDER BY c.conname
248
+ 
249
+  (3.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
250
+ FROM pg_constraint c
251
+ JOIN pg_class t1 ON c.conrelid = t1.oid
252
+ JOIN pg_class t2 ON c.confrelid = t2.oid
253
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
254
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
255
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
256
+ WHERE c.contype = 'f'
257
+ AND t1.relname = 'accreditations_advisers'
258
+ AND t3.nspname = ANY (current_schemas(false))
259
+ ORDER BY c.conname
260
+
261
+  (3.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
262
+ FROM pg_constraint c
263
+ JOIN pg_class t1 ON c.conrelid = t1.oid
264
+ JOIN pg_class t2 ON c.confrelid = t2.oid
265
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
266
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
267
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
268
+ WHERE c.contype = 'f'
269
+ AND t1.relname = 'advisers'
270
+ AND t3.nspname = ANY (current_schemas(false))
271
+ ORDER BY c.conname
272
+ 
273
+  (3.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
274
+ FROM pg_constraint c
275
+ JOIN pg_class t1 ON c.conrelid = t1.oid
276
+ JOIN pg_class t2 ON c.confrelid = t2.oid
277
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
278
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
279
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
280
+ WHERE c.contype = 'f'
281
+ AND t1.relname = 'advisers_professional_bodies'
282
+ AND t3.nspname = ANY (current_schemas(false))
283
+ ORDER BY c.conname
284
+
285
+  (3.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
286
+ FROM pg_constraint c
287
+ JOIN pg_class t1 ON c.conrelid = t1.oid
288
+ JOIN pg_class t2 ON c.confrelid = t2.oid
289
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
290
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
291
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
292
+ WHERE c.contype = 'f'
293
+ AND t1.relname = 'advisers_professional_standings'
294
+ AND t3.nspname = ANY (current_schemas(false))
295
+ ORDER BY c.conname
296
+ 
297
+  (3.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
298
+ FROM pg_constraint c
299
+ JOIN pg_class t1 ON c.conrelid = t1.oid
300
+ JOIN pg_class t2 ON c.confrelid = t2.oid
301
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
302
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
303
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
304
+ WHERE c.contype = 'f'
305
+ AND t1.relname = 'advisers_qualifications'
306
+ AND t3.nspname = ANY (current_schemas(false))
307
+ ORDER BY c.conname
308
+
309
+  (3.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
310
+ FROM pg_constraint c
311
+ JOIN pg_class t1 ON c.conrelid = t1.oid
312
+ JOIN pg_class t2 ON c.confrelid = t2.oid
313
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
314
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
315
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
316
+ WHERE c.contype = 'f'
317
+ AND t1.relname = 'allowed_payment_methods'
318
+ AND t3.nspname = ANY (current_schemas(false))
319
+ ORDER BY c.conname
320
+ 
321
+  (3.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
322
+ FROM pg_constraint c
323
+ JOIN pg_class t1 ON c.conrelid = t1.oid
324
+ JOIN pg_class t2 ON c.confrelid = t2.oid
325
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
326
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
327
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
328
+ WHERE c.contype = 'f'
329
+ AND t1.relname = 'allowed_payment_methods_firms'
330
+ AND t3.nspname = ANY (current_schemas(false))
331
+ ORDER BY c.conname
332
+
333
+  (3.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
334
+ FROM pg_constraint c
335
+ JOIN pg_class t1 ON c.conrelid = t1.oid
336
+ JOIN pg_class t2 ON c.confrelid = t2.oid
337
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
338
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
339
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
340
+ WHERE c.contype = 'f'
341
+ AND t1.relname = 'firms'
342
+ AND t3.nspname = ANY (current_schemas(false))
343
+ ORDER BY c.conname
344
+ 
345
+  (3.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
346
+ FROM pg_constraint c
347
+ JOIN pg_class t1 ON c.conrelid = t1.oid
348
+ JOIN pg_class t2 ON c.confrelid = t2.oid
349
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
350
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
351
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
352
+ WHERE c.contype = 'f'
353
+ AND t1.relname = 'firms_in_person_advice_methods'
354
+ AND t3.nspname = ANY (current_schemas(false))
355
+ ORDER BY c.conname
356
+
357
+  (3.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
358
+ FROM pg_constraint c
359
+ JOIN pg_class t1 ON c.conrelid = t1.oid
360
+ JOIN pg_class t2 ON c.confrelid = t2.oid
361
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
362
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
363
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
364
+ WHERE c.contype = 'f'
365
+ AND t1.relname = 'firms_initial_advice_fee_structures'
366
+ AND t3.nspname = ANY (current_schemas(false))
367
+ ORDER BY c.conname
368
+ 
369
+  (3.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
370
+ FROM pg_constraint c
371
+ JOIN pg_class t1 ON c.conrelid = t1.oid
372
+ JOIN pg_class t2 ON c.confrelid = t2.oid
373
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
374
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
375
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
376
+ WHERE c.contype = 'f'
377
+ AND t1.relname = 'firms_investment_sizes'
378
+ AND t3.nspname = ANY (current_schemas(false))
379
+ ORDER BY c.conname
380
+
381
+  (3.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
382
+ FROM pg_constraint c
383
+ JOIN pg_class t1 ON c.conrelid = t1.oid
384
+ JOIN pg_class t2 ON c.confrelid = t2.oid
385
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
386
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
387
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
388
+ WHERE c.contype = 'f'
389
+ AND t1.relname = 'firms_ongoing_advice_fee_structures'
390
+ AND t3.nspname = ANY (current_schemas(false))
391
+ ORDER BY c.conname
392
+ 
393
+  (3.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
394
+ FROM pg_constraint c
395
+ JOIN pg_class t1 ON c.conrelid = t1.oid
396
+ JOIN pg_class t2 ON c.confrelid = t2.oid
397
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
398
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
399
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
400
+ WHERE c.contype = 'f'
401
+ AND t1.relname = 'firms_other_advice_methods'
402
+ AND t3.nspname = ANY (current_schemas(false))
403
+ ORDER BY c.conname
404
+
405
+  (3.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
406
+ FROM pg_constraint c
407
+ JOIN pg_class t1 ON c.conrelid = t1.oid
408
+ JOIN pg_class t2 ON c.confrelid = t2.oid
409
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
410
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
411
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
412
+ WHERE c.contype = 'f'
413
+ AND t1.relname = 'in_person_advice_methods'
414
+ AND t3.nspname = ANY (current_schemas(false))
415
+ ORDER BY c.conname
416
+ 
417
+  (3.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
418
+ FROM pg_constraint c
419
+ JOIN pg_class t1 ON c.conrelid = t1.oid
420
+ JOIN pg_class t2 ON c.confrelid = t2.oid
421
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
422
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
423
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
424
+ WHERE c.contype = 'f'
425
+ AND t1.relname = 'initial_advice_fee_structures'
426
+ AND t3.nspname = ANY (current_schemas(false))
427
+ ORDER BY c.conname
428
+
429
+  (3.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
430
+ FROM pg_constraint c
431
+ JOIN pg_class t1 ON c.conrelid = t1.oid
432
+ JOIN pg_class t2 ON c.confrelid = t2.oid
433
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
434
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
435
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
436
+ WHERE c.contype = 'f'
437
+ AND t1.relname = 'initial_meeting_durations'
438
+ AND t3.nspname = ANY (current_schemas(false))
439
+ ORDER BY c.conname
440
+ 
441
+  (3.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
442
+ FROM pg_constraint c
443
+ JOIN pg_class t1 ON c.conrelid = t1.oid
444
+ JOIN pg_class t2 ON c.confrelid = t2.oid
445
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
446
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
447
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
448
+ WHERE c.contype = 'f'
449
+ AND t1.relname = 'investment_sizes'
450
+ AND t3.nspname = ANY (current_schemas(false))
451
+ ORDER BY c.conname
452
+
453
+  (3.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
454
+ FROM pg_constraint c
455
+ JOIN pg_class t1 ON c.conrelid = t1.oid
456
+ JOIN pg_class t2 ON c.confrelid = t2.oid
457
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
458
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
459
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
460
+ WHERE c.contype = 'f'
461
+ AND t1.relname = 'lookup_advisers'
462
+ AND t3.nspname = ANY (current_schemas(false))
463
+ ORDER BY c.conname
464
+ 
465
+  (3.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
466
+ FROM pg_constraint c
467
+ JOIN pg_class t1 ON c.conrelid = t1.oid
468
+ JOIN pg_class t2 ON c.confrelid = t2.oid
469
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
470
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
471
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
472
+ WHERE c.contype = 'f'
473
+ AND t1.relname = 'lookup_firms'
474
+ AND t3.nspname = ANY (current_schemas(false))
475
+ ORDER BY c.conname
476
+
477
+  (3.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
478
+ FROM pg_constraint c
479
+ JOIN pg_class t1 ON c.conrelid = t1.oid
480
+ JOIN pg_class t2 ON c.confrelid = t2.oid
481
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
482
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
483
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
484
+ WHERE c.contype = 'f'
485
+ AND t1.relname = 'lookup_subsidiaries'
486
+ AND t3.nspname = ANY (current_schemas(false))
487
+ ORDER BY c.conname
488
+ 
489
+  (3.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
490
+ FROM pg_constraint c
491
+ JOIN pg_class t1 ON c.conrelid = t1.oid
492
+ JOIN pg_class t2 ON c.confrelid = t2.oid
493
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
494
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
495
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
496
+ WHERE c.contype = 'f'
497
+ AND t1.relname = 'ongoing_advice_fee_structures'
498
+ AND t3.nspname = ANY (current_schemas(false))
499
+ ORDER BY c.conname
500
+
501
+  (3.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
502
+ FROM pg_constraint c
503
+ JOIN pg_class t1 ON c.conrelid = t1.oid
504
+ JOIN pg_class t2 ON c.confrelid = t2.oid
505
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
506
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
507
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
508
+ WHERE c.contype = 'f'
509
+ AND t1.relname = 'other_advice_methods'
510
+ AND t3.nspname = ANY (current_schemas(false))
511
+ ORDER BY c.conname
512
+ 
513
+  (3.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
514
+ FROM pg_constraint c
515
+ JOIN pg_class t1 ON c.conrelid = t1.oid
516
+ JOIN pg_class t2 ON c.confrelid = t2.oid
517
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
518
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
519
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
520
+ WHERE c.contype = 'f'
521
+ AND t1.relname = 'principals'
522
+ AND t3.nspname = ANY (current_schemas(false))
523
+ ORDER BY c.conname
524
+
525
+  (3.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
526
+ FROM pg_constraint c
527
+ JOIN pg_class t1 ON c.conrelid = t1.oid
528
+ JOIN pg_class t2 ON c.confrelid = t2.oid
529
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
530
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
531
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
532
+ WHERE c.contype = 'f'
533
+ AND t1.relname = 'professional_bodies'
534
+ AND t3.nspname = ANY (current_schemas(false))
535
+ ORDER BY c.conname
536
+ 
537
+  (3.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
538
+ FROM pg_constraint c
539
+ JOIN pg_class t1 ON c.conrelid = t1.oid
540
+ JOIN pg_class t2 ON c.confrelid = t2.oid
541
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
542
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
543
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
544
+ WHERE c.contype = 'f'
545
+ AND t1.relname = 'professional_standings'
546
+ AND t3.nspname = ANY (current_schemas(false))
547
+ ORDER BY c.conname
548
+
549
+  (3.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
550
+ FROM pg_constraint c
551
+ JOIN pg_class t1 ON c.conrelid = t1.oid
552
+ JOIN pg_class t2 ON c.confrelid = t2.oid
553
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
554
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
555
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
556
+ WHERE c.contype = 'f'
557
+ AND t1.relname = 'qualifications'
558
+ AND t3.nspname = ANY (current_schemas(false))
559
+ ORDER BY c.conname
560
+ 
561
+  (3.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
562
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
563
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
564
+ Migrating to CreateLookupFirms (20141211110031)
565
+  (0.2ms) BEGIN
566
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/danm/Work/cultivate/mas/rad/mas-rad_core/db/migrate/20141211110031_create_lookup_firms.rb:8)
567
+  (4.3ms) CREATE TABLE "lookup_firms" ("id" serial primary key, "fca_number" integer NOT NULL, "registered_name" character varying DEFAULT '' NOT NULL, "created_at" timestamp, "updated_at" timestamp) 
568
+  (0.9ms) CREATE UNIQUE INDEX "index_lookup_firms_on_fca_number" ON "lookup_firms" ("fca_number")
569
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141211110031"]]
570
+  (0.6ms) COMMIT
571
+ Migrating to CreatePrincipals (20141221140208)
572
+  (0.3ms) BEGIN
573
+ DEPRECATION WARNING: `#timestamp` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block (2 levels) in change at /Users/danm/Work/cultivate/mas/rad/mas-rad_core/db/migrate/20141221140208_create_principals.rb:19)
574
+  (3.8ms) CREATE TABLE "principals" ("id" serial primary key, "fca_number" integer, "token" character varying, "website_address" character varying, "first_name" character varying, "last_name" character varying, "job_title" character varying, "email_address" character varying, "telephone_number" character varying, "confirmed_disclaimer" boolean DEFAULT 'f', "created_at" timestamp, "updated_at" timestamp)
575
+  (0.8ms) CREATE UNIQUE INDEX "index_principals_on_fca_number" ON "principals" ("fca_number")
576
+  (0.9ms) CREATE UNIQUE INDEX "index_principals_on_token" ON "principals" ("token")
577
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141221140208"]]
578
+  (0.5ms) COMMIT
579
+ Migrating to AddLastSignInAtToPrincipal (20141222150416)
580
+  (0.3ms) BEGIN
581
+  (0.5ms) ALTER TABLE "principals" ADD "last_sign_in_at" timestamp
582
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141222150416"]]
583
+  (0.3ms) COMMIT
584
+ Migrating to CreateLookupSubsidiaries (20141230112136)
585
+  (0.2ms) BEGIN
586
+  (5.4ms) CREATE TABLE "lookup_subsidiaries" ("id" serial primary key, "fca_number" integer NOT NULL, "name" character varying DEFAULT '' NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
587
+  (0.9ms) CREATE INDEX "index_lookup_subsidiaries_on_fca_number" ON "lookup_subsidiaries" ("fca_number")
588
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141230112136"]]
589
+  (0.5ms) COMMIT
590
+ Migrating to RemoveLastSignInAtFromPrincipals (20150106115732)
591
+  (0.3ms) BEGIN
592
+  (0.7ms) ALTER TABLE "principals" DROP "last_sign_in_at"
593
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150106115732"]]
594
+  (0.4ms) COMMIT
595
+ Migrating to CreateLookupAdvisers (20150114144343)
596
+  (0.2ms) BEGIN
597
+  (3.6ms) CREATE TABLE "lookup_advisers" ("id" serial primary key, "reference_number" character varying NOT NULL, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
598
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114144343"]]
599
+  (0.5ms) COMMIT
600
+ Migrating to CreateFirms (20150114151447)
601
+  (0.3ms) BEGIN
602
+  (3.5ms) CREATE TABLE "firms" ("id" serial primary key, "fca_number" integer NOT NULL, "registered_name" character varying NOT NULL, "email_address" character varying, "telephone_number" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) 
603
+  (0.7ms) CREATE UNIQUE INDEX "index_firms_on_fca_number" ON "firms" ("fca_number")
604
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114151447"]]
605
+  (0.6ms) COMMIT
606
+ Migrating to AddAddressToFirm (20150115130949)
607
+  (0.3ms) BEGIN
608
+  (0.5ms) ALTER TABLE "firms" ADD "address_line_one" character varying
609
+  (0.3ms) ALTER TABLE "firms" ADD "address_line_two" character varying
610
+  (0.3ms) ALTER TABLE "firms" ADD "address_town" character varying
611
+  (0.4ms) ALTER TABLE "firms" ADD "address_county" character varying
612
+  (0.3ms) ALTER TABLE "firms" ADD "address_postcode" character varying
613
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150115130949"]]
614
+  (0.4ms) COMMIT
615
+ Migrating to CreateInPersonAdviceMethods (20150119102735)
616
+  (0.2ms) BEGIN
617
+  (3.6ms) CREATE TABLE "in_person_advice_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
618
+  (1.1ms) CREATE TABLE "firms_in_person_advice_methods" ("firm_id" integer NOT NULL, "in_person_advice_method_id" integer NOT NULL) 
619
+  (2.2ms) CREATE UNIQUE INDEX "firms_in_person_advice_methods_index" ON "firms_in_person_advice_methods" ("firm_id", "in_person_advice_method_id")
620
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119102735"]]
621
+  (0.7ms) COMMIT
622
+ Migrating to CreateOtherAdviceMethods (20150119111754)
623
+  (0.5ms) BEGIN
624
+  (4.8ms) CREATE TABLE "other_advice_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
625
+  (1.0ms) CREATE TABLE "firms_other_advice_methods" ("firm_id" integer NOT NULL, "other_advice_method_id" integer NOT NULL) 
626
+  (1.2ms) CREATE UNIQUE INDEX "firms_other_advice_methods_index" ON "firms_other_advice_methods" ("firm_id", "other_advice_method_id")
627
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119111754"]]
628
+  (0.5ms) COMMIT
629
+ Migrating to AddFreeInitialMeetingToFirm (20150119114218)
630
+  (0.4ms) BEGIN
631
+  (0.5ms) ALTER TABLE "firms" ADD "free_initial_meeting" boolean
632
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119114218"]]
633
+  (0.4ms) COMMIT
634
+ Migrating to CreateInitialMeetingDurations (20150119125208)
635
+  (0.2ms) BEGIN
636
+  (6.5ms) CREATE TABLE "initial_meeting_durations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
637
+  (0.5ms) ALTER TABLE "firms" ADD "initial_meeting_duration_id" integer
638
+  (2.4ms) CREATE INDEX "index_firms_on_initial_meeting_duration_id" ON "firms" ("initial_meeting_duration_id")
639
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119125208"]]
640
+  (1.4ms) COMMIT
641
+ Migrating to CreateInitialAdviceFeeStructures (20150119152325)
642
+  (0.4ms) BEGIN
643
+  (4.7ms) CREATE TABLE "initial_advice_fee_structures" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
644
+  (1.4ms) CREATE TABLE "firms_initial_advice_fee_structures" ("firm_id" integer NOT NULL, "initial_advice_fee_structure_id" integer NOT NULL) 
645
+  (1.6ms) CREATE UNIQUE INDEX "firms_initial_advice_fee_structures_index" ON "firms_initial_advice_fee_structures" ("firm_id", "initial_advice_fee_structure_id")
646
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152325"]]
647
+  (1.6ms) COMMIT
648
+ Migrating to CreateOngoingAdviceFeeStructures (20150119152336)
649
+  (0.4ms) BEGIN
650
+  (4.8ms) CREATE TABLE "ongoing_advice_fee_structures" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
651
+  (1.1ms) CREATE TABLE "firms_ongoing_advice_fee_structures" ("firm_id" integer NOT NULL, "ongoing_advice_fee_structure_id" integer NOT NULL) 
652
+  (1.5ms) CREATE UNIQUE INDEX "firms_ongoing_advice_fee_structures_index" ON "firms_ongoing_advice_fee_structures" ("firm_id", "ongoing_advice_fee_structure_id")
653
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152336"]]
654
+  (0.5ms) COMMIT
655
+ Migrating to CreateAllowedPaymentMethods (20150120133717)
656
+  (0.4ms) BEGIN
657
+  (5.4ms) CREATE TABLE "allowed_payment_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
658
+  (1.1ms) CREATE TABLE "allowed_payment_methods_firms" ("firm_id" integer NOT NULL, "allowed_payment_method_id" integer NOT NULL) 
659
+  (1.4ms) CREATE UNIQUE INDEX "firms_allowed_payment_methods_index" ON "allowed_payment_methods_firms" ("firm_id", "allowed_payment_method_id")
660
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120133717"]]
661
+  (0.5ms) COMMIT
662
+ Migrating to AddMinimumFixedFeeToFirm (20150120141928)
663
+  (0.4ms) BEGIN
664
+  (0.6ms) ALTER TABLE "firms" ADD "minimum_fixed_fee" integer
665
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120141928"]]
666
+  (0.4ms) COMMIT
667
+ Migrating to CreateInvestmentSizes (20150120150738)
668
+  (0.2ms) BEGIN
669
+  (7.2ms) CREATE TABLE "investment_sizes" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
670
+  (1.1ms) CREATE TABLE "firms_investment_sizes" ("firm_id" integer NOT NULL, "investment_size_id" integer NOT NULL) 
671
+  (1.8ms) CREATE UNIQUE INDEX "firms_investment_sizes_index" ON "firms_investment_sizes" ("firm_id", "investment_size_id")
672
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120150738"]]
673
+  (0.5ms) COMMIT
674
+ Migrating to CreateAdvisers (20150121110757)
675
+  (0.4ms) BEGIN
676
+  (5.8ms) CREATE TABLE "advisers" ("id" serial primary key, "reference_number" character varying NOT NULL, "name" character varying NOT NULL, "firm_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
677
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121110757"]]
678
+  (1.4ms) COMMIT
679
+ Migrating to AddBusinessIncomeBreakdownFieldsToFirm (20150121123437)
680
+  (0.5ms) BEGIN
681
+  (0.6ms) ALTER TABLE "firms" ADD "retirement_income_products_percent" integer
682
+  (0.5ms) ALTER TABLE "firms" ADD "pension_transfer_percent" integer
683
+  (0.4ms) ALTER TABLE "firms" ADD "long_term_care_percent" integer
684
+  (0.7ms) ALTER TABLE "firms" ADD "equity_release_percent" integer
685
+  (0.4ms) ALTER TABLE "firms" ADD "inheritance_tax_and_estate_planning_percent" integer
686
+  (0.4ms) ALTER TABLE "firms" ADD "wills_and_probate_percent" integer
687
+  (0.5ms) ALTER TABLE "firms" ADD "other_percent" integer
688
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121123437"]]
689
+  (0.5ms) COMMIT
690
+ Migrating to CreateQualifications (20150121134845)
691
+  (0.2ms) BEGIN
692
+  (4.8ms) CREATE TABLE "qualifications" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
693
+  (1.4ms) CREATE TABLE "advisers_qualifications" ("adviser_id" integer NOT NULL, "qualification_id" integer NOT NULL) 
694
+  (1.6ms) CREATE UNIQUE INDEX "advisers_qualifications_index" ON "advisers_qualifications" ("adviser_id", "qualification_id")
695
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121134845"]]
696
+  (0.6ms) COMMIT
697
+ Migrating to CreateAccreditations (20150121154458)
698
+  (0.4ms) BEGIN
699
+  (6.6ms) CREATE TABLE "accreditations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
700
+  (1.0ms) CREATE TABLE "accreditations_advisers" ("adviser_id" integer NOT NULL, "accreditation_id" integer NOT NULL) 
701
+  (1.4ms) CREATE UNIQUE INDEX "advisers_accreditations_index" ON "accreditations_advisers" ("adviser_id", "accreditation_id")
702
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121154458"]]
703
+  (0.6ms) COMMIT
704
+ Migrating to CreateProfessionalStandings (20150121173015)
705
+  (0.5ms) BEGIN
706
+  (7.5ms) CREATE TABLE "professional_standings" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
707
+  (1.2ms) CREATE TABLE "advisers_professional_standings" ("adviser_id" integer NOT NULL, "professional_standing_id" integer NOT NULL) 
708
+  (1.3ms) CREATE UNIQUE INDEX "advisers_professional_standings_index" ON "advisers_professional_standings" ("adviser_id", "professional_standing_id")
709
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121173015"]]
710
+  (0.5ms) COMMIT
711
+ Migrating to CreateProfessionalBodies (20150121181341)
712
+  (0.3ms) BEGIN
713
+  (5.2ms) CREATE TABLE "professional_bodies" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
714
+  (2.2ms) CREATE TABLE "advisers_professional_bodies" ("adviser_id" integer NOT NULL, "professional_body_id" integer NOT NULL) 
715
+  (1.2ms) CREATE UNIQUE INDEX "advisers_professional_bodies_index" ON "advisers_professional_bodies" ("adviser_id", "professional_body_id")
716
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121181341"]]
717
+  (0.5ms) COMMIT
718
+ Migrating to AddConfirmedDisclaimerToAdvisers (20150121183728)
719
+  (0.4ms) BEGIN
720
+  (0.7ms) ALTER TABLE "advisers" ADD "confirmed_disclaimer" boolean NOT NULL
721
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121183728"]]
722
+  (0.4ms) COMMIT
723
+ Migrating to AddGeographicalFieldsToAdviser (20150124124350)
724
+  (0.2ms) BEGIN
725
+  (12.2ms) ALTER TABLE "advisers" ADD "postcode" character varying DEFAULT '' NOT NULL
726
+  (5.5ms) ALTER TABLE "advisers" ADD "travel_distance" integer DEFAULT 0 NOT NULL
727
+  (4.9ms) ALTER TABLE "advisers" ADD "covers_whole_of_uk" boolean DEFAULT 'f' NOT NULL
728
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150124124350"]]
729
+  (2.2ms) COMMIT
730
+ Migrating to AddParentIdToFirms (20150125145457)
731
+  (0.4ms) BEGIN
732
+  (0.6ms) ALTER TABLE "firms" ADD "parent_id" integer
733
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125145457"]]
734
+  (0.5ms) COMMIT
735
+ Migrating to RemoveUniqueConstraintFromFirmsFcaNumber (20150125164156)
736
+  (0.2ms) BEGIN
737
+  (0.6ms) DROP INDEX "index_firms_on_fca_number"
738
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125164156"]]
739
+  (0.9ms) COMMIT
740
+ Migrating to AddOrderingOnReferenceData (20150127084858)
741
+  (0.3ms) BEGIN
742
+  (5.2ms) ALTER TABLE "accreditations" ADD "order" integer DEFAULT 0 NOT NULL
743
+ Accreditation Load (1.6ms) SELECT "accreditations".* FROM "accreditations" ORDER BY "accreditations"."id" ASC
744
+  (5.7ms) ALTER TABLE "allowed_payment_methods" ADD "order" integer DEFAULT 0 NOT NULL
745
+ AllowedPaymentMethod Load (0.7ms) SELECT "allowed_payment_methods".* FROM "allowed_payment_methods" ORDER BY "allowed_payment_methods"."id" ASC
746
+  (5.2ms) ALTER TABLE "in_person_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
747
+ InPersonAdviceMethod Load (0.7ms) SELECT "in_person_advice_methods".* FROM "in_person_advice_methods" ORDER BY "in_person_advice_methods"."id" ASC
748
+  (4.9ms) ALTER TABLE "initial_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
749
+ InitialAdviceFeeStructure Load (0.7ms) SELECT "initial_advice_fee_structures".* FROM "initial_advice_fee_structures" ORDER BY "initial_advice_fee_structures"."id" ASC
750
+  (5.0ms) ALTER TABLE "initial_meeting_durations" ADD "order" integer DEFAULT 0 NOT NULL
751
+ InitialMeetingDuration Load (0.7ms) SELECT "initial_meeting_durations".* FROM "initial_meeting_durations" ORDER BY "initial_meeting_durations"."id" ASC
752
+  (4.9ms) ALTER TABLE "investment_sizes" ADD "order" integer DEFAULT 0 NOT NULL
753
+ InvestmentSize Load (1.2ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."id" ASC
754
+  (5.8ms) ALTER TABLE "ongoing_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
755
+ OngoingAdviceFeeStructure Load (0.7ms) SELECT "ongoing_advice_fee_structures".* FROM "ongoing_advice_fee_structures" ORDER BY "ongoing_advice_fee_structures"."id" ASC
756
+  (6.0ms) ALTER TABLE "other_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
757
+ OtherAdviceMethod Load (1.1ms) SELECT "other_advice_methods".* FROM "other_advice_methods" ORDER BY "other_advice_methods"."id" ASC
758
+  (5.1ms) ALTER TABLE "professional_bodies" ADD "order" integer DEFAULT 0 NOT NULL
759
+ ProfessionalBody Load (0.6ms) SELECT "professional_bodies".* FROM "professional_bodies" ORDER BY "professional_bodies"."id" ASC
760
+  (7.9ms) ALTER TABLE "professional_standings" ADD "order" integer DEFAULT 0 NOT NULL
761
+ ProfessionalStanding Load (0.7ms) SELECT "professional_standings".* FROM "professional_standings" ORDER BY "professional_standings"."id" ASC
762
+  (6.4ms) ALTER TABLE "qualifications" ADD "order" integer DEFAULT 0 NOT NULL
763
+ Qualification Load (0.6ms) SELECT "qualifications".* FROM "qualifications" ORDER BY "qualifications"."id" ASC
764
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150127084858"]]
765
+  (5.1ms) COMMIT
766
+ Migrating to RemoveCoversWholeOfUkFromAdvisers (20150209144836)
767
+  (1.4ms) BEGIN
768
+ Adviser Load (1.0ms) SELECT "advisers".* FROM "advisers" WHERE "advisers"."covers_whole_of_uk" = 't' ORDER BY "advisers"."id" ASC LIMIT 1000
769
+  (0.8ms) ALTER TABLE "advisers" DROP "covers_whole_of_uk"
770
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150209144836"]]
771
+  (0.4ms) COMMIT
772
+ Migrating to AddLatitudeAndLongitudeToFirm (20150210113610)
773
+  (0.3ms) BEGIN
774
+  (0.8ms) ALTER TABLE "firms" ADD "latitude" float
775
+  (0.9ms) ALTER TABLE "firms" ADD "longitude" float
776
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150210113610"]]
777
+  (0.4ms) COMMIT
778
+ Migrating to AddLatitudeAndLongitudeToAdvisers (20150222092417)
779
+  (0.2ms) BEGIN
780
+  (0.5ms) ALTER TABLE "advisers" ADD "latitude" float
781
+  (0.4ms) ALTER TABLE "advisers" ADD "longitude" float
782
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150222092417"]]
783
+  (0.4ms) COMMIT
784
+ Migrating to AddCyNameToOtherAdviceMethods (20150228095315)
785
+  (0.2ms) BEGIN
786
+  (0.5ms) ALTER TABLE "other_advice_methods" ADD "cy_name" character varying
787
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150228095315"]]
788
+  (0.4ms) COMMIT
789
+ Migrating to AddCyNameToInvestmentSize (20150305150719)
790
+  (0.2ms) BEGIN
791
+  (0.6ms) ALTER TABLE "investment_sizes" ADD "cy_name" character varying
792
+ InvestmentSize Load (0.6ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."order" ASC
793
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150305150719"]]
794
+  (0.4ms) COMMIT
795
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
796
+  (6.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
797
+ FROM pg_constraint c
798
+ JOIN pg_class t1 ON c.conrelid = t1.oid
799
+ JOIN pg_class t2 ON c.confrelid = t2.oid
800
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
801
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
802
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
803
+ WHERE c.contype = 'f'
804
+ AND t1.relname = 'accreditations'
805
+ AND t3.nspname = ANY (current_schemas(false))
806
+ ORDER BY c.conname
807
+ 
808
+  (7.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
809
+ FROM pg_constraint c
810
+ JOIN pg_class t1 ON c.conrelid = t1.oid
811
+ JOIN pg_class t2 ON c.confrelid = t2.oid
812
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
813
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
814
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
815
+ WHERE c.contype = 'f'
816
+ AND t1.relname = 'accreditations_advisers'
817
+ AND t3.nspname = ANY (current_schemas(false))
818
+ ORDER BY c.conname
819
+
820
+  (6.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
821
+ FROM pg_constraint c
822
+ JOIN pg_class t1 ON c.conrelid = t1.oid
823
+ JOIN pg_class t2 ON c.confrelid = t2.oid
824
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
825
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
826
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
827
+ WHERE c.contype = 'f'
828
+ AND t1.relname = 'advisers'
829
+ AND t3.nspname = ANY (current_schemas(false))
830
+ ORDER BY c.conname
831
+ 
832
+  (5.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
833
+ FROM pg_constraint c
834
+ JOIN pg_class t1 ON c.conrelid = t1.oid
835
+ JOIN pg_class t2 ON c.confrelid = t2.oid
836
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
837
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
838
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
839
+ WHERE c.contype = 'f'
840
+ AND t1.relname = 'advisers_professional_bodies'
841
+ AND t3.nspname = ANY (current_schemas(false))
842
+ ORDER BY c.conname
843
+
844
+  (5.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
845
+ FROM pg_constraint c
846
+ JOIN pg_class t1 ON c.conrelid = t1.oid
847
+ JOIN pg_class t2 ON c.confrelid = t2.oid
848
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
849
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
850
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
851
+ WHERE c.contype = 'f'
852
+ AND t1.relname = 'advisers_professional_standings'
853
+ AND t3.nspname = ANY (current_schemas(false))
854
+ ORDER BY c.conname
855
+ 
856
+  (5.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
857
+ FROM pg_constraint c
858
+ JOIN pg_class t1 ON c.conrelid = t1.oid
859
+ JOIN pg_class t2 ON c.confrelid = t2.oid
860
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
861
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
862
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
863
+ WHERE c.contype = 'f'
864
+ AND t1.relname = 'advisers_qualifications'
865
+ AND t3.nspname = ANY (current_schemas(false))
866
+ ORDER BY c.conname
867
+
868
+  (5.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
869
+ FROM pg_constraint c
870
+ JOIN pg_class t1 ON c.conrelid = t1.oid
871
+ JOIN pg_class t2 ON c.confrelid = t2.oid
872
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
873
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
874
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
875
+ WHERE c.contype = 'f'
876
+ AND t1.relname = 'allowed_payment_methods'
877
+ AND t3.nspname = ANY (current_schemas(false))
878
+ ORDER BY c.conname
879
+ 
880
+  (5.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
881
+ FROM pg_constraint c
882
+ JOIN pg_class t1 ON c.conrelid = t1.oid
883
+ JOIN pg_class t2 ON c.confrelid = t2.oid
884
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
885
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
886
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
887
+ WHERE c.contype = 'f'
888
+ AND t1.relname = 'allowed_payment_methods_firms'
889
+ AND t3.nspname = ANY (current_schemas(false))
890
+ ORDER BY c.conname
891
+
892
+  (5.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
893
+ FROM pg_constraint c
894
+ JOIN pg_class t1 ON c.conrelid = t1.oid
895
+ JOIN pg_class t2 ON c.confrelid = t2.oid
896
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
897
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
898
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
899
+ WHERE c.contype = 'f'
900
+ AND t1.relname = 'firms'
901
+ AND t3.nspname = ANY (current_schemas(false))
902
+ ORDER BY c.conname
903
+ 
904
+  (5.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
905
+ FROM pg_constraint c
906
+ JOIN pg_class t1 ON c.conrelid = t1.oid
907
+ JOIN pg_class t2 ON c.confrelid = t2.oid
908
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
909
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
910
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
911
+ WHERE c.contype = 'f'
912
+ AND t1.relname = 'firms_in_person_advice_methods'
913
+ AND t3.nspname = ANY (current_schemas(false))
914
+ ORDER BY c.conname
915
+
916
+  (5.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
917
+ FROM pg_constraint c
918
+ JOIN pg_class t1 ON c.conrelid = t1.oid
919
+ JOIN pg_class t2 ON c.confrelid = t2.oid
920
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
921
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
922
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
923
+ WHERE c.contype = 'f'
924
+ AND t1.relname = 'firms_initial_advice_fee_structures'
925
+ AND t3.nspname = ANY (current_schemas(false))
926
+ ORDER BY c.conname
927
+ 
928
+  (5.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
929
+ FROM pg_constraint c
930
+ JOIN pg_class t1 ON c.conrelid = t1.oid
931
+ JOIN pg_class t2 ON c.confrelid = t2.oid
932
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
933
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
934
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
935
+ WHERE c.contype = 'f'
936
+ AND t1.relname = 'firms_investment_sizes'
937
+ AND t3.nspname = ANY (current_schemas(false))
938
+ ORDER BY c.conname
939
+
940
+  (5.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
941
+ FROM pg_constraint c
942
+ JOIN pg_class t1 ON c.conrelid = t1.oid
943
+ JOIN pg_class t2 ON c.confrelid = t2.oid
944
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
945
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
946
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
947
+ WHERE c.contype = 'f'
948
+ AND t1.relname = 'firms_ongoing_advice_fee_structures'
949
+ AND t3.nspname = ANY (current_schemas(false))
950
+ ORDER BY c.conname
951
+ 
952
+  (5.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
953
+ FROM pg_constraint c
954
+ JOIN pg_class t1 ON c.conrelid = t1.oid
955
+ JOIN pg_class t2 ON c.confrelid = t2.oid
956
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
957
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
958
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
959
+ WHERE c.contype = 'f'
960
+ AND t1.relname = 'firms_other_advice_methods'
961
+ AND t3.nspname = ANY (current_schemas(false))
962
+ ORDER BY c.conname
963
+
964
+  (5.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
965
+ FROM pg_constraint c
966
+ JOIN pg_class t1 ON c.conrelid = t1.oid
967
+ JOIN pg_class t2 ON c.confrelid = t2.oid
968
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
969
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
970
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
971
+ WHERE c.contype = 'f'
972
+ AND t1.relname = 'in_person_advice_methods'
973
+ AND t3.nspname = ANY (current_schemas(false))
974
+ ORDER BY c.conname
975
+ 
976
+  (5.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
977
+ FROM pg_constraint c
978
+ JOIN pg_class t1 ON c.conrelid = t1.oid
979
+ JOIN pg_class t2 ON c.confrelid = t2.oid
980
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
981
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
982
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
983
+ WHERE c.contype = 'f'
984
+ AND t1.relname = 'initial_advice_fee_structures'
985
+ AND t3.nspname = ANY (current_schemas(false))
986
+ ORDER BY c.conname
987
+
988
+  (5.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
989
+ FROM pg_constraint c
990
+ JOIN pg_class t1 ON c.conrelid = t1.oid
991
+ JOIN pg_class t2 ON c.confrelid = t2.oid
992
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
993
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
994
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
995
+ WHERE c.contype = 'f'
996
+ AND t1.relname = 'initial_meeting_durations'
997
+ AND t3.nspname = ANY (current_schemas(false))
998
+ ORDER BY c.conname
999
+ 
1000
+  (5.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
1001
+ FROM pg_constraint c
1002
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1003
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1004
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1005
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1006
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1007
+ WHERE c.contype = 'f'
1008
+ AND t1.relname = 'investment_sizes'
1009
+ AND t3.nspname = ANY (current_schemas(false))
1010
+ ORDER BY c.conname
1011
+
1012
+  (5.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
1013
+ FROM pg_constraint c
1014
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1015
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1016
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1017
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1018
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1019
+ WHERE c.contype = 'f'
1020
+ AND t1.relname = 'lookup_advisers'
1021
+ AND t3.nspname = ANY (current_schemas(false))
1022
+ ORDER BY c.conname
1023
+ 
1024
+  (5.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
1025
+ FROM pg_constraint c
1026
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1027
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1028
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1029
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1030
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1031
+ WHERE c.contype = 'f'
1032
+ AND t1.relname = 'lookup_firms'
1033
+ AND t3.nspname = ANY (current_schemas(false))
1034
+ ORDER BY c.conname
1035
+
1036
+  (5.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
1037
+ FROM pg_constraint c
1038
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1039
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1040
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1041
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1042
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1043
+ WHERE c.contype = 'f'
1044
+ AND t1.relname = 'lookup_subsidiaries'
1045
+ AND t3.nspname = ANY (current_schemas(false))
1046
+ ORDER BY c.conname
1047
+ 
1048
+  (5.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
1049
+ FROM pg_constraint c
1050
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1051
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1052
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1053
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1054
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1055
+ WHERE c.contype = 'f'
1056
+ AND t1.relname = 'ongoing_advice_fee_structures'
1057
+ AND t3.nspname = ANY (current_schemas(false))
1058
+ ORDER BY c.conname
1059
+
1060
+  (5.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
1061
+ FROM pg_constraint c
1062
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1063
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1064
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1065
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1066
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1067
+ WHERE c.contype = 'f'
1068
+ AND t1.relname = 'other_advice_methods'
1069
+ AND t3.nspname = ANY (current_schemas(false))
1070
+ ORDER BY c.conname
1071
+ 
1072
+  (5.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
1073
+ FROM pg_constraint c
1074
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1075
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1076
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1077
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1078
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1079
+ WHERE c.contype = 'f'
1080
+ AND t1.relname = 'principals'
1081
+ AND t3.nspname = ANY (current_schemas(false))
1082
+ ORDER BY c.conname
1083
+
1084
+  (5.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
1085
+ FROM pg_constraint c
1086
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1087
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1088
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1089
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1090
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1091
+ WHERE c.contype = 'f'
1092
+ AND t1.relname = 'professional_bodies'
1093
+ AND t3.nspname = ANY (current_schemas(false))
1094
+ ORDER BY c.conname
1095
+ 
1096
+  (5.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
1097
+ FROM pg_constraint c
1098
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1099
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1100
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1101
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1102
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1103
+ WHERE c.contype = 'f'
1104
+ AND t1.relname = 'professional_standings'
1105
+ AND t3.nspname = ANY (current_schemas(false))
1106
+ ORDER BY c.conname
1107
+
1108
+  (5.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
1109
+ FROM pg_constraint c
1110
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1111
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1112
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1113
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1114
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1115
+ WHERE c.contype = 'f'
1116
+ AND t1.relname = 'qualifications'
1117
+ AND t3.nspname = ANY (current_schemas(false))
1118
+ ORDER BY c.conname
1119
+ 
1120
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
1121
+ ActiveRecord::SchemaMigration Load (2.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1122
+ Migrating to AddIndexOnLookupAdvisersReferenceNumber (20150423154732)
1123
+  (0.2ms) BEGIN
1124
+  (12.2ms) CREATE UNIQUE INDEX "index_lookup_advisers_on_reference_number" ON "lookup_advisers" ("reference_number")
1125
+ SQL (0.7ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150423154732"]]
1126
+  (0.5ms) COMMIT
1127
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
1128
+  (4.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
1129
+ FROM pg_constraint c
1130
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1131
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1132
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1133
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1134
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1135
+ WHERE c.contype = 'f'
1136
+ AND t1.relname = 'accreditations'
1137
+ AND t3.nspname = ANY (current_schemas(false))
1138
+ ORDER BY c.conname
1139
+ 
1140
+  (3.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
1141
+ FROM pg_constraint c
1142
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1143
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1144
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1145
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1146
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1147
+ WHERE c.contype = 'f'
1148
+ AND t1.relname = 'accreditations_advisers'
1149
+ AND t3.nspname = ANY (current_schemas(false))
1150
+ ORDER BY c.conname
1151
+
1152
+  (3.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
1153
+ FROM pg_constraint c
1154
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1155
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1156
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1157
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1158
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1159
+ WHERE c.contype = 'f'
1160
+ AND t1.relname = 'advisers'
1161
+ AND t3.nspname = ANY (current_schemas(false))
1162
+ ORDER BY c.conname
1163
+ 
1164
+  (3.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
1165
+ FROM pg_constraint c
1166
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1167
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1168
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1169
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1170
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1171
+ WHERE c.contype = 'f'
1172
+ AND t1.relname = 'advisers_professional_bodies'
1173
+ AND t3.nspname = ANY (current_schemas(false))
1174
+ ORDER BY c.conname
1175
+
1176
+  (3.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
1177
+ FROM pg_constraint c
1178
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1179
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1180
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1181
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1182
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1183
+ WHERE c.contype = 'f'
1184
+ AND t1.relname = 'advisers_professional_standings'
1185
+ AND t3.nspname = ANY (current_schemas(false))
1186
+ ORDER BY c.conname
1187
+ 
1188
+  (3.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
1189
+ FROM pg_constraint c
1190
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1191
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1192
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1193
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1194
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1195
+ WHERE c.contype = 'f'
1196
+ AND t1.relname = 'advisers_qualifications'
1197
+ AND t3.nspname = ANY (current_schemas(false))
1198
+ ORDER BY c.conname
1199
+
1200
+  (3.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
1201
+ FROM pg_constraint c
1202
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1203
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1204
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1205
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1206
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1207
+ WHERE c.contype = 'f'
1208
+ AND t1.relname = 'allowed_payment_methods'
1209
+ AND t3.nspname = ANY (current_schemas(false))
1210
+ ORDER BY c.conname
1211
+ 
1212
+  (3.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
1213
+ FROM pg_constraint c
1214
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1215
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1216
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1217
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1218
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1219
+ WHERE c.contype = 'f'
1220
+ AND t1.relname = 'allowed_payment_methods_firms'
1221
+ AND t3.nspname = ANY (current_schemas(false))
1222
+ ORDER BY c.conname
1223
+
1224
+  (3.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
1225
+ FROM pg_constraint c
1226
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1227
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1228
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1229
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1230
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1231
+ WHERE c.contype = 'f'
1232
+ AND t1.relname = 'firms'
1233
+ AND t3.nspname = ANY (current_schemas(false))
1234
+ ORDER BY c.conname
1235
+ 
1236
+  (3.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
1237
+ FROM pg_constraint c
1238
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1239
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1240
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1241
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1242
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1243
+ WHERE c.contype = 'f'
1244
+ AND t1.relname = 'firms_in_person_advice_methods'
1245
+ AND t3.nspname = ANY (current_schemas(false))
1246
+ ORDER BY c.conname
1247
+
1248
+  (3.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
1249
+ FROM pg_constraint c
1250
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1251
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1252
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1253
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1254
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1255
+ WHERE c.contype = 'f'
1256
+ AND t1.relname = 'firms_initial_advice_fee_structures'
1257
+ AND t3.nspname = ANY (current_schemas(false))
1258
+ ORDER BY c.conname
1259
+ 
1260
+  (3.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
1261
+ FROM pg_constraint c
1262
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1263
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1264
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1265
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1266
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1267
+ WHERE c.contype = 'f'
1268
+ AND t1.relname = 'firms_investment_sizes'
1269
+ AND t3.nspname = ANY (current_schemas(false))
1270
+ ORDER BY c.conname
1271
+
1272
+  (3.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
1273
+ FROM pg_constraint c
1274
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1275
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1276
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1277
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1278
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1279
+ WHERE c.contype = 'f'
1280
+ AND t1.relname = 'firms_ongoing_advice_fee_structures'
1281
+ AND t3.nspname = ANY (current_schemas(false))
1282
+ ORDER BY c.conname
1283
+ 
1284
+  (3.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
1285
+ FROM pg_constraint c
1286
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1287
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1288
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1289
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1290
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1291
+ WHERE c.contype = 'f'
1292
+ AND t1.relname = 'firms_other_advice_methods'
1293
+ AND t3.nspname = ANY (current_schemas(false))
1294
+ ORDER BY c.conname
1295
+
1296
+  (3.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
1297
+ FROM pg_constraint c
1298
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1299
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1300
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1301
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1302
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1303
+ WHERE c.contype = 'f'
1304
+ AND t1.relname = 'in_person_advice_methods'
1305
+ AND t3.nspname = ANY (current_schemas(false))
1306
+ ORDER BY c.conname
1307
+ 
1308
+  (3.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
1309
+ FROM pg_constraint c
1310
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1311
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1312
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1313
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1314
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1315
+ WHERE c.contype = 'f'
1316
+ AND t1.relname = 'initial_advice_fee_structures'
1317
+ AND t3.nspname = ANY (current_schemas(false))
1318
+ ORDER BY c.conname
1319
+
1320
+  (3.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
1321
+ FROM pg_constraint c
1322
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1323
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1324
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1325
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1326
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1327
+ WHERE c.contype = 'f'
1328
+ AND t1.relname = 'initial_meeting_durations'
1329
+ AND t3.nspname = ANY (current_schemas(false))
1330
+ ORDER BY c.conname
1331
+ 
1332
+  (3.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
1333
+ FROM pg_constraint c
1334
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1335
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1336
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1337
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1338
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1339
+ WHERE c.contype = 'f'
1340
+ AND t1.relname = 'investment_sizes'
1341
+ AND t3.nspname = ANY (current_schemas(false))
1342
+ ORDER BY c.conname
1343
+
1344
+  (3.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
1345
+ FROM pg_constraint c
1346
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1347
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1348
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1349
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1350
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1351
+ WHERE c.contype = 'f'
1352
+ AND t1.relname = 'lookup_advisers'
1353
+ AND t3.nspname = ANY (current_schemas(false))
1354
+ ORDER BY c.conname
1355
+ 
1356
+  (3.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
1357
+ FROM pg_constraint c
1358
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1359
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1360
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1361
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1362
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1363
+ WHERE c.contype = 'f'
1364
+ AND t1.relname = 'lookup_firms'
1365
+ AND t3.nspname = ANY (current_schemas(false))
1366
+ ORDER BY c.conname
1367
+
1368
+  (3.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
1369
+ FROM pg_constraint c
1370
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1371
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1372
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1373
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1374
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1375
+ WHERE c.contype = 'f'
1376
+ AND t1.relname = 'lookup_subsidiaries'
1377
+ AND t3.nspname = ANY (current_schemas(false))
1378
+ ORDER BY c.conname
1379
+ 
1380
+  (3.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
1381
+ FROM pg_constraint c
1382
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1383
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1384
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1385
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1386
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1387
+ WHERE c.contype = 'f'
1388
+ AND t1.relname = 'ongoing_advice_fee_structures'
1389
+ AND t3.nspname = ANY (current_schemas(false))
1390
+ ORDER BY c.conname
1391
+
1392
+  (3.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
1393
+ FROM pg_constraint c
1394
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1395
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1396
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1397
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1398
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1399
+ WHERE c.contype = 'f'
1400
+ AND t1.relname = 'other_advice_methods'
1401
+ AND t3.nspname = ANY (current_schemas(false))
1402
+ ORDER BY c.conname
1403
+ 
1404
+  (3.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
1405
+ FROM pg_constraint c
1406
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1407
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1408
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1409
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1410
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1411
+ WHERE c.contype = 'f'
1412
+ AND t1.relname = 'principals'
1413
+ AND t3.nspname = ANY (current_schemas(false))
1414
+ ORDER BY c.conname
1415
+
1416
+  (3.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
1417
+ FROM pg_constraint c
1418
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1419
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1420
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1421
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1422
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1423
+ WHERE c.contype = 'f'
1424
+ AND t1.relname = 'professional_bodies'
1425
+ AND t3.nspname = ANY (current_schemas(false))
1426
+ ORDER BY c.conname
1427
+ 
1428
+  (3.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
1429
+ FROM pg_constraint c
1430
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1431
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1432
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1433
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1434
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1435
+ WHERE c.contype = 'f'
1436
+ AND t1.relname = 'professional_standings'
1437
+ AND t3.nspname = ANY (current_schemas(false))
1438
+ ORDER BY c.conname
1439
+
1440
+  (3.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
1441
+ FROM pg_constraint c
1442
+ JOIN pg_class t1 ON c.conrelid = t1.oid
1443
+ JOIN pg_class t2 ON c.confrelid = t2.oid
1444
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
1445
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
1446
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
1447
+ WHERE c.contype = 'f'
1448
+ AND t1.relname = 'qualifications'
1449
+ AND t3.nspname = ANY (current_schemas(false))
1450
+ ORDER BY c.conname
1451
+