mas-rad_core 0.0.60 → 0.0.61
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/firm.rb +11 -25
- data/app/serializers/firm_serializer.rb +12 -6
- data/db/migrate/20150630143001_change_percentage_fields_to_boolean_fields_on_firm.rb +35 -0
- data/lib/mas/rad_core/version.rb +1 -1
- data/spec/dummy/db/schema.rb +12 -12
- data/spec/dummy/log/development.log +375 -0
- data/spec/dummy/log/test.log +38830 -0
- data/spec/factories/firm.rb +14 -14
- data/spec/models/firm_spec.rb +0 -10
- data/spec/serializers/firm_serializer_spec.rb +6 -6
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ca006299036997a202393ee44a6c6e4c78e232e
|
4
|
+
data.tar.gz: abf066c47d2ea4411bcf577bb8eb84189e0e2eba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e206effbc6f76e6c0aa7ec2926c96214b535d4ab959039fd81bc671f9a83dd1e1896a4dccc553e468199c10c6d1969f013c2dbdd230e0ed82f1686204271ef3
|
7
|
+
data.tar.gz: ebaffaf0789f6615017a39a0e0c6a84228c92d50a6e3b173772b4d78fbcb01c033111acf7e3fb7684c48a138f6764d12f16afbc0b24c3763cc99a2b3db2351c9
|
data/app/models/firm.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
class Firm < ActiveRecord::Base
|
2
2
|
include Geocodable
|
3
3
|
|
4
|
-
|
5
|
-
:
|
6
|
-
:
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:
|
4
|
+
BUSINESS_OFFERING_ATTRIBUTES = [
|
5
|
+
:retirement_income_products_flag,
|
6
|
+
:pension_transfer_flag,
|
7
|
+
:long_term_care_flag,
|
8
|
+
:equity_release_flag,
|
9
|
+
:inheritance_tax_and_estate_planning_flag,
|
10
|
+
:wills_and_probate_flag,
|
11
|
+
:other_flag
|
12
12
|
]
|
13
13
|
|
14
14
|
scope :registered, -> { where.not(email_address: nil) }
|
@@ -80,11 +80,8 @@ class Firm < ActiveRecord::Base
|
|
80
80
|
allow_blank: true,
|
81
81
|
numericality: { only_integer: true }
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
validates *PERCENTAGE_ATTRIBUTES,
|
86
|
-
presence: true,
|
87
|
-
numericality: { only_integer: true }
|
83
|
+
validates *BUSINESS_OFFERING_ATTRIBUTES,
|
84
|
+
inclusion: { in: [true, false] }
|
88
85
|
|
89
86
|
validates :investment_sizes,
|
90
87
|
length: { minimum: 1 }
|
@@ -130,7 +127,7 @@ class Firm < ActiveRecord::Base
|
|
130
127
|
:allowed_payment_methods,
|
131
128
|
:minimum_fixed_fee,
|
132
129
|
:percent_total,
|
133
|
-
*
|
130
|
+
*BUSINESS_OFFERING_ATTRIBUTES,
|
134
131
|
:investment_sizes
|
135
132
|
]
|
136
133
|
end
|
@@ -149,15 +146,4 @@ class Firm < ActiveRecord::Base
|
|
149
146
|
def upcase_postcode
|
150
147
|
address_postcode.upcase! if address_postcode.present?
|
151
148
|
end
|
152
|
-
|
153
|
-
def sum_of_percentages_equals_one_hundred
|
154
|
-
total = PERCENTAGE_ATTRIBUTES.sum { |a| read_attribute(a).to_i }
|
155
|
-
|
156
|
-
unless total == 100
|
157
|
-
errors.add(
|
158
|
-
:percent_total,
|
159
|
-
I18n.t('questionnaire.retirement_advice.percent_total.not_one_hundred')
|
160
|
-
)
|
161
|
-
end
|
162
|
-
end
|
163
149
|
end
|
@@ -49,27 +49,27 @@ class FirmSerializer < ActiveModel::Serializer
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def retirement_income_products
|
52
|
-
object.
|
52
|
+
boolean_to_percentage object.retirement_income_products_flag
|
53
53
|
end
|
54
54
|
|
55
55
|
def pension_transfer
|
56
|
-
object.
|
56
|
+
boolean_to_percentage object.pension_transfer_flag
|
57
57
|
end
|
58
58
|
|
59
59
|
def options_when_paying_for_care
|
60
|
-
object.
|
60
|
+
boolean_to_percentage object.long_term_care_flag
|
61
61
|
end
|
62
62
|
|
63
63
|
def equity_release
|
64
|
-
object.
|
64
|
+
boolean_to_percentage object.equity_release_flag
|
65
65
|
end
|
66
66
|
|
67
67
|
def inheritance_tax_planning
|
68
|
-
object.
|
68
|
+
boolean_to_percentage object.inheritance_tax_and_estate_planning_flag
|
69
69
|
end
|
70
70
|
|
71
71
|
def wills_and_probate
|
72
|
-
object.
|
72
|
+
boolean_to_percentage object.wills_and_probate_flag
|
73
73
|
end
|
74
74
|
|
75
75
|
def _id
|
@@ -87,4 +87,10 @@ class FirmSerializer < ActiveModel::Serializer
|
|
87
87
|
def investment_sizes
|
88
88
|
object.investment_size_ids
|
89
89
|
end
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def boolean_to_percentage(boolean)
|
94
|
+
boolean ? 100 : 0
|
95
|
+
end
|
90
96
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
class ChangePercentageFieldsToBooleanFieldsOnFirm < ActiveRecord::Migration
|
2
|
+
BUSINESS_OFFERING_ATTRIBUTE = [
|
3
|
+
:retirement_income_products,
|
4
|
+
:pension_transfer,
|
5
|
+
:long_term_care,
|
6
|
+
:equity_release,
|
7
|
+
:inheritance_tax_and_estate_planning,
|
8
|
+
:wills_and_probate,
|
9
|
+
:other]
|
10
|
+
|
11
|
+
def up
|
12
|
+
BUSINESS_OFFERING_ATTRIBUTE.each do |field|
|
13
|
+
# We add the boolean column
|
14
|
+
add_column :firms, "#{field}_flag".to_sym, :boolean, null: false, default: false
|
15
|
+
# Translate the old percentage values to the new boolean column
|
16
|
+
Firm.where("#{field}_percent > ?", 0).update_all("#{field}_flag" => true)
|
17
|
+
# And finally, remove the percentage column
|
18
|
+
remove_column :firms, "#{field}_percent".to_sym, :integer
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def down
|
23
|
+
BUSINESS_OFFERING_ATTRIBUTE.each do |field|
|
24
|
+
# As above, but in reverse.
|
25
|
+
# Since we've lost information, we can only migrate back by figuring
|
26
|
+
# true => 100%
|
27
|
+
# false => 0%
|
28
|
+
# Which won't validate since the fields won't add up to 100%, but it
|
29
|
+
# will work in a pinch.
|
30
|
+
add_column :firms, "#{field}_percent".to_sym, :integer
|
31
|
+
Firm.where("#{field}_flag" => true).update_all("#{field}_percent" => 100)
|
32
|
+
remove_column :firms, "#{field}_flag".to_sym, :boolean, null: false, default: false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/lib/mas/rad_core/version.rb
CHANGED
data/spec/dummy/db/schema.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended that you check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(version:
|
14
|
+
ActiveRecord::Schema.define(version: 20150630143001) do
|
15
15
|
|
16
16
|
# These are extensions that must be enabled in order to support this database
|
17
17
|
enable_extension "plpgsql"
|
@@ -79,12 +79,12 @@ ActiveRecord::Schema.define(version: 20150423154732) do
|
|
79
79
|
add_index "allowed_payment_methods_firms", ["firm_id", "allowed_payment_method_id"], name: "firms_allowed_payment_methods_index", unique: true, using: :btree
|
80
80
|
|
81
81
|
create_table "firms", force: :cascade do |t|
|
82
|
-
t.integer "fca_number",
|
83
|
-
t.string "registered_name",
|
82
|
+
t.integer "fca_number", null: false
|
83
|
+
t.string "registered_name", null: false
|
84
84
|
t.string "email_address"
|
85
85
|
t.string "telephone_number"
|
86
|
-
t.datetime "created_at",
|
87
|
-
t.datetime "updated_at",
|
86
|
+
t.datetime "created_at", null: false
|
87
|
+
t.datetime "updated_at", null: false
|
88
88
|
t.string "address_line_one"
|
89
89
|
t.string "address_line_two"
|
90
90
|
t.string "address_town"
|
@@ -93,16 +93,16 @@ ActiveRecord::Schema.define(version: 20150423154732) do
|
|
93
93
|
t.boolean "free_initial_meeting"
|
94
94
|
t.integer "initial_meeting_duration_id"
|
95
95
|
t.integer "minimum_fixed_fee"
|
96
|
-
t.integer "retirement_income_products_percent"
|
97
|
-
t.integer "pension_transfer_percent"
|
98
|
-
t.integer "long_term_care_percent"
|
99
|
-
t.integer "equity_release_percent"
|
100
|
-
t.integer "inheritance_tax_and_estate_planning_percent"
|
101
|
-
t.integer "wills_and_probate_percent"
|
102
|
-
t.integer "other_percent"
|
103
96
|
t.integer "parent_id"
|
104
97
|
t.float "latitude"
|
105
98
|
t.float "longitude"
|
99
|
+
t.boolean "retirement_income_products_flag", default: false, null: false
|
100
|
+
t.boolean "pension_transfer_flag", default: false, null: false
|
101
|
+
t.boolean "long_term_care_flag", default: false, null: false
|
102
|
+
t.boolean "equity_release_flag", default: false, null: false
|
103
|
+
t.boolean "inheritance_tax_and_estate_planning_flag", default: false, null: false
|
104
|
+
t.boolean "wills_and_probate_flag", default: false, null: false
|
105
|
+
t.boolean "other_flag", default: false, null: false
|
106
106
|
end
|
107
107
|
|
108
108
|
add_index "firms", ["initial_meeting_duration_id"], name: "index_firms_on_initial_meeting_duration_id", using: :btree
|
@@ -75068,3 +75068,378 @@ ORDER BY c.conname
|
|
75068
75068
|
[1m[35mFirm Load (2.1ms)[0m SELECT "firms".* FROM "firms" WHERE "firms"."parent_id" = $1 [["parent_id", 153]]
|
75069
75069
|
[1m[36mPrincipal Load (1.7ms)[0m [1mSELECT "principals".* FROM "principals" WHERE "principals"."fca_number" = $1 LIMIT 1[0m [["fca_number", 186419]]
|
75070
75070
|
[1m[35mLookup::Firm Load (0.4ms)[0m SELECT "lookup_firms".* FROM "lookup_firms" WHERE "lookup_firms"."fca_number" = $1 LIMIT 1 [["fca_number", 186419]]
|
75071
|
+
[1m[36mActiveRecord::SchemaMigration Load (2.2ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
75072
|
+
Migrating to ChangePercentageFieldsToBooleanFieldsOnFirm (20150630143001)
|
75073
|
+
[1m[35m (0.2ms)[0m BEGIN
|
75074
|
+
[1m[36m (46.2ms)[0m [1mALTER TABLE "firms" ADD "retirement_income_products_flag" boolean DEFAULT 'f' NOT NULL[0m
|
75075
|
+
[1m[35mSQL (45.8ms)[0m UPDATE "firms" SET "retirement_income_products_flag" = 't' WHERE (retirement_income_products_percent > 0)
|
75076
|
+
[1m[36m (1.5ms)[0m [1mALTER TABLE "firms" DROP "retirement_income_products_percent"[0m
|
75077
|
+
[1m[35m (21.5ms)[0m ALTER TABLE "firms" ADD "pension_transfer_flag" boolean DEFAULT 'f' NOT NULL
|
75078
|
+
[1m[36mSQL (29.2ms)[0m [1mUPDATE "firms" SET "pension_transfer_flag" = 't' WHERE (pension_transfer_percent > 0)[0m
|
75079
|
+
[1m[35m (0.5ms)[0m ALTER TABLE "firms" DROP "pension_transfer_percent"
|
75080
|
+
[1m[36m (22.7ms)[0m [1mALTER TABLE "firms" ADD "long_term_care_flag" boolean DEFAULT 'f' NOT NULL[0m
|
75081
|
+
[1m[35mSQL (29.0ms)[0m UPDATE "firms" SET "long_term_care_flag" = 't' WHERE (long_term_care_percent > 0)
|
75082
|
+
[1m[36m (0.5ms)[0m [1mALTER TABLE "firms" DROP "long_term_care_percent"[0m
|
75083
|
+
[1m[35m (23.5ms)[0m ALTER TABLE "firms" ADD "equity_release_flag" boolean DEFAULT 'f' NOT NULL
|
75084
|
+
[1m[36mSQL (39.1ms)[0m [1mUPDATE "firms" SET "equity_release_flag" = 't' WHERE (equity_release_percent > 0)[0m
|
75085
|
+
[1m[35m (0.5ms)[0m ALTER TABLE "firms" DROP "equity_release_percent"
|
75086
|
+
[1m[36m (21.5ms)[0m [1mALTER TABLE "firms" ADD "inheritance_tax_and_estate_planning_flag" boolean DEFAULT 'f' NOT NULL[0m
|
75087
|
+
[1m[35mSQL (67.4ms)[0m UPDATE "firms" SET "inheritance_tax_and_estate_planning_flag" = 't' WHERE (inheritance_tax_and_estate_planning_percent > 0)
|
75088
|
+
[1m[36m (0.6ms)[0m [1mALTER TABLE "firms" DROP "inheritance_tax_and_estate_planning_percent"[0m
|
75089
|
+
[1m[35m (24.7ms)[0m ALTER TABLE "firms" ADD "wills_and_probate_flag" boolean DEFAULT 'f' NOT NULL
|
75090
|
+
[1m[36mSQL (37.8ms)[0m [1mUPDATE "firms" SET "wills_and_probate_flag" = 't' WHERE (wills_and_probate_percent > 0)[0m
|
75091
|
+
[1m[35m (0.7ms)[0m ALTER TABLE "firms" DROP "wills_and_probate_percent"
|
75092
|
+
[1m[36m (24.9ms)[0m [1mALTER TABLE "firms" ADD "other_flag" boolean DEFAULT 'f' NOT NULL[0m
|
75093
|
+
[1m[35mSQL (62.5ms)[0m UPDATE "firms" SET "other_flag" = 't' WHERE (other_percent > 0)
|
75094
|
+
[1m[36m (0.9ms)[0m [1mALTER TABLE "firms" DROP "other_percent"[0m
|
75095
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20150630143001"]]
|
75096
|
+
[1m[36m (12.9ms)[0m [1mCOMMIT[0m
|
75097
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.3ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
75098
|
+
[1m[36m (5.1ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75099
|
+
FROM pg_constraint c
|
75100
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75101
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75102
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75103
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75104
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75105
|
+
WHERE c.contype = 'f'
|
75106
|
+
AND t1.relname = 'accreditations'
|
75107
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75108
|
+
ORDER BY c.conname
|
75109
|
+
[0m
|
75110
|
+
[1m[35m (4.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75111
|
+
FROM pg_constraint c
|
75112
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75113
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75114
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75115
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75116
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75117
|
+
WHERE c.contype = 'f'
|
75118
|
+
AND t1.relname = 'accreditations_advisers'
|
75119
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75120
|
+
ORDER BY c.conname
|
75121
|
+
|
75122
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75123
|
+
FROM pg_constraint c
|
75124
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75125
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75126
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75127
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75128
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75129
|
+
WHERE c.contype = 'f'
|
75130
|
+
AND t1.relname = 'advisers'
|
75131
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75132
|
+
ORDER BY c.conname
|
75133
|
+
[0m
|
75134
|
+
[1m[35m (3.8ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75135
|
+
FROM pg_constraint c
|
75136
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75137
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75138
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75139
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75140
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75141
|
+
WHERE c.contype = 'f'
|
75142
|
+
AND t1.relname = 'advisers_professional_bodies'
|
75143
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75144
|
+
ORDER BY c.conname
|
75145
|
+
|
75146
|
+
[1m[36m (4.8ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75147
|
+
FROM pg_constraint c
|
75148
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75149
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75150
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75151
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75152
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75153
|
+
WHERE c.contype = 'f'
|
75154
|
+
AND t1.relname = 'advisers_professional_standings'
|
75155
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75156
|
+
ORDER BY c.conname
|
75157
|
+
[0m
|
75158
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75159
|
+
FROM pg_constraint c
|
75160
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75161
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75162
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75163
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75164
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75165
|
+
WHERE c.contype = 'f'
|
75166
|
+
AND t1.relname = 'advisers_qualifications'
|
75167
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75168
|
+
ORDER BY c.conname
|
75169
|
+
|
75170
|
+
[1m[36m (5.4ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75171
|
+
FROM pg_constraint c
|
75172
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75173
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75174
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75175
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75176
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75177
|
+
WHERE c.contype = 'f'
|
75178
|
+
AND t1.relname = 'allowed_payment_methods'
|
75179
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75180
|
+
ORDER BY c.conname
|
75181
|
+
[0m
|
75182
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75183
|
+
FROM pg_constraint c
|
75184
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75185
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75186
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75187
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75188
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75189
|
+
WHERE c.contype = 'f'
|
75190
|
+
AND t1.relname = 'allowed_payment_methods_firms'
|
75191
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75192
|
+
ORDER BY c.conname
|
75193
|
+
|
75194
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75195
|
+
FROM pg_constraint c
|
75196
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75197
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75198
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75199
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75200
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75201
|
+
WHERE c.contype = 'f'
|
75202
|
+
AND t1.relname = 'firms'
|
75203
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75204
|
+
ORDER BY c.conname
|
75205
|
+
[0m
|
75206
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75207
|
+
FROM pg_constraint c
|
75208
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75209
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75210
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75211
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75212
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75213
|
+
WHERE c.contype = 'f'
|
75214
|
+
AND t1.relname = 'firms_in_person_advice_methods'
|
75215
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75216
|
+
ORDER BY c.conname
|
75217
|
+
|
75218
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75219
|
+
FROM pg_constraint c
|
75220
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75221
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75222
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75223
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75224
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75225
|
+
WHERE c.contype = 'f'
|
75226
|
+
AND t1.relname = 'firms_initial_advice_fee_structures'
|
75227
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75228
|
+
ORDER BY c.conname
|
75229
|
+
[0m
|
75230
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75231
|
+
FROM pg_constraint c
|
75232
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75233
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75234
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75235
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75236
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75237
|
+
WHERE c.contype = 'f'
|
75238
|
+
AND t1.relname = 'firms_investment_sizes'
|
75239
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75240
|
+
ORDER BY c.conname
|
75241
|
+
|
75242
|
+
[1m[36m (3.6ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75243
|
+
FROM pg_constraint c
|
75244
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75245
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75246
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75247
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75248
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75249
|
+
WHERE c.contype = 'f'
|
75250
|
+
AND t1.relname = 'firms_ongoing_advice_fee_structures'
|
75251
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75252
|
+
ORDER BY c.conname
|
75253
|
+
[0m
|
75254
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75255
|
+
FROM pg_constraint c
|
75256
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75257
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75258
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75259
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75260
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75261
|
+
WHERE c.contype = 'f'
|
75262
|
+
AND t1.relname = 'firms_other_advice_methods'
|
75263
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75264
|
+
ORDER BY c.conname
|
75265
|
+
|
75266
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75267
|
+
FROM pg_constraint c
|
75268
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75269
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75270
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75271
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75272
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75273
|
+
WHERE c.contype = 'f'
|
75274
|
+
AND t1.relname = 'in_person_advice_methods'
|
75275
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75276
|
+
ORDER BY c.conname
|
75277
|
+
[0m
|
75278
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75279
|
+
FROM pg_constraint c
|
75280
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75281
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75282
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75283
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75284
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75285
|
+
WHERE c.contype = 'f'
|
75286
|
+
AND t1.relname = 'initial_advice_fee_structures'
|
75287
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75288
|
+
ORDER BY c.conname
|
75289
|
+
|
75290
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75291
|
+
FROM pg_constraint c
|
75292
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75293
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75294
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75295
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75296
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75297
|
+
WHERE c.contype = 'f'
|
75298
|
+
AND t1.relname = 'initial_meeting_durations'
|
75299
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75300
|
+
ORDER BY c.conname
|
75301
|
+
[0m
|
75302
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75303
|
+
FROM pg_constraint c
|
75304
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75305
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75306
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75307
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75308
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75309
|
+
WHERE c.contype = 'f'
|
75310
|
+
AND t1.relname = 'investment_sizes'
|
75311
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75312
|
+
ORDER BY c.conname
|
75313
|
+
|
75314
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75315
|
+
FROM pg_constraint c
|
75316
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75317
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75318
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75319
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75320
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75321
|
+
WHERE c.contype = 'f'
|
75322
|
+
AND t1.relname = 'lookup_advisers'
|
75323
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75324
|
+
ORDER BY c.conname
|
75325
|
+
[0m
|
75326
|
+
[1m[35m (3.4ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75327
|
+
FROM pg_constraint c
|
75328
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75329
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75330
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75331
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75332
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75333
|
+
WHERE c.contype = 'f'
|
75334
|
+
AND t1.relname = 'lookup_firms'
|
75335
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75336
|
+
ORDER BY c.conname
|
75337
|
+
|
75338
|
+
[1m[36m (3.6ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75339
|
+
FROM pg_constraint c
|
75340
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75341
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75342
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75343
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75344
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75345
|
+
WHERE c.contype = 'f'
|
75346
|
+
AND t1.relname = 'lookup_subsidiaries'
|
75347
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75348
|
+
ORDER BY c.conname
|
75349
|
+
[0m
|
75350
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75351
|
+
FROM pg_constraint c
|
75352
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75353
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75354
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75355
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75356
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75357
|
+
WHERE c.contype = 'f'
|
75358
|
+
AND t1.relname = 'old_passwords'
|
75359
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75360
|
+
ORDER BY c.conname
|
75361
|
+
|
75362
|
+
[1m[36m (3.6ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75363
|
+
FROM pg_constraint c
|
75364
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75365
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75366
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75367
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75368
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75369
|
+
WHERE c.contype = 'f'
|
75370
|
+
AND t1.relname = 'ongoing_advice_fee_structures'
|
75371
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75372
|
+
ORDER BY c.conname
|
75373
|
+
[0m
|
75374
|
+
[1m[35m (3.4ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75375
|
+
FROM pg_constraint c
|
75376
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75377
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75378
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75379
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75380
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75381
|
+
WHERE c.contype = 'f'
|
75382
|
+
AND t1.relname = 'other_advice_methods'
|
75383
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75384
|
+
ORDER BY c.conname
|
75385
|
+
|
75386
|
+
[1m[36m (3.7ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75387
|
+
FROM pg_constraint c
|
75388
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75389
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75390
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75391
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75392
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75393
|
+
WHERE c.contype = 'f'
|
75394
|
+
AND t1.relname = 'principals'
|
75395
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75396
|
+
ORDER BY c.conname
|
75397
|
+
[0m
|
75398
|
+
[1m[35m (3.5ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75399
|
+
FROM pg_constraint c
|
75400
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75401
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75402
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75403
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75404
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75405
|
+
WHERE c.contype = 'f'
|
75406
|
+
AND t1.relname = 'professional_bodies'
|
75407
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75408
|
+
ORDER BY c.conname
|
75409
|
+
|
75410
|
+
[1m[36m (3.5ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75411
|
+
FROM pg_constraint c
|
75412
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75413
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75414
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75415
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75416
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75417
|
+
WHERE c.contype = 'f'
|
75418
|
+
AND t1.relname = 'professional_standings'
|
75419
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75420
|
+
ORDER BY c.conname
|
75421
|
+
[0m
|
75422
|
+
[1m[35m (3.6ms)[0m SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75423
|
+
FROM pg_constraint c
|
75424
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75425
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75426
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75427
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75428
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75429
|
+
WHERE c.contype = 'f'
|
75430
|
+
AND t1.relname = 'qualifications'
|
75431
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75432
|
+
ORDER BY c.conname
|
75433
|
+
|
75434
|
+
[1m[36m (3.6ms)[0m [1mSELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
|
75435
|
+
FROM pg_constraint c
|
75436
|
+
JOIN pg_class t1 ON c.conrelid = t1.oid
|
75437
|
+
JOIN pg_class t2 ON c.confrelid = t2.oid
|
75438
|
+
JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
|
75439
|
+
JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
|
75440
|
+
JOIN pg_namespace t3 ON c.connamespace = t3.oid
|
75441
|
+
WHERE c.contype = 'f'
|
75442
|
+
AND t1.relname = 'users'
|
75443
|
+
AND t3.nspname = ANY (current_schemas(false))
|
75444
|
+
ORDER BY c.conname
|
75445
|
+
[0m
|