mas-rad_core 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a7ae1c47c0420343e3eed3e78ee5c5d08218f799
4
- data.tar.gz: 4a8c8d96d79aed58bd5ca89d95747082e8537b5e
3
+ metadata.gz: b3e2423738fd760516099a4b1c5cd8f8444c4cd2
4
+ data.tar.gz: 7de8f9c300c3591dd877e49eb35b4693e2b92174
5
5
  SHA512:
6
- metadata.gz: 07191af6d79b89fb18a8d9a6a9b631f799e6c492fe64bfb9ab6bfb16d0f62388b4d13108edc5533e5617f6ac864514968524c6930a0640c0b07b74d17d16f08c
7
- data.tar.gz: 119c7c44d4bbc6966f1e54cec702e077097362b6dfaa4f1edc5be0b42605683a9d0f2269078350907175a406b76532e7cc68459aef513b9208e86f141cc29274
6
+ metadata.gz: 25846eda1809b387ddf18ffd2f739067f7f291980f84097885bcdde6a5995e65118043673959adedf738a7e1efc84efbdff4034b6d2026c792ddf31fd2a4f68c
7
+ data.tar.gz: 6de5842a09f5bd8ee385f041296aa1edf4256e46e36317d9e859241377be60d70d124c903ddac2abfae98d4bedc65ea1ddd0d495971ea3622caf384f51e962c7
@@ -1,5 +1,4 @@
1
1
  class AdviserSerializer < ActiveModel::Serializer
2
- self.root = false
3
2
 
4
3
  attributes :_id, :name, :postcode, :range, :location, :range_location, :qualification_ids, :accreditation_ids
5
4
 
@@ -1,5 +1,4 @@
1
1
  class FirmSerializer < ActiveModel::Serializer
2
- self.root = false
3
2
 
4
3
  attributes :_id,
5
4
  :registered_name,
@@ -1,5 +1,4 @@
1
1
  class OfficeSerializer < ActiveModel::Serializer
2
- self.root = false
3
2
 
4
3
  attributes :_id, :address_line_one, :address_line_two, :address_town,
5
4
  :address_county, :address_postcode, :email_address,
@@ -1,5 +1,5 @@
1
1
  module MAS
2
2
  module RadCore
3
- VERSION = '0.1.2'
3
+ VERSION = '0.1.3'
4
4
  end
5
5
  end
@@ -3,6 +3,7 @@ default: &default
3
3
  encoding: utf8
4
4
  pool: 5
5
5
  host: localhost
6
+ username: oliversharpe
6
7
 
7
8
  development:
8
9
  <<: *default
@@ -0,0 +1,934 @@
1
+  (30.1ms) 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.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
4
+ Migrating to CreateLookupFirms (20141211110031)
5
+  (0.2ms) BEGIN
6
+ DEPRECATION WARNING: `#timestamps` 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/oliversharpe/Repo/mas-rad_core/db/migrate/20141211110031_create_lookup_firms.rb:8)
7
+  (44.2ms) 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
+  (0.6ms) CREATE UNIQUE INDEX "index_lookup_firms_on_fca_number" ON "lookup_firms" ("fca_number")
9
+ SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141211110031"]]
10
+  (26.6ms) COMMIT
11
+ Migrating to CreatePrincipals (20141221140208)
12
+  (25.2ms) BEGIN
13
+ DEPRECATION WARNING: `#timestamps` 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/oliversharpe/Repo/mas-rad_core/db/migrate/20141221140208_create_principals.rb:19)
14
+  (6.3ms) 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
+  (0.7ms) CREATE UNIQUE INDEX "index_principals_on_fca_number" ON "principals" ("fca_number")
16
+  (0.8ms) CREATE UNIQUE INDEX "index_principals_on_token" ON "principals" ("token")
17
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141221140208"]]
18
+  (0.4ms) COMMIT
19
+ Migrating to AddLastSignInAtToPrincipal (20141222150416)
20
+  (40.6ms) BEGIN
21
+  (3.5ms) ALTER TABLE "principals" ADD "last_sign_in_at" timestamp
22
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20141222150416"]]
23
+  (0.3ms) COMMIT
24
+ Migrating to CreateLookupSubsidiaries (20141230112136)
25
+  (0.1ms) BEGIN
26
+  (30.1ms) 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
+  (1.2ms) 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.4ms) COMMIT
30
+ Migrating to RemoveLastSignInAtFromPrincipals (20150106115732)
31
+  (24.9ms) BEGIN
32
+  (1.1ms) ALTER TABLE "principals" DROP "last_sign_in_at"
33
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150106115732"]]
34
+  (0.4ms) COMMIT
35
+ Migrating to CreateLookupAdvisers (20150114144343)
36
+  (0.1ms) BEGIN
37
+  (25.7ms) 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
+  (1.1ms) COMMIT
40
+ Migrating to CreateFirms (20150114151447)
41
+  (25.6ms) BEGIN
42
+  (2.4ms) 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.4ms) CREATE UNIQUE INDEX "index_firms_on_fca_number" ON "firms" ("fca_number")
44
+ SQL (0.6ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150114151447"]]
45
+  (0.4ms) COMMIT
46
+ Migrating to AddAddressToFirm (20150115130949)
47
+  (25.2ms) BEGIN
48
+  (0.5ms) ALTER TABLE "firms" ADD "address_line_one" character varying
49
+  (0.2ms) ALTER TABLE "firms" ADD "address_line_two" character varying
50
+  (0.2ms) ALTER TABLE "firms" ADD "address_town" character varying
51
+  (0.2ms) ALTER TABLE "firms" ADD "address_county" character varying
52
+  (0.2ms) ALTER TABLE "firms" ADD "address_postcode" character varying
53
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150115130949"]]
54
+  (0.2ms) COMMIT
55
+ Migrating to CreateInPersonAdviceMethods (20150119102735)
56
+  (0.1ms) BEGIN
57
+  (25.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)
58
+  (0.6ms) CREATE TABLE "firms_in_person_advice_methods" ("firm_id" integer NOT NULL, "in_person_advice_method_id" integer NOT NULL) 
59
+  (0.9ms) 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.3ms) COMMIT
62
+ Migrating to CreateOtherAdviceMethods (20150119111754)
63
+  (25.6ms) BEGIN
64
+  (2.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)
65
+  (0.5ms) CREATE TABLE "firms_other_advice_methods" ("firm_id" integer NOT NULL, "other_advice_method_id" integer NOT NULL) 
66
+  (0.7ms) 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.3ms) COMMIT
69
+ Migrating to AddFreeInitialMeetingToFirm (20150119114218)
70
+  (25.0ms) 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.1ms) BEGIN
76
+  (25.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
+  (0.8ms) CREATE INDEX "index_firms_on_initial_meeting_duration_id" ON "firms" ("initial_meeting_duration_id")
79
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119125208"]]
80
+  (0.5ms) COMMIT
81
+ Migrating to CreateInitialAdviceFeeStructures (20150119152325)
82
+  (25.7ms) BEGIN
83
+  (2.9ms) 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.6ms) CREATE TABLE "firms_initial_advice_fee_structures" ("firm_id" integer NOT NULL, "initial_advice_fee_structure_id" integer NOT NULL) 
85
+  (0.7ms) 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.3ms) COMMIT
88
+ Migrating to CreateOngoingAdviceFeeStructures (20150119152336)
89
+  (24.7ms) BEGIN
90
+  (3.0ms) 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
+  (0.6ms) CREATE TABLE "firms_ongoing_advice_fee_structures" ("firm_id" integer NOT NULL, "ongoing_advice_fee_structure_id" integer NOT NULL) 
92
+  (0.8ms) 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.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150119152336"]]
94
+  (0.4ms) COMMIT
95
+ Migrating to CreateAllowedPaymentMethods (20150120133717)
96
+  (25.4ms) BEGIN
97
+  (2.8ms) 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
+  (0.7ms) CREATE TABLE "allowed_payment_methods_firms" ("firm_id" integer NOT NULL, "allowed_payment_method_id" integer NOT NULL) 
99
+  (0.8ms) CREATE UNIQUE INDEX "firms_allowed_payment_methods_index" ON "allowed_payment_methods_firms" ("firm_id", "allowed_payment_method_id")
100
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120133717"]]
101
+  (0.3ms) COMMIT
102
+ Migrating to AddMinimumFixedFeeToFirm (20150120141928)
103
+  (39.7ms) 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
+  (2.1ms) COMMIT
107
+ Migrating to CreateInvestmentSizes (20150120150738)
108
+  (0.2ms) BEGIN
109
+  (34.3ms) CREATE TABLE "investment_sizes" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
110
+  (1.2ms) CREATE TABLE "firms_investment_sizes" ("firm_id" integer NOT NULL, "investment_size_id" integer NOT NULL) 
111
+  (0.7ms) CREATE UNIQUE INDEX "firms_investment_sizes_index" ON "firms_investment_sizes" ("firm_id", "investment_size_id")
112
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150120150738"]]
113
+  (0.3ms) COMMIT
114
+ Migrating to CreateAdvisers (20150121110757)
115
+  (26.0ms) BEGIN
116
+  (2.6ms) 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.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121110757"]]
118
+  (0.4ms) COMMIT
119
+ Migrating to AddBusinessIncomeBreakdownFieldsToFirm (20150121123437)
120
+  (25.3ms) BEGIN
121
+  (0.5ms) 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.3ms) ALTER TABLE "firms" ADD "inheritance_tax_and_estate_planning_percent" integer
126
+  (0.2ms) ALTER TABLE "firms" ADD "wills_and_probate_percent" integer
127
+  (0.2ms) ALTER TABLE "firms" ADD "other_percent" integer
128
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121123437"]]
129
+  (0.3ms) COMMIT
130
+ Migrating to CreateQualifications (20150121134845)
131
+  (0.1ms) BEGIN
132
+  (26.1ms) CREATE TABLE "qualifications" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
133
+  (0.5ms) CREATE TABLE "advisers_qualifications" ("adviser_id" integer NOT NULL, "qualification_id" integer NOT NULL) 
134
+  (0.7ms) 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
+  (0.4ms) COMMIT
137
+ Migrating to CreateAccreditations (20150121154458)
138
+  (25.6ms) BEGIN
139
+  (3.7ms) CREATE TABLE "accreditations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
140
+  (0.6ms) CREATE TABLE "accreditations_advisers" ("adviser_id" integer NOT NULL, "accreditation_id" integer NOT NULL) 
141
+  (0.8ms) CREATE UNIQUE INDEX "advisers_accreditations_index" ON "accreditations_advisers" ("adviser_id", "accreditation_id")
142
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121154458"]]
143
+  (0.3ms) COMMIT
144
+ Migrating to CreateProfessionalStandings (20150121173015)
145
+  (25.6ms) BEGIN
146
+  (2.4ms) 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.5ms) CREATE TABLE "advisers_professional_standings" ("adviser_id" integer NOT NULL, "professional_standing_id" integer NOT NULL) 
148
+  (0.9ms) CREATE UNIQUE INDEX "advisers_professional_standings_index" ON "advisers_professional_standings" ("adviser_id", "professional_standing_id")
149
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121173015"]]
150
+  (0.5ms) COMMIT
151
+ Migrating to CreateProfessionalBodies (20150121181341)
152
+  (25.8ms) BEGIN
153
+  (2.6ms) CREATE TABLE "professional_bodies" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
154
+  (0.5ms) CREATE TABLE "advisers_professional_bodies" ("adviser_id" integer NOT NULL, "professional_body_id" integer NOT NULL) 
155
+  (0.8ms) CREATE UNIQUE INDEX "advisers_professional_bodies_index" ON "advisers_professional_bodies" ("adviser_id", "professional_body_id")
156
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121181341"]]
157
+  (0.4ms) COMMIT
158
+ Migrating to AddConfirmedDisclaimerToAdvisers (20150121183728)
159
+  (26.0ms) BEGIN
160
+  (0.4ms) ALTER TABLE "advisers" ADD "confirmed_disclaimer" boolean NOT NULL
161
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150121183728"]]
162
+  (0.3ms) COMMIT
163
+ Migrating to AddGeographicalFieldsToAdviser (20150124124350)
164
+  (0.1ms) BEGIN
165
+  (26.7ms) ALTER TABLE "advisers" ADD "postcode" character varying DEFAULT '' NOT NULL
166
+  (2.4ms) ALTER TABLE "advisers" ADD "travel_distance" integer DEFAULT 0 NOT NULL
167
+  (2.6ms) ALTER TABLE "advisers" ADD "covers_whole_of_uk" boolean DEFAULT 'f' NOT NULL
168
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150124124350"]]
169
+  (1.7ms) COMMIT
170
+ Migrating to AddParentIdToFirms (20150125145457)
171
+  (0.2ms) 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
+  (23.1ms) COMMIT
175
+ Migrating to RemoveUniqueConstraintFromFirmsFcaNumber (20150125164156)
176
+  (0.2ms) BEGIN
177
+  (0.3ms) DROP INDEX "index_firms_on_fca_number"
178
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150125164156"]]
179
+  (22.3ms) COMMIT
180
+ Migrating to AddOrderingOnReferenceData (20150127084858)
181
+  (0.1ms) BEGIN
182
+  (29.5ms) 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
+  (2.3ms) ALTER TABLE "allowed_payment_methods" ADD "order" integer DEFAULT 0 NOT NULL
185
+ AllowedPaymentMethod Load (0.4ms) SELECT "allowed_payment_methods".* FROM "allowed_payment_methods" ORDER BY "allowed_payment_methods"."id" ASC
186
+  (2.1ms) ALTER TABLE "in_person_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
187
+ InPersonAdviceMethod Load (0.4ms) SELECT "in_person_advice_methods".* FROM "in_person_advice_methods" ORDER BY "in_person_advice_methods"."id" ASC
188
+  (2.2ms) ALTER TABLE "initial_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
189
+ InitialAdviceFeeStructure Load (0.3ms) SELECT "initial_advice_fee_structures".* FROM "initial_advice_fee_structures" ORDER BY "initial_advice_fee_structures"."id" ASC
190
+  (2.5ms) ALTER TABLE "initial_meeting_durations" ADD "order" integer DEFAULT 0 NOT NULL
191
+ InitialMeetingDuration Load (0.4ms) SELECT "initial_meeting_durations".* FROM "initial_meeting_durations" ORDER BY "initial_meeting_durations"."id" ASC
192
+  (2.5ms) ALTER TABLE "investment_sizes" ADD "order" integer DEFAULT 0 NOT NULL
193
+ InvestmentSize Load (0.4ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."id" ASC
194
+  (2.7ms) ALTER TABLE "ongoing_advice_fee_structures" ADD "order" integer DEFAULT 0 NOT NULL
195
+ OngoingAdviceFeeStructure Load (0.4ms) SELECT "ongoing_advice_fee_structures".* FROM "ongoing_advice_fee_structures" ORDER BY "ongoing_advice_fee_structures"."id" ASC
196
+  (2.6ms) ALTER TABLE "other_advice_methods" ADD "order" integer DEFAULT 0 NOT NULL
197
+ OtherAdviceMethod Load (0.5ms) SELECT "other_advice_methods".* FROM "other_advice_methods" ORDER BY "other_advice_methods"."id" ASC
198
+  (2.9ms) ALTER TABLE "professional_bodies" ADD "order" integer DEFAULT 0 NOT NULL
199
+ ProfessionalBody Load (0.3ms) SELECT "professional_bodies".* FROM "professional_bodies" ORDER BY "professional_bodies"."id" ASC
200
+  (45.3ms) ALTER TABLE "professional_standings" ADD "order" integer DEFAULT 0 NOT NULL
201
+ ProfessionalStanding Load (0.4ms) SELECT "professional_standings".* FROM "professional_standings" ORDER BY "professional_standings"."id" ASC
202
+  (45.5ms) ALTER TABLE "qualifications" ADD "order" integer DEFAULT 0 NOT NULL
203
+ Qualification Load (0.6ms) SELECT "qualifications".* FROM "qualifications" ORDER BY "qualifications"."id" ASC
204
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150127084858"]]
205
+  (4.0ms) COMMIT
206
+ Migrating to RemoveCoversWholeOfUkFromAdvisers (20150209144836)
207
+  (0.4ms) BEGIN
208
+ Adviser Load (0.3ms) SELECT "advisers".* FROM "advisers" WHERE "advisers"."covers_whole_of_uk" = $1 ORDER BY "advisers"."id" ASC LIMIT 1000 [["covers_whole_of_uk", "t"]]
209
+  (0.3ms) ALTER TABLE "advisers" DROP "covers_whole_of_uk"
210
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150209144836"]]
211
+  (39.5ms) COMMIT
212
+ Migrating to AddLatitudeAndLongitudeToFirm (20150210113610)
213
+  (0.3ms) BEGIN
214
+  (0.6ms) ALTER TABLE "firms" ADD "latitude" float
215
+  (0.4ms) ALTER TABLE "firms" ADD "longitude" float
216
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150210113610"]]
217
+  (21.6ms) COMMIT
218
+ Migrating to AddLatitudeAndLongitudeToAdvisers (20150222092417)
219
+  (0.3ms) BEGIN
220
+  (0.3ms) ALTER TABLE "advisers" ADD "latitude" float
221
+  (0.3ms) ALTER TABLE "advisers" ADD "longitude" float
222
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150222092417"]]
223
+  (22.4ms) COMMIT
224
+ Migrating to AddCyNameToOtherAdviceMethods (20150228095315)
225
+  (0.2ms) BEGIN
226
+  (0.3ms) ALTER TABLE "other_advice_methods" ADD "cy_name" character varying
227
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150228095315"]]
228
+  (22.9ms) COMMIT
229
+ Migrating to AddCyNameToInvestmentSize (20150305150719)
230
+  (0.3ms) BEGIN
231
+  (0.3ms) ALTER TABLE "investment_sizes" ADD "cy_name" character varying
232
+ InvestmentSize Load (0.4ms) SELECT "investment_sizes".* FROM "investment_sizes" ORDER BY "investment_sizes"."order" ASC
233
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150305150719"]]
234
+  (22.2ms) COMMIT
235
+ Migrating to AddIndexOnLookupAdvisersReferenceNumber (20150423154732)
236
+  (0.2ms) BEGIN
237
+  (24.1ms) CREATE UNIQUE INDEX "index_lookup_advisers_on_reference_number" ON "lookup_advisers" ("reference_number")
238
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150423154732"]]
239
+  (0.4ms) COMMIT
240
+ Migrating to ChangePercentageFieldsToBooleanFieldsOnFirm (20150630143001)
241
+  (0.2ms) BEGIN
242
+  (25.4ms) ALTER TABLE "firms" ADD "retirement_income_products_flag" boolean DEFAULT 'f' NOT NULL
243
+ SQL (0.4ms) UPDATE "firms" SET "retirement_income_products_flag" = 't' WHERE (retirement_income_products_percent > 0)
244
+  (0.3ms) ALTER TABLE "firms" DROP "retirement_income_products_percent"
245
+  (3.2ms) ALTER TABLE "firms" ADD "pension_transfer_flag" boolean DEFAULT 'f' NOT NULL
246
+ SQL (0.4ms) UPDATE "firms" SET "pension_transfer_flag" = 't' WHERE (pension_transfer_percent > 0)
247
+  (0.2ms) ALTER TABLE "firms" DROP "pension_transfer_percent"
248
+  (3.2ms) ALTER TABLE "firms" ADD "long_term_care_flag" boolean DEFAULT 'f' NOT NULL
249
+ SQL (0.4ms) UPDATE "firms" SET "long_term_care_flag" = 't' WHERE (long_term_care_percent > 0)
250
+  (0.2ms) ALTER TABLE "firms" DROP "long_term_care_percent"
251
+  (3.1ms) ALTER TABLE "firms" ADD "equity_release_flag" boolean DEFAULT 'f' NOT NULL
252
+ SQL (0.3ms) UPDATE "firms" SET "equity_release_flag" = 't' WHERE (equity_release_percent > 0)
253
+  (0.3ms) ALTER TABLE "firms" DROP "equity_release_percent"
254
+  (3.6ms) ALTER TABLE "firms" ADD "inheritance_tax_and_estate_planning_flag" boolean DEFAULT 'f' NOT NULL
255
+ SQL (0.4ms) UPDATE "firms" SET "inheritance_tax_and_estate_planning_flag" = 't' WHERE (inheritance_tax_and_estate_planning_percent > 0)
256
+  (0.3ms) ALTER TABLE "firms" DROP "inheritance_tax_and_estate_planning_percent"
257
+  (3.2ms) ALTER TABLE "firms" ADD "wills_and_probate_flag" boolean DEFAULT 'f' NOT NULL
258
+ SQL (0.4ms) UPDATE "firms" SET "wills_and_probate_flag" = 't' WHERE (wills_and_probate_percent > 0)
259
+  (0.3ms) ALTER TABLE "firms" DROP "wills_and_probate_percent"
260
+  (3.4ms) ALTER TABLE "firms" ADD "other_flag" boolean DEFAULT 'f' NOT NULL
261
+ SQL (0.4ms) UPDATE "firms" SET "other_flag" = 't' WHERE (other_percent > 0)
262
+  (0.2ms) ALTER TABLE "firms" DROP "other_percent"
263
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150630143001"]]
264
+  (3.3ms) COMMIT
265
+ Migrating to MoveWebsiteFromPrincipalsToFirms (20150706102943)
266
+  (0.2ms) BEGIN
267
+  (0.3ms) ALTER TABLE "firms" ADD "website_address" character varying
268
+ Principal Load (0.4ms) SELECT "principals".* FROM "principals"
269
+  (0.2ms) ALTER TABLE "principals" DROP "website_address"
270
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150706102943"]]
271
+  (40.5ms) COMMIT
272
+ Migrating to RemoveOtherFlagFromFirms (20150716123032)
273
+  (0.2ms) BEGIN
274
+  (0.5ms) ALTER TABLE "firms" DROP "other_flag"
275
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150716123032"]]
276
+  (39.6ms) COMMIT
277
+ Migrating to AddInvestingCheckboxesToFirms (20150806143047)
278
+  (0.2ms) BEGIN
279
+  (46.6ms) ALTER TABLE "firms" ADD "ethical_investing_flag" boolean DEFAULT 'f' NOT NULL
280
+  (3.1ms) ALTER TABLE "firms" ADD "sharia_investing_flag" boolean DEFAULT 'f' NOT NULL
281
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150806143047"]]
282
+  (1.2ms) COMMIT
283
+ Migrating to AddLanguagesToFirm (20150807134551)
284
+  (0.1ms) BEGIN
285
+  (32.8ms) ALTER TABLE "firms" ADD "languages" text[] DEFAULT '{}' NOT NULL
286
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150807134551"]]
287
+  (0.8ms) COMMIT
288
+ Migrating to CreateOffices (20150812140642)
289
+  (0.2ms) BEGIN
290
+  (23.9ms) CREATE TABLE "offices" ("id" serial primary key, "address_line_one" character varying NOT NULL, "address_line_two" character varying, "address_town" character varying NOT NULL, "address_county" character varying, "address_postcode" character varying NOT NULL, "email_address" character varying, "telephone_number" character varying, "disabled_access" boolean DEFAULT 'f' NOT NULL, "firm_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
291
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150812140642"]]
292
+  (0.4ms) COMMIT
293
+ Migrating to RemoveConfirmedDisclaimerFromAdvisers (20150813103046)
294
+  (26.0ms) BEGIN
295
+  (0.4ms) ALTER TABLE "advisers" DROP "confirmed_disclaimer"
296
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150813103046"]]
297
+  (0.3ms) COMMIT
298
+ Migrating to AddStatusToFirms (20150817141257)
299
+  (0.2ms) BEGIN
300
+  (0.3ms) ALTER TABLE "firms" ADD "status" integer
301
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150817141257"]]
302
+  (23.3ms) COMMIT
303
+ Migrating to MoveFirmAddressToOffice (20150825090822)
304
+  (0.2ms) BEGIN
305
+ MoveFirmAddressToOffice::Firm Load (0.5ms) SELECT "firms".* FROM "firms" WHERE ("firms"."address_line_one" IS NOT NULL)
306
+  (0.4ms) ALTER TABLE "firms" DROP "address_line_one"
307
+  (0.3ms) ALTER TABLE "firms" DROP "address_line_two"
308
+  (0.3ms) ALTER TABLE "firms" DROP "address_town"
309
+  (0.2ms) ALTER TABLE "firms" DROP "address_county"
310
+  (0.2ms) ALTER TABLE "firms" DROP "address_postcode"
311
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150825090822"]]
312
+  (17.5ms) COMMIT
313
+ Migrating to RemoveFirmEmailAndPhone (20150930140851)
314
+  (0.2ms) BEGIN
315
+  (0.4ms) ALTER TABLE "firms" DROP "email_address"
316
+  (0.2ms) ALTER TABLE "firms" DROP "telephone_number"
317
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150930140851"]]
318
+  (20.6ms) COMMIT
319
+ Migrating to AddDefaultValueToMinimumFixedFee (20151102113518)
320
+  (0.1ms) BEGIN
321
+ AddDefaultValueToMinimumFixedFee::Firm Load (0.4ms) SELECT "firms".* FROM "firms" WHERE "firms"."minimum_fixed_fee" IS NULL
322
+  (0.3ms) ALTER TABLE "firms" ALTER COLUMN "minimum_fixed_fee" SET DEFAULT 0
323
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20151102113518"]]
324
+  (20.2ms) COMMIT
325
+ Migrating to AddLatitudeAndLongitudeToOffice (20151103161642)
326
+  (0.2ms) BEGIN
327
+  (0.4ms) ALTER TABLE "offices" ADD "latitude" float
328
+  (0.2ms) ALTER TABLE "offices" ADD "longitude" float
329
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20151103161642"]]
330
+  (22.3ms) COMMIT
331
+ Migrating to RemoveLatitudeAndLongitudeFromFirm (20151111132037)
332
+  (0.2ms) BEGIN
333
+ RemoveLatitudeAndLongitudeFromFirm::Firm Load (0.6ms) SELECT "firms".* FROM "firms" WHERE ("firms"."latitude" IS NOT NULL) AND ("firms"."longitude" IS NOT NULL) ORDER BY "firms"."id" ASC LIMIT 1000
334
+  (0.3ms) ALTER TABLE "firms" DROP "latitude"
335
+  (0.2ms) ALTER TABLE "firms" DROP "longitude"
336
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20151111132037"]]
337
+  (18.7ms) COMMIT
338
+ Migrating to AddBypassReferenceNumberCheckToAdvisers (20160205150033)
339
+  (0.2ms) BEGIN
340
+  (26.4ms) ALTER TABLE "advisers" ADD "bypass_reference_number_check" boolean DEFAULT 'f'
341
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160205150033"]]
342
+  (0.8ms) COMMIT
343
+ Migrating to CreateSnapshots (20160211161127)
344
+  (0.1ms) BEGIN
345
+  (23.9ms) CREATE TABLE "snapshots" ("id" serial primary key, "firms_with_no_minimum_fee" integer, "integer" integer, "firms_with_min_fee_between_1_500" integer, "firms_with_min_fee_between_501_1000" integer, "firms_any_pot_size" integer, "firms_any_pot_size_min_fee_less_than_500" integer, "registered_firms" integer, "published_firms" integer, "firms_offering_face_to_face_advice" integer, "firms_offering_remote_advice" integer, "firms_in_england" integer, "firms_in_scotland" integer, "firms_in_wales" integer, "firms_in_northern_ireland" integer, "firms_providing_retirement_income_products" integer, "firms_providing_pension_transfer" integer, "firms_providing_long_term_care" integer, "firms_providing_equity_release" integer, "firms_providing_inheritance_tax_and_estate_planning" integer, "firms_providing_wills_and_probate" integer, "firms_providing_ethical_investing" integer, "firms_providing_sharia_investing" integer, "firms_offering_languages_other_than_english" integer, "offices_with_disabled_access" integer, "registered_advisers" integer, "advisers_in_england" integer, "advisers_in_scotland" integer, "advisers_in_wales" integer, "advisers_in_northern_ireland" integer, "advisers_who_travel_5_miles" integer, "advisers_who_travel_10_miles" integer, "advisers_who_travel_25_miles" integer, "advisers_who_travel_50_miles" integer, "advisers_who_travel_100_miles" integer, "advisers_who_travel_150_miles" integer, "advisers_who_travel_200_miles" integer, "advisers_who_travel_250_miles" integer, "advisers_who_travel_uk_wide" integer, "advisers_accredited_in_solla" integer, "advisers_accredited_in_later_life_academy" integer, "advisers_accredited_in_iso22222" integer, "advisers_accredited_in_bs8577" integer, "advisers_with_qualification_in_level_4" integer, "advisers_with_qualification_in_level_6" integer, "advisers_with_qualification_in_chartered_financial_planner" integer, "advisers_with_qualification_in_certified_financial_planner" integer, "advisers_with_qualification_in_pension_transfer" integer, "advisers_with_qualification_in_equity_release" integer, "advisers_with_qualification_in_long_term_care_planning" integer, "advisers_with_qualification_in_tep" integer, "advisers_with_qualification_in_fcii" integer, "advisers_part_of_personal_finance_society" integer, "advisers_part_of_institute_financial_planning" integer, "advisers_part_of_institute_financial_services" integer, "advisers_part_of_ci_bankers_scotland" integer, "advisers_part_of_ci_securities_and_investments" integer, "advisers_part_of_cfa_institute" integer, "advisers_part_of_chartered_accountants" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)
346
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160211161127"]]
347
+  (0.5ms) COMMIT
348
+ Migrating to RemoveOtherAccreditation (20160222091312)
349
+  (24.7ms) BEGIN
350
+ RemoveOtherAccreditation::Accreditation Load (0.3ms) SELECT "accreditations".* FROM "accreditations" WHERE "accreditations"."name" = $1 [["name", "Other"]]
351
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160222091312"]]
352
+  (0.3ms) COMMIT
353
+ Migrating to AddSessionsTable (20160317103053)
354
+  (0.1ms) BEGIN
355
+ DEPRECATION WARNING: `#timestamps` 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/oliversharpe/Repo/mas-rad_core/db/migrate/20160317103053_add_sessions_table.rb:6)
356
+  (25.9ms) CREATE TABLE "rad_consumer_sessions" ("id" serial primary key, "session_id" character varying NOT NULL, "data" text, "created_at" timestamp, "updated_at" timestamp)
357
+  (0.6ms) CREATE UNIQUE INDEX "index_rad_consumer_sessions_on_session_id" ON "rad_consumer_sessions" ("session_id")
358
+  (0.8ms) CREATE INDEX "index_rad_consumer_sessions_on_updated_at" ON "rad_consumer_sessions" ("updated_at")
359
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160317103053"]]
360
+  (0.3ms) COMMIT
361
+ Migrating to AddWorkplaceFinancialAdviceToFirms (20160325155550)
362
+  (26.0ms) BEGIN
363
+  (3.9ms) ALTER TABLE "firms" ADD "workplace_financial_advice_flag" boolean DEFAULT 'f' NOT NULL
364
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160325155550"]]
365
+  (0.9ms) COMMIT
366
+ Migrating to AddWorkplaceFinancialAdviceToSnapshots (20160328130032)
367
+  (0.2ms) BEGIN
368
+  (25.0ms) ALTER TABLE "snapshots" ADD "firms_providing_workplace_financial_advice" integer DEFAULT 0
369
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160328130032"]]
370
+  (0.7ms) COMMIT
371
+ Migrating to AddNonUkResidentsToFirms (20160329105636)
372
+  (0.2ms) BEGIN
373
+  (27.5ms) ALTER TABLE "firms" ADD "non_uk_residents_flag" boolean DEFAULT 'f' NOT NULL
374
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160329105636"]]
375
+  (2.3ms) COMMIT
376
+ Migrating to AddAddNonUkResidentsToSnapshots (20160329110348)
377
+  (0.2ms) BEGIN
378
+  (24.3ms) ALTER TABLE "snapshots" ADD "firms_providing_non_uk_residents" integer DEFAULT 0
379
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20160329110348"]]
380
+  (0.7ms) COMMIT
381
+ Migrating to AddWebsiteToOffice (20161216141323)
382
+  (0.1ms) BEGIN
383
+  (0.3ms) ALTER TABLE "offices" ADD "website" character varying
384
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161216141323"]]
385
+  (23.5ms) COMMIT
386
+ ActiveRecord::SchemaMigration Load (24.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
387
+  (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
388
+ FROM pg_constraint c
389
+ JOIN pg_class t1 ON c.conrelid = t1.oid
390
+ JOIN pg_class t2 ON c.confrelid = t2.oid
391
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
392
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
393
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
394
+ WHERE c.contype = 'f'
395
+ AND t1.relname = 'accreditations'
396
+ AND t3.nspname = ANY (current_schemas(false))
397
+ ORDER BY c.conname
398
+
399
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
400
+ FROM pg_constraint c
401
+ JOIN pg_class t1 ON c.conrelid = t1.oid
402
+ JOIN pg_class t2 ON c.confrelid = t2.oid
403
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
404
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
405
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
406
+ WHERE c.contype = 'f'
407
+ AND t1.relname = 'accreditations_advisers'
408
+ AND t3.nspname = ANY (current_schemas(false))
409
+ ORDER BY c.conname
410
+ 
411
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
412
+ FROM pg_constraint c
413
+ JOIN pg_class t1 ON c.conrelid = t1.oid
414
+ JOIN pg_class t2 ON c.confrelid = t2.oid
415
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
416
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
417
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
418
+ WHERE c.contype = 'f'
419
+ AND t1.relname = 'advisers'
420
+ AND t3.nspname = ANY (current_schemas(false))
421
+ ORDER BY c.conname
422
+
423
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
424
+ FROM pg_constraint c
425
+ JOIN pg_class t1 ON c.conrelid = t1.oid
426
+ JOIN pg_class t2 ON c.confrelid = t2.oid
427
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
428
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
429
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
430
+ WHERE c.contype = 'f'
431
+ AND t1.relname = 'advisers_professional_bodies'
432
+ AND t3.nspname = ANY (current_schemas(false))
433
+ ORDER BY c.conname
434
+ 
435
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
436
+ FROM pg_constraint c
437
+ JOIN pg_class t1 ON c.conrelid = t1.oid
438
+ JOIN pg_class t2 ON c.confrelid = t2.oid
439
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
440
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
441
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
442
+ WHERE c.contype = 'f'
443
+ AND t1.relname = 'advisers_professional_standings'
444
+ AND t3.nspname = ANY (current_schemas(false))
445
+ ORDER BY c.conname
446
+
447
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
448
+ FROM pg_constraint c
449
+ JOIN pg_class t1 ON c.conrelid = t1.oid
450
+ JOIN pg_class t2 ON c.confrelid = t2.oid
451
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
452
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
453
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
454
+ WHERE c.contype = 'f'
455
+ AND t1.relname = 'advisers_qualifications'
456
+ AND t3.nspname = ANY (current_schemas(false))
457
+ ORDER BY c.conname
458
+ 
459
+  (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
460
+ FROM pg_constraint c
461
+ JOIN pg_class t1 ON c.conrelid = t1.oid
462
+ JOIN pg_class t2 ON c.confrelid = t2.oid
463
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
464
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
465
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
466
+ WHERE c.contype = 'f'
467
+ AND t1.relname = 'allowed_payment_methods'
468
+ AND t3.nspname = ANY (current_schemas(false))
469
+ ORDER BY c.conname
470
+
471
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
472
+ FROM pg_constraint c
473
+ JOIN pg_class t1 ON c.conrelid = t1.oid
474
+ JOIN pg_class t2 ON c.confrelid = t2.oid
475
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
476
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
477
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
478
+ WHERE c.contype = 'f'
479
+ AND t1.relname = 'allowed_payment_methods_firms'
480
+ AND t3.nspname = ANY (current_schemas(false))
481
+ ORDER BY c.conname
482
+ 
483
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
484
+ FROM pg_constraint c
485
+ JOIN pg_class t1 ON c.conrelid = t1.oid
486
+ JOIN pg_class t2 ON c.confrelid = t2.oid
487
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
488
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
489
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
490
+ WHERE c.contype = 'f'
491
+ AND t1.relname = 'firms'
492
+ AND t3.nspname = ANY (current_schemas(false))
493
+ ORDER BY c.conname
494
+
495
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
496
+ FROM pg_constraint c
497
+ JOIN pg_class t1 ON c.conrelid = t1.oid
498
+ JOIN pg_class t2 ON c.confrelid = t2.oid
499
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
500
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
501
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
502
+ WHERE c.contype = 'f'
503
+ AND t1.relname = 'firms_in_person_advice_methods'
504
+ AND t3.nspname = ANY (current_schemas(false))
505
+ ORDER BY c.conname
506
+ 
507
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
508
+ FROM pg_constraint c
509
+ JOIN pg_class t1 ON c.conrelid = t1.oid
510
+ JOIN pg_class t2 ON c.confrelid = t2.oid
511
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
512
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
513
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
514
+ WHERE c.contype = 'f'
515
+ AND t1.relname = 'firms_initial_advice_fee_structures'
516
+ AND t3.nspname = ANY (current_schemas(false))
517
+ ORDER BY c.conname
518
+
519
+  (1.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
520
+ FROM pg_constraint c
521
+ JOIN pg_class t1 ON c.conrelid = t1.oid
522
+ JOIN pg_class t2 ON c.confrelid = t2.oid
523
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
524
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
525
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
526
+ WHERE c.contype = 'f'
527
+ AND t1.relname = 'firms_investment_sizes'
528
+ AND t3.nspname = ANY (current_schemas(false))
529
+ ORDER BY c.conname
530
+ 
531
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
532
+ FROM pg_constraint c
533
+ JOIN pg_class t1 ON c.conrelid = t1.oid
534
+ JOIN pg_class t2 ON c.confrelid = t2.oid
535
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
536
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
537
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
538
+ WHERE c.contype = 'f'
539
+ AND t1.relname = 'firms_ongoing_advice_fee_structures'
540
+ AND t3.nspname = ANY (current_schemas(false))
541
+ ORDER BY c.conname
542
+
543
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
544
+ FROM pg_constraint c
545
+ JOIN pg_class t1 ON c.conrelid = t1.oid
546
+ JOIN pg_class t2 ON c.confrelid = t2.oid
547
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
548
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
549
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
550
+ WHERE c.contype = 'f'
551
+ AND t1.relname = 'firms_other_advice_methods'
552
+ AND t3.nspname = ANY (current_schemas(false))
553
+ ORDER BY c.conname
554
+ 
555
+  (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
556
+ FROM pg_constraint c
557
+ JOIN pg_class t1 ON c.conrelid = t1.oid
558
+ JOIN pg_class t2 ON c.confrelid = t2.oid
559
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
560
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
561
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
562
+ WHERE c.contype = 'f'
563
+ AND t1.relname = 'in_person_advice_methods'
564
+ AND t3.nspname = ANY (current_schemas(false))
565
+ ORDER BY c.conname
566
+
567
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
568
+ FROM pg_constraint c
569
+ JOIN pg_class t1 ON c.conrelid = t1.oid
570
+ JOIN pg_class t2 ON c.confrelid = t2.oid
571
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
572
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
573
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
574
+ WHERE c.contype = 'f'
575
+ AND t1.relname = 'initial_advice_fee_structures'
576
+ AND t3.nspname = ANY (current_schemas(false))
577
+ ORDER BY c.conname
578
+ 
579
+  (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
580
+ FROM pg_constraint c
581
+ JOIN pg_class t1 ON c.conrelid = t1.oid
582
+ JOIN pg_class t2 ON c.confrelid = t2.oid
583
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
584
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
585
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
586
+ WHERE c.contype = 'f'
587
+ AND t1.relname = 'initial_meeting_durations'
588
+ AND t3.nspname = ANY (current_schemas(false))
589
+ ORDER BY c.conname
590
+
591
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
592
+ FROM pg_constraint c
593
+ JOIN pg_class t1 ON c.conrelid = t1.oid
594
+ JOIN pg_class t2 ON c.confrelid = t2.oid
595
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
596
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
597
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
598
+ WHERE c.contype = 'f'
599
+ AND t1.relname = 'investment_sizes'
600
+ AND t3.nspname = ANY (current_schemas(false))
601
+ ORDER BY c.conname
602
+ 
603
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
604
+ FROM pg_constraint c
605
+ JOIN pg_class t1 ON c.conrelid = t1.oid
606
+ JOIN pg_class t2 ON c.confrelid = t2.oid
607
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
608
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
609
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
610
+ WHERE c.contype = 'f'
611
+ AND t1.relname = 'lookup_advisers'
612
+ AND t3.nspname = ANY (current_schemas(false))
613
+ ORDER BY c.conname
614
+
615
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
616
+ FROM pg_constraint c
617
+ JOIN pg_class t1 ON c.conrelid = t1.oid
618
+ JOIN pg_class t2 ON c.confrelid = t2.oid
619
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
620
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
621
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
622
+ WHERE c.contype = 'f'
623
+ AND t1.relname = 'lookup_firms'
624
+ AND t3.nspname = ANY (current_schemas(false))
625
+ ORDER BY c.conname
626
+ 
627
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
628
+ FROM pg_constraint c
629
+ JOIN pg_class t1 ON c.conrelid = t1.oid
630
+ JOIN pg_class t2 ON c.confrelid = t2.oid
631
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
632
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
633
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
634
+ WHERE c.contype = 'f'
635
+ AND t1.relname = 'lookup_subsidiaries'
636
+ AND t3.nspname = ANY (current_schemas(false))
637
+ ORDER BY c.conname
638
+
639
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
640
+ FROM pg_constraint c
641
+ JOIN pg_class t1 ON c.conrelid = t1.oid
642
+ JOIN pg_class t2 ON c.confrelid = t2.oid
643
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
644
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
645
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
646
+ WHERE c.contype = 'f'
647
+ AND t1.relname = 'offices'
648
+ AND t3.nspname = ANY (current_schemas(false))
649
+ ORDER BY c.conname
650
+ 
651
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
652
+ FROM pg_constraint c
653
+ JOIN pg_class t1 ON c.conrelid = t1.oid
654
+ JOIN pg_class t2 ON c.confrelid = t2.oid
655
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
656
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
657
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
658
+ WHERE c.contype = 'f'
659
+ AND t1.relname = 'ongoing_advice_fee_structures'
660
+ AND t3.nspname = ANY (current_schemas(false))
661
+ ORDER BY c.conname
662
+
663
+  (1.7ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
664
+ FROM pg_constraint c
665
+ JOIN pg_class t1 ON c.conrelid = t1.oid
666
+ JOIN pg_class t2 ON c.confrelid = t2.oid
667
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
668
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
669
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
670
+ WHERE c.contype = 'f'
671
+ AND t1.relname = 'other_advice_methods'
672
+ AND t3.nspname = ANY (current_schemas(false))
673
+ ORDER BY c.conname
674
+ 
675
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
676
+ FROM pg_constraint c
677
+ JOIN pg_class t1 ON c.conrelid = t1.oid
678
+ JOIN pg_class t2 ON c.confrelid = t2.oid
679
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
680
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
681
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
682
+ WHERE c.contype = 'f'
683
+ AND t1.relname = 'principals'
684
+ AND t3.nspname = ANY (current_schemas(false))
685
+ ORDER BY c.conname
686
+
687
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
688
+ FROM pg_constraint c
689
+ JOIN pg_class t1 ON c.conrelid = t1.oid
690
+ JOIN pg_class t2 ON c.confrelid = t2.oid
691
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
692
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
693
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
694
+ WHERE c.contype = 'f'
695
+ AND t1.relname = 'professional_bodies'
696
+ AND t3.nspname = ANY (current_schemas(false))
697
+ ORDER BY c.conname
698
+ 
699
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
700
+ FROM pg_constraint c
701
+ JOIN pg_class t1 ON c.conrelid = t1.oid
702
+ JOIN pg_class t2 ON c.confrelid = t2.oid
703
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
704
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
705
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
706
+ WHERE c.contype = 'f'
707
+ AND t1.relname = 'professional_standings'
708
+ AND t3.nspname = ANY (current_schemas(false))
709
+ ORDER BY c.conname
710
+
711
+  (1.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
712
+ FROM pg_constraint c
713
+ JOIN pg_class t1 ON c.conrelid = t1.oid
714
+ JOIN pg_class t2 ON c.confrelid = t2.oid
715
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
716
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
717
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
718
+ WHERE c.contype = 'f'
719
+ AND t1.relname = 'qualifications'
720
+ AND t3.nspname = ANY (current_schemas(false))
721
+ ORDER BY c.conname
722
+ 
723
+  (1.5ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
724
+ FROM pg_constraint c
725
+ JOIN pg_class t1 ON c.conrelid = t1.oid
726
+ JOIN pg_class t2 ON c.confrelid = t2.oid
727
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
728
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
729
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
730
+ WHERE c.contype = 'f'
731
+ AND t1.relname = 'rad_consumer_sessions'
732
+ AND t3.nspname = ANY (current_schemas(false))
733
+ ORDER BY c.conname
734
+
735
+  (1.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
736
+ FROM pg_constraint c
737
+ JOIN pg_class t1 ON c.conrelid = t1.oid
738
+ JOIN pg_class t2 ON c.confrelid = t2.oid
739
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
740
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
741
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
742
+ WHERE c.contype = 'f'
743
+ AND t1.relname = 'snapshots'
744
+ AND t3.nspname = ANY (current_schemas(false))
745
+ ORDER BY c.conname
746
+ 
747
+ SQL (41.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
748
+  (4.9ms) DROP TABLE "accreditations" CASCADE
749
+  (5.0ms) CREATE TABLE "accreditations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
750
+  (0.8ms) DROP TABLE "accreditations_advisers" CASCADE
751
+  (0.7ms) CREATE TABLE "accreditations_advisers" ("adviser_id" integer NOT NULL, "accreditation_id" integer NOT NULL) 
752
+  (0.9ms) CREATE UNIQUE INDEX "advisers_accreditations_index" ON "accreditations_advisers" USING btree ("adviser_id", "accreditation_id")
753
+  (1.5ms) DROP TABLE "advisers" CASCADE
754
+  (4.4ms) 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, "postcode" character varying DEFAULT '' NOT NULL, "travel_distance" integer DEFAULT 0 NOT NULL, "latitude" float, "longitude" float, "bypass_reference_number_check" boolean DEFAULT 'f')
755
+  (0.8ms) DROP TABLE "advisers_professional_bodies" CASCADE
756
+  (0.8ms) CREATE TABLE "advisers_professional_bodies" ("adviser_id" integer NOT NULL, "professional_body_id" integer NOT NULL)
757
+  (1.0ms) CREATE UNIQUE INDEX "advisers_professional_bodies_index" ON "advisers_professional_bodies" USING btree ("adviser_id", "professional_body_id")
758
+  (0.7ms) DROP TABLE "advisers_professional_standings" CASCADE
759
+  (1.4ms) CREATE TABLE "advisers_professional_standings" ("adviser_id" integer NOT NULL, "professional_standing_id" integer NOT NULL) 
760
+  (0.7ms) CREATE UNIQUE INDEX "advisers_professional_standings_index" ON "advisers_professional_standings" USING btree ("adviser_id", "professional_standing_id")
761
+  (0.7ms) DROP TABLE "advisers_qualifications" CASCADE
762
+  (0.8ms) CREATE TABLE "advisers_qualifications" ("adviser_id" integer NOT NULL, "qualification_id" integer NOT NULL)
763
+  (1.0ms) CREATE UNIQUE INDEX "advisers_qualifications_index" ON "advisers_qualifications" USING btree ("adviser_id", "qualification_id")
764
+  (1.3ms) DROP TABLE "allowed_payment_methods" CASCADE
765
+  (2.7ms) CREATE TABLE "allowed_payment_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
766
+  (0.7ms) DROP TABLE "allowed_payment_methods_firms" CASCADE
767
+  (0.7ms) CREATE TABLE "allowed_payment_methods_firms" ("firm_id" integer NOT NULL, "allowed_payment_method_id" integer NOT NULL) 
768
+  (0.9ms) CREATE UNIQUE INDEX "firms_allowed_payment_methods_index" ON "allowed_payment_methods_firms" USING btree ("firm_id", "allowed_payment_method_id")
769
+  (2.3ms) DROP TABLE "firms" CASCADE
770
+  (3.1ms) CREATE TABLE "firms" ("id" serial primary key, "fca_number" integer NOT NULL, "registered_name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "free_initial_meeting" boolean, "initial_meeting_duration_id" integer, "minimum_fixed_fee" integer DEFAULT 0, "parent_id" integer, "retirement_income_products_flag" boolean DEFAULT 'f' NOT NULL, "pension_transfer_flag" boolean DEFAULT 'f' NOT NULL, "long_term_care_flag" boolean DEFAULT 'f' NOT NULL, "equity_release_flag" boolean DEFAULT 'f' NOT NULL, "inheritance_tax_and_estate_planning_flag" boolean DEFAULT 'f' NOT NULL, "wills_and_probate_flag" boolean DEFAULT 'f' NOT NULL, "website_address" character varying, "ethical_investing_flag" boolean DEFAULT 'f' NOT NULL, "sharia_investing_flag" boolean DEFAULT 'f' NOT NULL, "languages" text[] DEFAULT '{}' NOT NULL, "status" integer, "workplace_financial_advice_flag" boolean DEFAULT 'f' NOT NULL, "non_uk_residents_flag" boolean DEFAULT 'f' NOT NULL)
771
+  (1.2ms) CREATE INDEX "index_firms_on_initial_meeting_duration_id" ON "firms" USING btree ("initial_meeting_duration_id")
772
+  (0.7ms) DROP TABLE "firms_in_person_advice_methods" CASCADE
773
+  (0.6ms) CREATE TABLE "firms_in_person_advice_methods" ("firm_id" integer NOT NULL, "in_person_advice_method_id" integer NOT NULL) 
774
+  (1.3ms) CREATE UNIQUE INDEX "firms_in_person_advice_methods_index" ON "firms_in_person_advice_methods" USING btree ("firm_id", "in_person_advice_method_id")
775
+  (1.1ms) DROP TABLE "firms_initial_advice_fee_structures" CASCADE
776
+  (0.6ms) CREATE TABLE "firms_initial_advice_fee_structures" ("firm_id" integer NOT NULL, "initial_advice_fee_structure_id" integer NOT NULL)
777
+  (0.8ms) CREATE UNIQUE INDEX "firms_initial_advice_fee_structures_index" ON "firms_initial_advice_fee_structures" USING btree ("firm_id", "initial_advice_fee_structure_id")
778
+  (0.6ms) DROP TABLE "firms_investment_sizes" CASCADE
779
+  (0.5ms) CREATE TABLE "firms_investment_sizes" ("firm_id" integer NOT NULL, "investment_size_id" integer NOT NULL) 
780
+  (0.7ms) CREATE UNIQUE INDEX "firms_investment_sizes_index" ON "firms_investment_sizes" USING btree ("firm_id", "investment_size_id")
781
+  (1.1ms) DROP TABLE "firms_ongoing_advice_fee_structures" CASCADE
782
+  (0.7ms) CREATE TABLE "firms_ongoing_advice_fee_structures" ("firm_id" integer NOT NULL, "ongoing_advice_fee_structure_id" integer NOT NULL)
783
+  (1.0ms) CREATE UNIQUE INDEX "firms_ongoing_advice_fee_structures_index" ON "firms_ongoing_advice_fee_structures" USING btree ("firm_id", "ongoing_advice_fee_structure_id")
784
+  (0.7ms) DROP TABLE "firms_other_advice_methods" CASCADE
785
+  (0.6ms) CREATE TABLE "firms_other_advice_methods" ("firm_id" integer NOT NULL, "other_advice_method_id" integer NOT NULL) 
786
+  (0.8ms) CREATE UNIQUE INDEX "firms_other_advice_methods_index" ON "firms_other_advice_methods" USING btree ("firm_id", "other_advice_method_id")
787
+  (1.8ms) DROP TABLE "in_person_advice_methods" CASCADE
788
+  (2.3ms) 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, "order" integer DEFAULT 0 NOT NULL)
789
+  (1.2ms) DROP TABLE "initial_advice_fee_structures" CASCADE
790
+  (2.4ms) 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, "order" integer DEFAULT 0 NOT NULL)
791
+  (1.2ms) DROP TABLE "initial_meeting_durations" CASCADE
792
+  (2.4ms) CREATE TABLE "initial_meeting_durations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL)
793
+  (1.3ms) DROP TABLE "investment_sizes" CASCADE
794
+  (2.5ms) CREATE TABLE "investment_sizes" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL, "cy_name" character varying)
795
+  (1.5ms) DROP TABLE "lookup_advisers" CASCADE
796
+  (2.8ms) 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)
797
+  (0.9ms) CREATE UNIQUE INDEX "index_lookup_advisers_on_reference_number" ON "lookup_advisers" USING btree ("reference_number")
798
+  (1.6ms) DROP TABLE "lookup_firms" CASCADE
799
+  (3.4ms) 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) 
800
+  (0.7ms) CREATE UNIQUE INDEX "index_lookup_firms_on_fca_number" ON "lookup_firms" USING btree ("fca_number")
801
+  (1.5ms) DROP TABLE "lookup_subsidiaries" CASCADE
802
+  (2.6ms) 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)
803
+  (0.8ms) CREATE INDEX "index_lookup_subsidiaries_on_fca_number" ON "lookup_subsidiaries" USING btree ("fca_number")
804
+  (1.3ms) DROP TABLE "offices" CASCADE
805
+  (2.6ms) CREATE TABLE "offices" ("id" serial primary key, "address_line_one" character varying NOT NULL, "address_line_two" character varying, "address_town" character varying NOT NULL, "address_county" character varying, "address_postcode" character varying NOT NULL, "email_address" character varying, "telephone_number" character varying, "disabled_access" boolean DEFAULT 'f' NOT NULL, "firm_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "latitude" float, "longitude" float, "website" character varying) 
806
+  (1.4ms) DROP TABLE "ongoing_advice_fee_structures" CASCADE
807
+  (2.9ms) 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, "order" integer DEFAULT 0 NOT NULL) 
808
+  (1.4ms) DROP TABLE "other_advice_methods" CASCADE
809
+  (2.6ms) CREATE TABLE "other_advice_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL, "cy_name" character varying) 
810
+  (1.7ms) DROP TABLE "principals" CASCADE
811
+  (3.4ms) CREATE TABLE "principals" ("id" serial primary key, "fca_number" integer, "token" 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) 
812
+  (0.7ms) CREATE UNIQUE INDEX "index_principals_on_fca_number" ON "principals" USING btree ("fca_number")
813
+  (0.9ms) CREATE UNIQUE INDEX "index_principals_on_token" ON "principals" USING btree ("token")
814
+  (1.2ms) DROP TABLE "professional_bodies" CASCADE
815
+  (3.0ms) CREATE TABLE "professional_bodies" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
816
+  (2.0ms) DROP TABLE "professional_standings" CASCADE
817
+  (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, "order" integer DEFAULT 0 NOT NULL) 
818
+  (1.4ms) DROP TABLE "qualifications" CASCADE
819
+  (2.1ms) CREATE TABLE "qualifications" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
820
+  (1.6ms) DROP TABLE "rad_consumer_sessions" CASCADE
821
+  (2.4ms) CREATE TABLE "rad_consumer_sessions" ("id" serial primary key, "session_id" character varying NOT NULL, "data" text, "created_at" timestamp, "updated_at" timestamp) 
822
+  (0.8ms) CREATE UNIQUE INDEX "index_rad_consumer_sessions_on_session_id" ON "rad_consumer_sessions" USING btree ("session_id")
823
+  (1.0ms) CREATE INDEX "index_rad_consumer_sessions_on_updated_at" ON "rad_consumer_sessions" USING btree ("updated_at")
824
+  (1.3ms) DROP TABLE "snapshots" CASCADE
825
+  (2.4ms) CREATE TABLE "snapshots" ("id" serial primary key, "firms_with_no_minimum_fee" integer, "integer" integer, "firms_with_min_fee_between_1_500" integer, "firms_with_min_fee_between_501_1000" integer, "firms_any_pot_size" integer, "firms_any_pot_size_min_fee_less_than_500" integer, "registered_firms" integer, "published_firms" integer, "firms_offering_face_to_face_advice" integer, "firms_offering_remote_advice" integer, "firms_in_england" integer, "firms_in_scotland" integer, "firms_in_wales" integer, "firms_in_northern_ireland" integer, "firms_providing_retirement_income_products" integer, "firms_providing_pension_transfer" integer, "firms_providing_long_term_care" integer, "firms_providing_equity_release" integer, "firms_providing_inheritance_tax_and_estate_planning" integer, "firms_providing_wills_and_probate" integer, "firms_providing_ethical_investing" integer, "firms_providing_sharia_investing" integer, "firms_offering_languages_other_than_english" integer, "offices_with_disabled_access" integer, "registered_advisers" integer, "advisers_in_england" integer, "advisers_in_scotland" integer, "advisers_in_wales" integer, "advisers_in_northern_ireland" integer, "advisers_who_travel_5_miles" integer, "advisers_who_travel_10_miles" integer, "advisers_who_travel_25_miles" integer, "advisers_who_travel_50_miles" integer, "advisers_who_travel_100_miles" integer, "advisers_who_travel_150_miles" integer, "advisers_who_travel_200_miles" integer, "advisers_who_travel_250_miles" integer, "advisers_who_travel_uk_wide" integer, "advisers_accredited_in_solla" integer, "advisers_accredited_in_later_life_academy" integer, "advisers_accredited_in_iso22222" integer, "advisers_accredited_in_bs8577" integer, "advisers_with_qualification_in_level_4" integer, "advisers_with_qualification_in_level_6" integer, "advisers_with_qualification_in_chartered_financial_planner" integer, "advisers_with_qualification_in_certified_financial_planner" integer, "advisers_with_qualification_in_pension_transfer" integer, "advisers_with_qualification_in_equity_release" integer, "advisers_with_qualification_in_long_term_care_planning" integer, "advisers_with_qualification_in_tep" integer, "advisers_with_qualification_in_fcii" integer, "advisers_part_of_personal_finance_society" integer, "advisers_part_of_institute_financial_planning" integer, "advisers_part_of_institute_financial_services" integer, "advisers_part_of_ci_bankers_scotland" integer, "advisers_part_of_ci_securities_and_investments" integer, "advisers_part_of_cfa_institute" integer, "advisers_part_of_chartered_accountants" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "firms_providing_workplace_financial_advice" integer DEFAULT 0, "firms_providing_non_uk_residents" integer DEFAULT 0) 
826
+  (0.4ms) SELECT version FROM "schema_migrations"
827
+ SQL (0.4ms) CREATE EXTENSION IF NOT EXISTS "plpgsql"
828
+  (4.7ms) CREATE TABLE "accreditations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL)
829
+  (0.8ms) CREATE TABLE "accreditations_advisers" ("adviser_id" integer NOT NULL, "accreditation_id" integer NOT NULL) 
830
+  (0.9ms) CREATE UNIQUE INDEX "advisers_accreditations_index" ON "accreditations_advisers" USING btree ("adviser_id", "accreditation_id")
831
+  (2.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, "postcode" character varying DEFAULT '' NOT NULL, "travel_distance" integer DEFAULT 0 NOT NULL, "latitude" float, "longitude" float, "bypass_reference_number_check" boolean DEFAULT 'f') 
832
+  (0.6ms) CREATE TABLE "advisers_professional_bodies" ("adviser_id" integer NOT NULL, "professional_body_id" integer NOT NULL)
833
+  (0.7ms) CREATE UNIQUE INDEX "advisers_professional_bodies_index" ON "advisers_professional_bodies" USING btree ("adviser_id", "professional_body_id")
834
+  (0.7ms) CREATE TABLE "advisers_professional_standings" ("adviser_id" integer NOT NULL, "professional_standing_id" integer NOT NULL)
835
+  (0.9ms) CREATE UNIQUE INDEX "advisers_professional_standings_index" ON "advisers_professional_standings" USING btree ("adviser_id", "professional_standing_id")
836
+  (0.7ms) CREATE TABLE "advisers_qualifications" ("adviser_id" integer NOT NULL, "qualification_id" integer NOT NULL)
837
+  (0.9ms) CREATE UNIQUE INDEX "advisers_qualifications_index" ON "advisers_qualifications" USING btree ("adviser_id", "qualification_id")
838
+  (2.7ms) CREATE TABLE "allowed_payment_methods" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL)
839
+  (0.6ms) CREATE TABLE "allowed_payment_methods_firms" ("firm_id" integer NOT NULL, "allowed_payment_method_id" integer NOT NULL) 
840
+  (1.1ms) CREATE UNIQUE INDEX "firms_allowed_payment_methods_index" ON "allowed_payment_methods_firms" USING btree ("firm_id", "allowed_payment_method_id")
841
+  (3.8ms) CREATE TABLE "firms" ("id" serial primary key, "fca_number" integer NOT NULL, "registered_name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "free_initial_meeting" boolean, "initial_meeting_duration_id" integer, "minimum_fixed_fee" integer DEFAULT 0, "parent_id" integer, "retirement_income_products_flag" boolean DEFAULT 'f' NOT NULL, "pension_transfer_flag" boolean DEFAULT 'f' NOT NULL, "long_term_care_flag" boolean DEFAULT 'f' NOT NULL, "equity_release_flag" boolean DEFAULT 'f' NOT NULL, "inheritance_tax_and_estate_planning_flag" boolean DEFAULT 'f' NOT NULL, "wills_and_probate_flag" boolean DEFAULT 'f' NOT NULL, "website_address" character varying, "ethical_investing_flag" boolean DEFAULT 'f' NOT NULL, "sharia_investing_flag" boolean DEFAULT 'f' NOT NULL, "languages" text[] DEFAULT '{}' NOT NULL, "status" integer, "workplace_financial_advice_flag" boolean DEFAULT 'f' NOT NULL, "non_uk_residents_flag" boolean DEFAULT 'f' NOT NULL) 
842
+  (0.8ms) CREATE INDEX "index_firms_on_initial_meeting_duration_id" ON "firms" USING btree ("initial_meeting_duration_id")
843
+  (0.8ms) CREATE TABLE "firms_in_person_advice_methods" ("firm_id" integer NOT NULL, "in_person_advice_method_id" integer NOT NULL) 
844
+  (0.8ms) CREATE UNIQUE INDEX "firms_in_person_advice_methods_index" ON "firms_in_person_advice_methods" USING btree ("firm_id", "in_person_advice_method_id")
845
+  (0.5ms) CREATE TABLE "firms_initial_advice_fee_structures" ("firm_id" integer NOT NULL, "initial_advice_fee_structure_id" integer NOT NULL) 
846
+  (1.0ms) CREATE UNIQUE INDEX "firms_initial_advice_fee_structures_index" ON "firms_initial_advice_fee_structures" USING btree ("firm_id", "initial_advice_fee_structure_id")
847
+  (0.5ms) CREATE TABLE "firms_investment_sizes" ("firm_id" integer NOT NULL, "investment_size_id" integer NOT NULL) 
848
+  (0.8ms) CREATE UNIQUE INDEX "firms_investment_sizes_index" ON "firms_investment_sizes" USING btree ("firm_id", "investment_size_id")
849
+  (0.6ms) CREATE TABLE "firms_ongoing_advice_fee_structures" ("firm_id" integer NOT NULL, "ongoing_advice_fee_structure_id" integer NOT NULL) 
850
+  (0.9ms) CREATE UNIQUE INDEX "firms_ongoing_advice_fee_structures_index" ON "firms_ongoing_advice_fee_structures" USING btree ("firm_id", "ongoing_advice_fee_structure_id")
851
+  (0.7ms) CREATE TABLE "firms_other_advice_methods" ("firm_id" integer NOT NULL, "other_advice_method_id" integer NOT NULL) 
852
+  (0.8ms) CREATE UNIQUE INDEX "firms_other_advice_methods_index" ON "firms_other_advice_methods" USING btree ("firm_id", "other_advice_method_id")
853
+  (2.0ms) 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, "order" integer DEFAULT 0 NOT NULL) 
854
+  (2.2ms) 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, "order" integer DEFAULT 0 NOT NULL)
855
+  (2.4ms) CREATE TABLE "initial_meeting_durations" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
856
+  (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, "order" integer DEFAULT 0 NOT NULL, "cy_name" character varying)
857
+  (2.1ms) 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) 
858
+  (0.8ms) CREATE UNIQUE INDEX "index_lookup_advisers_on_reference_number" ON "lookup_advisers" USING btree ("reference_number")
859
+  (2.6ms) 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) 
860
+  (0.8ms) CREATE UNIQUE INDEX "index_lookup_firms_on_fca_number" ON "lookup_firms" USING btree ("fca_number")
861
+  (2.9ms) 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) 
862
+  (0.9ms) CREATE INDEX "index_lookup_subsidiaries_on_fca_number" ON "lookup_subsidiaries" USING btree ("fca_number")
863
+  (3.5ms) CREATE TABLE "offices" ("id" serial primary key, "address_line_one" character varying NOT NULL, "address_line_two" character varying, "address_town" character varying NOT NULL, "address_county" character varying, "address_postcode" character varying NOT NULL, "email_address" character varying, "telephone_number" character varying, "disabled_access" boolean DEFAULT 'f' NOT NULL, "firm_id" integer NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "latitude" float, "longitude" float, "website" character varying) 
864
+  (2.4ms) 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, "order" integer DEFAULT 0 NOT NULL)
865
+  (2.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, "order" integer DEFAULT 0 NOT NULL, "cy_name" character varying) 
866
+  (2.6ms) CREATE TABLE "principals" ("id" serial primary key, "fca_number" integer, "token" 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)
867
+  (0.8ms) CREATE UNIQUE INDEX "index_principals_on_fca_number" ON "principals" USING btree ("fca_number")
868
+  (0.9ms) CREATE UNIQUE INDEX "index_principals_on_token" ON "principals" USING btree ("token")
869
+  (2.6ms) CREATE TABLE "professional_bodies" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
870
+  (2.5ms) CREATE TABLE "professional_standings" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL)
871
+  (2.0ms) CREATE TABLE "qualifications" ("id" serial primary key, "name" character varying NOT NULL, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "order" integer DEFAULT 0 NOT NULL) 
872
+  (3.1ms) CREATE TABLE "rad_consumer_sessions" ("id" serial primary key, "session_id" character varying NOT NULL, "data" text, "created_at" timestamp, "updated_at" timestamp)
873
+  (0.9ms) CREATE UNIQUE INDEX "index_rad_consumer_sessions_on_session_id" ON "rad_consumer_sessions" USING btree ("session_id")
874
+  (0.9ms) CREATE INDEX "index_rad_consumer_sessions_on_updated_at" ON "rad_consumer_sessions" USING btree ("updated_at")
875
+  (2.3ms) CREATE TABLE "snapshots" ("id" serial primary key, "firms_with_no_minimum_fee" integer, "integer" integer, "firms_with_min_fee_between_1_500" integer, "firms_with_min_fee_between_501_1000" integer, "firms_any_pot_size" integer, "firms_any_pot_size_min_fee_less_than_500" integer, "registered_firms" integer, "published_firms" integer, "firms_offering_face_to_face_advice" integer, "firms_offering_remote_advice" integer, "firms_in_england" integer, "firms_in_scotland" integer, "firms_in_wales" integer, "firms_in_northern_ireland" integer, "firms_providing_retirement_income_products" integer, "firms_providing_pension_transfer" integer, "firms_providing_long_term_care" integer, "firms_providing_equity_release" integer, "firms_providing_inheritance_tax_and_estate_planning" integer, "firms_providing_wills_and_probate" integer, "firms_providing_ethical_investing" integer, "firms_providing_sharia_investing" integer, "firms_offering_languages_other_than_english" integer, "offices_with_disabled_access" integer, "registered_advisers" integer, "advisers_in_england" integer, "advisers_in_scotland" integer, "advisers_in_wales" integer, "advisers_in_northern_ireland" integer, "advisers_who_travel_5_miles" integer, "advisers_who_travel_10_miles" integer, "advisers_who_travel_25_miles" integer, "advisers_who_travel_50_miles" integer, "advisers_who_travel_100_miles" integer, "advisers_who_travel_150_miles" integer, "advisers_who_travel_200_miles" integer, "advisers_who_travel_250_miles" integer, "advisers_who_travel_uk_wide" integer, "advisers_accredited_in_solla" integer, "advisers_accredited_in_later_life_academy" integer, "advisers_accredited_in_iso22222" integer, "advisers_accredited_in_bs8577" integer, "advisers_with_qualification_in_level_4" integer, "advisers_with_qualification_in_level_6" integer, "advisers_with_qualification_in_chartered_financial_planner" integer, "advisers_with_qualification_in_certified_financial_planner" integer, "advisers_with_qualification_in_pension_transfer" integer, "advisers_with_qualification_in_equity_release" integer, "advisers_with_qualification_in_long_term_care_planning" integer, "advisers_with_qualification_in_tep" integer, "advisers_with_qualification_in_fcii" integer, "advisers_part_of_personal_finance_society" integer, "advisers_part_of_institute_financial_planning" integer, "advisers_part_of_institute_financial_services" integer, "advisers_part_of_ci_bankers_scotland" integer, "advisers_part_of_ci_securities_and_investments" integer, "advisers_part_of_cfa_institute" integer, "advisers_part_of_chartered_accountants" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "firms_providing_workplace_financial_advice" integer DEFAULT 0, "firms_providing_non_uk_residents" integer DEFAULT 0) 
876
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL)
877
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
878
+  (0.3ms) SELECT version FROM "schema_migrations"
879
+  (0.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20161216141323')
880
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20151111132037')
881
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141211110031')
882
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20160329110348')
883
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150115130949')
884
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141221140208')
885
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160325155550')
886
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20150630143001')
887
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150806143047')
888
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20160329105636')
889
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150209144836')
890
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150222092417')
891
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150807134551')
892
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150228095315')
893
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20151102113518')
894
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150114151447')
895
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121154458')
896
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160222091312')
897
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150120141928')
898
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150127084858')
899
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150210113610')
900
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150120150738')
901
+  (0.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121181341')
902
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150119102735')
903
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160328130032')
904
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160205150033')
905
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150119152325')
906
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150114144343')
907
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150124124350')
908
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150119114218')
909
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141230112136')
910
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160211161127')
911
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150716123032')
912
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121110757')
913
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150812140642')
914
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150305150719')
915
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150706102943')
916
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20151103161642')
917
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150825090822')
918
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121134845')
919
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150125145457')
920
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150106115732')
921
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20160317103053')
922
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150119152336')
923
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150120133717')
924
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150119125208')
925
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150423154732')
926
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150930140851')
927
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150813103046')
928
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121173015')
929
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150119111754')
930
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150817141257')
931
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141222150416')
932
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121123437')
933
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150121183728')
934
+  (0.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20150125164156')