mas-rad_core 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8ddedc793fa1147bec67ccc827f16325a581689c
4
- data.tar.gz: 82db2d2dc83430c01d804c0402c399f72cd0a82a
3
+ metadata.gz: f4466968b5a884e0d63474409d8b01478404321d
4
+ data.tar.gz: 8b95ef375abc8f7696606a9583ffe5faf4a5f34e
5
5
  SHA512:
6
- metadata.gz: 7968241320d7a619acc7c7f8022a29bba5529f2a9132d5f3ca10cb1efb0c3f2288b40d1a8396af7b31a5864ccfc72d13df06058c0add6e0e347012ba91194663
7
- data.tar.gz: dd469eea433328259512990f84119ce6d8e9c248e9c4d65b49800c19a83969f0190321f95dfcdc572c08313c3d1f6f6270ef9b28a421d18ff48fefc1d00f1c2e
6
+ metadata.gz: 0755ffba708f9e9aa6d0b3bc8c1aed96050044ff94cc232533de40d195bec0c2e3dfb7931c2069c624f683fb7068774f9cc064dab22aec6945f686848a5a03ad
7
+ data.tar.gz: 76673a00a481ee1e1dacf8ab4dfef65860a82491861bc5739b6a532e8913e38753cca28f9a7333610da91ff0a92d4d7e6aeb4372f834bf539380de81f8250be2
@@ -1,4 +1,6 @@
1
- require "rad_core/engine"
1
+ require "mas/rad_core/engine"
2
2
 
3
- module MAS::RadCore
3
+ module MAS
4
+ module RadCore
5
+ end
4
6
  end
@@ -1,20 +1,22 @@
1
1
  require 'statsd'
2
2
 
3
- module MAS::RadCore
4
- class Engine < ::Rails::Engine
5
- config.autoload_paths << root.join('lib')
3
+ module MAS
4
+ module RadCore
5
+ class Engine < ::Rails::Engine
6
+ config.autoload_paths << root.join('lib', 'mas')
6
7
 
7
- initializer :append_migrations do |app|
8
- unless app.root.to_s.match root.to_s
9
- config.paths['db/migrate'].expanded.each do |expanded_path|
10
- app.config.paths['db/migrate'] << expanded_path
8
+ initializer :append_migrations do |app|
9
+ unless app.root.to_s.match root.to_s
10
+ config.paths['db/migrate'].expanded.each do |expanded_path|
11
+ app.config.paths['db/migrate'] << expanded_path
12
+ end
11
13
  end
12
14
  end
13
- end
14
15
 
15
- initializer :factories, after: 'factory_girl.set_factory_paths' do
16
- if defined?(FactoryGirl)
17
- FactoryGirl.definition_file_paths << File.expand_path('../../../spec/factories', __FILE__)
16
+ initializer :factories, after: 'factory_girl.set_factory_paths' do
17
+ if defined?(FactoryGirl)
18
+ FactoryGirl.definition_file_paths << root.join('spec', 'factories')
19
+ end
18
20
  end
19
21
  end
20
22
  end
@@ -1,5 +1,5 @@
1
1
  module MAS
2
2
  module RadCore
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -0,0 +1,536 @@
1
+  (26.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
2
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateLookupFirms (20141211110031)
5
+  (6.8ms) BEGIN
6
+ 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/benlovell/code/mas-rad_core/db/migrate/20141211110031_create_lookup_firms.rb:8)
7
+  (16.5ms) 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) 
8
+  (1.3ms) CREATE UNIQUE INDEX "index_lookup_firms_on_fca_number" ON "lookup_firms" ("fca_number")
9
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141211110031"]]
10
+  (6.4ms) COMMIT
11
+ Migrating to CreatePrincipals (20141221140208)
12
+  (6.4ms) BEGIN
13
+ 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/benlovell/code/mas-rad_core/db/migrate/20141221140208_create_principals.rb:19)
14
+  (9.0ms) 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)
15
+  (1.3ms) CREATE UNIQUE INDEX "index_principals_on_fca_number" ON "principals" ("fca_number")
16
+  (1.4ms) CREATE UNIQUE INDEX "index_principals_on_token" ON "principals" ("token")
17
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141221140208"]]
18
+  (0.6ms) COMMIT
19
+ Migrating to AddLastSignInAtToPrincipal (20141222150416)
20
+  (0.4ms) BEGIN
21
+  (1.3ms) ALTER TABLE "principals" ADD "last_sign_in_at" timestamp
22
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141222150416"]]
23
+  (0.6ms) COMMIT
24
+ Migrating to CreateLookupSubsidiaries (20141230112136)
25
+  (0.3ms) BEGIN
26
+  (3.8ms) 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)
27
+  (0.9ms) CREATE INDEX "index_lookup_subsidiaries_on_fca_number" ON "lookup_subsidiaries" ("fca_number")
28
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141230112136"]]
29
+  (0.6ms) COMMIT
30
+ Migrating to RemoveLastSignInAtFromPrincipals (20150106115732)
31
+  (0.3ms) BEGIN
32
+  (0.8ms) ALTER TABLE "principals" DROP "last_sign_in_at"
33
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150106115732"]]
34
+  (0.5ms) COMMIT
35
+ Migrating to CreateLookupAdvisers (20150114144343)
36
+  (0.3ms) BEGIN
37
+  (4.0ms) 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) 
38
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114144343"]]
39
+  (0.6ms) COMMIT
40
+ Migrating to CreateFirms (20150114151447)
41
+  (0.3ms) BEGIN
42
+  (3.1ms) 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) 
43
+  (1.2ms) CREATE UNIQUE INDEX "index_firms_on_fca_number" ON "firms" ("fca_number")
44
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114151447"]]
45
+  (1.5ms) COMMIT
46
+ Migrating to AddAddressToFirm (20150115130949)
47
+  (0.3ms) BEGIN
48
+  (0.4ms) ALTER TABLE "firms" ADD "address_line_one" character varying
49
+  (0.3ms) ALTER TABLE "firms" ADD "address_line_two" character varying
50
+  (0.3ms) ALTER TABLE "firms" ADD "address_town" character varying
51
+  (0.4ms) ALTER TABLE "firms" ADD "address_county" character varying
52
+  (0.3ms) ALTER TABLE "firms" ADD "address_postcode" character varying
53
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150115130949"]]
54
+  (0.5ms) COMMIT
55
+ Migrating to CreateInPersonAdviceMethods (20150119102735)
56
+  (0.2ms) BEGIN
57
+  (4.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)
58
+  (0.8ms) CREATE TABLE "firms_in_person_advice_methods" ("firm_id" integer NOT NULL, "in_person_advice_method_id" integer NOT NULL) 
59
+  (1.0ms) CREATE UNIQUE INDEX "firms_in_person_advice_methods_index" ON "firms_in_person_advice_methods" ("firm_id", "in_person_advice_method_id")
60
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119102735"]]
61
+  (0.5ms) COMMIT
62
+ Migrating to CreateOtherAdviceMethods (20150119111754)
63
+  (0.3ms) BEGIN
64
+  (3.3ms) CREATE TABLE "other_advice_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
65
+  (0.9ms) CREATE TABLE "firms_other_advice_methods" ("firm_id" integer NOT NULL, "other_advice_method_id" integer NOT NULL) 
66
+  (1.2ms) CREATE UNIQUE INDEX "firms_other_advice_methods_index" ON "firms_other_advice_methods" ("firm_id", "other_advice_method_id")
67
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119111754"]]
68
+  (0.6ms) COMMIT
69
+ Migrating to AddFreeInitialMeetingToFirm (20150119114218)
70
+  (0.3ms) BEGIN
71
+  (0.3ms) ALTER TABLE "firms" ADD "free_initial_meeting" boolean
72
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119114218"]]
73
+  (0.4ms) COMMIT
74
+ Migrating to CreateInitialMeetingDurations (20150119125208)
75
+  (0.2ms) BEGIN
76
+  (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)
77
+  (0.3ms) ALTER TABLE "firms" ADD "initial_meeting_duration_id" integer
78
+  (1.2ms) CREATE INDEX "index_firms_on_initial_meeting_duration_id" ON "firms" ("initial_meeting_duration_id")
79
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119125208"]]
80
+  (0.5ms) COMMIT
81
+ Migrating to CreateInitialAdviceFeeStructures (20150119152325)
82
+  (0.3ms) BEGIN
83
+  (3.5ms) 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)
84
+  (0.7ms) CREATE TABLE "firms_initial_advice_fee_structures" ("firm_id" integer NOT NULL, "initial_advice_fee_structure_id" integer NOT NULL) 
85
+  (0.9ms) CREATE UNIQUE INDEX "firms_initial_advice_fee_structures_index" ON "firms_initial_advice_fee_structures" ("firm_id", "initial_advice_fee_structure_id")
86
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152325"]]
87
+  (0.5ms) COMMIT
88
+ Migrating to CreateOngoingAdviceFeeStructures (20150119152336)
89
+  (5.7ms) BEGIN
90
+  (16.2ms) 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)
91
+  (1.0ms) CREATE TABLE "firms_ongoing_advice_fee_structures" ("firm_id" integer NOT NULL, "ongoing_advice_fee_structure_id" integer NOT NULL) 
92
+  (1.1ms) CREATE UNIQUE INDEX "firms_ongoing_advice_fee_structures_index" ON "firms_ongoing_advice_fee_structures" ("firm_id", "ongoing_advice_fee_structure_id")
93
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152336"]]
94
+  (0.7ms) COMMIT
95
+ Migrating to CreateAllowedPaymentMethods (20150120133717)
96
+  (0.4ms) BEGIN
97
+  (2.9ms) CREATE TABLE "allowed_payment_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
98
+  (1.0ms) CREATE TABLE "allowed_payment_methods_firms" ("firm_id" integer NOT NULL, "allowed_payment_method_id" integer NOT NULL) 
99
+  (1.0ms) CREATE UNIQUE INDEX "firms_allowed_payment_methods_index" ON "allowed_payment_methods_firms" ("firm_id", "allowed_payment_method_id")
100
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120133717"]]
101
+  (0.6ms) COMMIT
102
+ Migrating to AddMinimumFixedFeeToFirm (20150120141928)
103
+  (0.6ms) BEGIN
104
+  (0.5ms) ALTER TABLE "firms" ADD "minimum_fixed_fee" integer
105
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120141928"]]
106
+  (0.4ms) COMMIT
107
+ Migrating to CreateInvestmentSizes (20150120150738)
108
+  (0.2ms) BEGIN
109
+  (2.7ms) CREATE TABLE "investment_sizes" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
110
+  (0.8ms) CREATE TABLE "firms_investment_sizes" ("firm_id" integer NOT NULL, "investment_size_id" integer NOT NULL) 
111
+  (1.0ms) CREATE UNIQUE INDEX "firms_investment_sizes_index" ON "firms_investment_sizes" ("firm_id", "investment_size_id")
112
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120150738"]]
113
+  (6.3ms) COMMIT
114
+ Migrating to CreateAdvisers (20150121110757)
115
+  (6.5ms) BEGIN
116
+  (9.0ms) 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)
117
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121110757"]]
118
+  (0.5ms) COMMIT
119
+ Migrating to AddBusinessIncomeBreakdownFieldsToFirm (20150121123437)
120
+  (0.4ms) BEGIN
121
+  (0.4ms) ALTER TABLE "firms" ADD "retirement_income_products_percent" integer
122
+  (0.3ms) ALTER TABLE "firms" ADD "pension_transfer_percent" integer
123
+  (0.3ms) ALTER TABLE "firms" ADD "long_term_care_percent" integer
124
+  (0.3ms) ALTER TABLE "firms" ADD "equity_release_percent" integer
125
+  (0.4ms) ALTER TABLE "firms" ADD "inheritance_tax_and_estate_planning_percent" integer
126
+  (0.3ms) ALTER TABLE "firms" ADD "wills_and_probate_percent" integer
127
+  (0.3ms) ALTER TABLE "firms" ADD "other_percent" integer
128
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121123437"]]
129
+  (0.4ms) COMMIT
130
+ Migrating to CreateQualifications (20150121134845)
131
+  (0.2ms) BEGIN
132
+  (2.9ms) CREATE TABLE "qualifications" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
133
+  (0.6ms) CREATE TABLE "advisers_qualifications" ("adviser_id" integer NOT NULL, "qualification_id" integer NOT NULL) 
134
+  (1.3ms) CREATE UNIQUE INDEX "advisers_qualifications_index" ON "advisers_qualifications" ("adviser_id", "qualification_id")
135
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121134845"]]
136
+  (2.5ms) COMMIT
137
+ Migrating to CreateAccreditations (20150121154458)
138
+  (0.5ms) BEGIN
139
+  (3.5ms) CREATE TABLE "accreditations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
140
+  (0.8ms) CREATE TABLE "accreditations_advisers" ("adviser_id" integer NOT NULL, "accreditation_id" integer NOT NULL) 
141
+  (1.0ms) CREATE UNIQUE INDEX "advisers_accreditations_index" ON "accreditations_advisers" ("adviser_id", "accreditation_id")
142
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121154458"]]
143
+  (0.6ms) COMMIT
144
+ Migrating to CreateProfessionalStandings (20150121173015)
145
+  (0.3ms) BEGIN
146
+  (3.0ms) CREATE TABLE "professional_standings" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
147
+  (0.7ms) CREATE TABLE "advisers_professional_standings" ("adviser_id" integer NOT NULL, "professional_standing_id" integer NOT NULL) 
148
+  (1.2ms) CREATE UNIQUE INDEX "advisers_professional_standings_index" ON "advisers_professional_standings" ("adviser_id", "professional_standing_id")
149
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121173015"]]
150
+  (1.6ms) COMMIT
151
+ Migrating to CreateProfessionalBodies (20150121181341)
152
+  (0.3ms) BEGIN
153
+  (15.2ms) CREATE TABLE "professional_bodies" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
154
+  (1.5ms) CREATE TABLE "advisers_professional_bodies" ("adviser_id" integer NOT NULL, "professional_body_id" integer NOT NULL) 
155
+  (6.3ms) CREATE UNIQUE INDEX "advisers_professional_bodies_index" ON "advisers_professional_bodies" ("adviser_id", "professional_body_id")
156
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121181341"]]
157
+  (0.7ms) COMMIT
158
+ Migrating to AddConfirmedDisclaimerToAdvisers (20150121183728)
159
+  (0.5ms) BEGIN
160
+  (0.6ms) ALTER TABLE "advisers" ADD "confirmed_disclaimer" boolean NOT NULL
161
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121183728"]]
162
+  (0.6ms) COMMIT
163
+ Migrating to AddGeographicalFieldsToAdviser (20150124124350)
164
+  (0.3ms) BEGIN
165
+  (4.7ms) ALTER TABLE "advisers" ADD "postcode" character varying DEFAULT '' NOT NULL
166
+  (4.3ms) ALTER TABLE "advisers" ADD "travel_distance" integer DEFAULT 0 NOT NULL
167
+  (4.0ms) ALTER TABLE "advisers" ADD "covers_whole_of_uk" boolean DEFAULT 'f' NOT NULL
168
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150124124350"]]
169
+  (1.7ms) COMMIT
170
+ Migrating to AddParentIdToFirms (20150125145457)
171
+  (0.3ms) BEGIN
172
+  (0.4ms) ALTER TABLE "firms" ADD "parent_id" integer
173
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125145457"]]
174
+  (0.6ms) COMMIT
175
+ Migrating to RemoveUniqueConstraintFromFirmsFcaNumber (20150125164156)
176
+  (0.2ms) BEGIN
177
+  (0.9ms) DROP INDEX "index_firms_on_fca_number"
178
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125164156"]]
179
+  (1.0ms) COMMIT
180
+ Migrating to AddOrderingOnReferenceData (20150127084858)
181
+  (0.2ms) BEGIN
182
+  (3.2ms) ALTER TABLE "accreditations" ADD "order" integer DEFAULT 0 NOT NULL
183
+ Accreditation Load (0.8ms) SELECT "accreditations".* FROM "accreditations" ORDER BY "accreditations"."id" ASC
184
+  (4.2ms) ALTER TABLE "allowed_payment_methods" ADD "order" integer DEFAULT 0 NOT NULL
185
+ AllowedPaymentMethod Load (0.6ms) SELECT "allowed_payment_methods".* FROM "allowed_payment_methods" ORDER BY "allowed_payment_methods"."id" ASC
186
+  (3.3ms) ALTER TABLE "in_person_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
187
+ InPersonAdviceMethod Load (0.7ms) SELECT "in_person_advice_methods".* FROM "in_person_advice_methods" ORDER BY "in_person_advice_methods"."id" ASC
188
+  (3.6ms) ALTER TABLE "initial_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
189
+ InitialAdviceFeeStructure Load (0.6ms) SELECT "initial_advice_fee_structures".* FROM "initial_advice_fee_structures" ORDER BY "initial_advice_fee_structures"."id" ASC
190
+  (3.3ms) ALTER TABLE "initial_meeting_durations" ADD "order" integer DEFAULT 0 NOT NULL
191
+ InitialMeetingDuration Load (0.5ms) SELECT "initial_meeting_durations".* FROM "initial_meeting_durations" ORDER BY "initial_meeting_durations"."id" ASC
192
+  (3.4ms) ALTER TABLE "investment_sizes" ADD "order" integer DEFAULT 0 NOT NULL
193
+ InvestmentSize Load (0.5ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."id" ASC
194
+  (3.2ms) ALTER TABLE "ongoing_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
195
+ OngoingAdviceFeeStructure Load (0.7ms) SELECT "ongoing_advice_fee_structures".* FROM "ongoing_advice_fee_structures" ORDER BY "ongoing_advice_fee_structures"."id" ASC
196
+  (3.8ms) ALTER TABLE "other_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
197
+ OtherAdviceMethod Load (0.6ms) SELECT "other_advice_methods".* FROM "other_advice_methods" ORDER BY "other_advice_methods"."id" ASC
198
+  (4.0ms) ALTER TABLE "professional_bodies" ADD "order" integer DEFAULT 0 NOT NULL
199
+ ProfessionalBody Load (0.5ms) SELECT "professional_bodies".* FROM "professional_bodies" ORDER BY "professional_bodies"."id" ASC
200
+  (3.5ms) ALTER TABLE "professional_standings" ADD "order" integer DEFAULT 0 NOT NULL
201
+ ProfessionalStanding Load (0.7ms) SELECT "professional_standings".* FROM "professional_standings" ORDER BY "professional_standings"."id" ASC
202
+  (3.5ms) ALTER TABLE "qualifications" ADD "order" integer DEFAULT 0 NOT NULL
203
+ Qualification Load (0.4ms) SELECT "qualifications".* FROM "qualifications" ORDER BY "qualifications"."id" ASC
204
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150127084858"]]
205
+  (5.3ms) COMMIT
206
+ Migrating to RemoveCoversWholeOfUkFromAdvisers (20150209144836)
207
+  (0.6ms) BEGIN
208
+ Adviser Load (7.0ms) SELECT "advisers".* FROM "advisers" WHERE "advisers"."covers_whole_of_uk" = 't' ORDER BY "advisers"."id" ASC LIMIT 1000
209
+  (0.7ms) ALTER TABLE "advisers" DROP "covers_whole_of_uk"
210
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150209144836"]]
211
+  (6.5ms) COMMIT
212
+ ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
213
+  (2.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
214
+ FROM pg_constraint c
215
+ JOIN pg_class t1 ON c.conrelid = t1.oid
216
+ JOIN pg_class t2 ON c.confrelid = t2.oid
217
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
218
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
219
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
220
+ WHERE c.contype = 'f'
221
+ AND t1.relname = 'accreditations'
222
+ AND t3.nspname = ANY (current_schemas(false))
223
+ ORDER BY c.conname
224
+
225
+  (2.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
226
+ FROM pg_constraint c
227
+ JOIN pg_class t1 ON c.conrelid = t1.oid
228
+ JOIN pg_class t2 ON c.confrelid = t2.oid
229
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
230
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
231
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
232
+ WHERE c.contype = 'f'
233
+ AND t1.relname = 'accreditations_advisers'
234
+ AND t3.nspname = ANY (current_schemas(false))
235
+ ORDER BY c.conname
236
+ 
237
+  (2.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'advisers'
246
+ AND t3.nspname = ANY (current_schemas(false))
247
+ ORDER BY c.conname
248
+
249
+  (2.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
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 = 'advisers_professional_bodies'
258
+ AND t3.nspname = ANY (current_schemas(false))
259
+ ORDER BY c.conname
260
+ 
261
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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_professional_standings'
270
+ AND t3.nspname = ANY (current_schemas(false))
271
+ ORDER BY c.conname
272
+
273
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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_qualifications'
282
+ AND t3.nspname = ANY (current_schemas(false))
283
+ ORDER BY c.conname
284
+ 
285
+  (2.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
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 = 'allowed_payment_methods'
294
+ AND t3.nspname = ANY (current_schemas(false))
295
+ ORDER BY c.conname
296
+
297
+  (2.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 = 'allowed_payment_methods_firms'
306
+ AND t3.nspname = ANY (current_schemas(false))
307
+ ORDER BY c.conname
308
+ 
309
+  (3.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
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 = 'firms'
318
+ AND t3.nspname = ANY (current_schemas(false))
319
+ ORDER BY c.conname
320
+
321
+  (3.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'firms_in_person_advice_methods'
330
+ AND t3.nspname = ANY (current_schemas(false))
331
+ ORDER BY c.conname
332
+ 
333
+  (2.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_initial_advice_fee_structures'
342
+ AND t3.nspname = ANY (current_schemas(false))
343
+ ORDER BY c.conname
344
+
345
+  (2.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
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_investment_sizes'
354
+ AND t3.nspname = ANY (current_schemas(false))
355
+ ORDER BY c.conname
356
+ 
357
+  (2.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_ongoing_advice_fee_structures'
366
+ AND t3.nspname = ANY (current_schemas(false))
367
+ ORDER BY c.conname
368
+
369
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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_other_advice_methods'
378
+ AND t3.nspname = ANY (current_schemas(false))
379
+ ORDER BY c.conname
380
+ 
381
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'in_person_advice_methods'
390
+ AND t3.nspname = ANY (current_schemas(false))
391
+ ORDER BY c.conname
392
+
393
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'initial_advice_fee_structures'
402
+ AND t3.nspname = ANY (current_schemas(false))
403
+ ORDER BY c.conname
404
+ 
405
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'initial_meeting_durations'
414
+ AND t3.nspname = ANY (current_schemas(false))
415
+ ORDER BY c.conname
416
+
417
+  (2.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'investment_sizes'
426
+ AND t3.nspname = ANY (current_schemas(false))
427
+ ORDER BY c.conname
428
+ 
429
+  (1.9ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'lookup_advisers'
438
+ AND t3.nspname = ANY (current_schemas(false))
439
+ ORDER BY c.conname
440
+
441
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'lookup_firms'
450
+ AND t3.nspname = ANY (current_schemas(false))
451
+ ORDER BY c.conname
452
+ 
453
+  (1.9ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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_subsidiaries'
462
+ AND t3.nspname = ANY (current_schemas(false))
463
+ ORDER BY c.conname
464
+
465
+  (2.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'ongoing_advice_fee_structures'
474
+ AND t3.nspname = ANY (current_schemas(false))
475
+ ORDER BY c.conname
476
+ 
477
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'other_advice_methods'
486
+ AND t3.nspname = ANY (current_schemas(false))
487
+ ORDER BY c.conname
488
+
489
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'principals'
498
+ AND t3.nspname = ANY (current_schemas(false))
499
+ ORDER BY c.conname
500
+ 
501
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'professional_bodies'
510
+ AND t3.nspname = ANY (current_schemas(false))
511
+ ORDER BY c.conname
512
+
513
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'professional_standings'
522
+ AND t3.nspname = ANY (current_schemas(false))
523
+ ORDER BY c.conname
524
+ 
525
+  (1.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
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 = 'qualifications'
534
+ AND t3.nspname = ANY (current_schemas(false))
535
+ ORDER BY c.conname
536
+