Skip to content

Commit bddc765

Browse files
Merge pull request #5424 from cielf/3805_cleanup_unused_partner_profile_fields
3805 partial cleaning up partner profile
2 parents d201bd4 + 2865385 commit bddc765

File tree

5 files changed

+25
-40
lines changed

5 files changed

+25
-40
lines changed

app/controllers/profiles_controller.rb

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,20 @@ def edit_profile_params
6969
:program_age,
7070
:case_management,
7171
:evidence_based,
72-
:evidence_based_description,
7372
:program_client_improvement,
7473
:essentials_use,
7574
:receives_essentials_from_other,
7675
:currently_provide_diapers,
77-
:turn_away_child_care,
7876
:program_address1,
7977
:program_address2,
8078
:program_city,
8179
:program_state,
8280
:program_zip_code,
8381
:client_capacity,
84-
:incorporate_plan,
85-
:responsible_staff_position,
8682
:storage_space,
8783
:describe_storage_space,
88-
:trusted_pickup,
8984
:income_requirement_desc,
90-
:serve_income_circumstances,
9185
:income_verification,
92-
:internal_db,
93-
:maac,
9486
:population_black,
9587
:population_white,
9688
:population_hispanic,
@@ -104,15 +96,13 @@ def edit_profile_params
10496
:above_1_2_times_fpl,
10597
:greater_2_times_fpl,
10698
:poverty_unknown,
107-
:ages_served,
10899
:executive_director_name,
109100
:executive_director_phone,
110101
:executive_director_email,
111102
:primary_contact_name,
112103
:primary_contact_phone,
113104
:primary_contact_mobile,
114105
:primary_contact_email,
115-
:pick_up_method,
116106
:pick_up_name,
117107
:pick_up_phone,
118108
:pick_up_email,

app/models/partners/profile.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,21 +176,6 @@ class Profile < Base
176176

177177
# These are columns which currently do not appear in any partial of the profile form.
178178
# It is possible these will be removed in the future.
179-
self.ignored_columns += %w[
180-
application_data
181-
distributor_type
182-
evidence_based_description
183-
program_client_improvement
184-
incorporate_plan
185-
turn_away_child_care
186-
responsible_staff_position
187-
trusted_pickup
188-
serve_income_circumstances
189-
internal_db
190-
maac
191-
pick_up_method
192-
ages_served
193-
]
194179

195180
def client_share_total
196181
# client_share could be nil

app/models/user.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# last_sign_in_ip :inet
2121
# name :string
2222
# organization_admin :boolean
23-
# pending_role_invites :text
2423
# provider :string
2524
# remember_created_at :datetime
2625
# reset_password_sent_at :datetime
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class UnusedFieldsCleanup < ActiveRecord::Migration[8.0]
2+
def change
3+
safety_assured do
4+
# removing columns that were removed from user interface in 2022
5+
remove_column :partner_profiles, :evidence_based_description
6+
remove_column :partner_profiles, :turn_away_child_care
7+
remove_column :partner_profiles, :incorporate_plan
8+
remove_column :partner_profiles, :responsible_staff_position
9+
remove_column :partner_profiles, :trusted_pickup
10+
remove_column :partner_profiles, :serve_income_circumstances
11+
remove_column :partner_profiles, :internal_db
12+
remove_column :partner_profiles, :maac
13+
remove_column :partner_profiles, :pick_up_method
14+
remove_column :partner_profiles, :ages_served
15+
# Note: "verified successes of program" was listed in the columns to be removed, but not found in the db I think it's program_client_improvement, below
16+
# These three columns were noted as "ignored columns" in profile.rb, and check out as far as no recent data in production (application_data and distributor_type are empty,
17+
# and program_client_improveement has no data since 2022)
18+
remove_column :partner_profiles, :application_data
19+
remove_column :partner_profiles, :distributor_type
20+
remove_column :partner_profiles, :program_client_improvement
21+
end
22+
23+
end
24+
end

db/schema.rb

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[8.0].define(version: 2025_09_26_084615) do
13+
ActiveRecord::Schema[8.0].define(version: 2025_10_07_141240) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "pg_catalog.plpgsql"
1616

@@ -549,10 +549,8 @@
549549

550550
create_table "partner_profiles", force: :cascade do |t|
551551
t.bigint "essentials_bank_id"
552-
t.text "application_data"
553552
t.integer "partner_id"
554553
t.string "name"
555-
t.string "distributor_type"
556554
t.string "agency_type"
557555
t.text "agency_mission"
558556
t.string "address1"
@@ -570,28 +568,19 @@
570568
t.string "program_age"
571569
t.boolean "case_management"
572570
t.boolean "evidence_based"
573-
t.text "evidence_based_description"
574-
t.text "program_client_improvement"
575571
t.string "essentials_use"
576572
t.string "receives_essentials_from_other"
577573
t.boolean "currently_provide_diapers"
578-
t.boolean "turn_away_child_care"
579574
t.string "program_address1"
580575
t.string "program_address2"
581576
t.string "program_city"
582577
t.string "program_state"
583578
t.integer "program_zip_code"
584579
t.string "client_capacity"
585-
t.text "incorporate_plan"
586-
t.boolean "responsible_staff_position"
587580
t.boolean "storage_space"
588581
t.text "describe_storage_space"
589-
t.boolean "trusted_pickup"
590582
t.boolean "income_requirement_desc"
591-
t.boolean "serve_income_circumstances"
592583
t.boolean "income_verification"
593-
t.boolean "internal_db"
594-
t.boolean "maac"
595584
t.integer "population_black"
596585
t.integer "population_white"
597586
t.integer "population_hispanic"
@@ -605,15 +594,13 @@
605594
t.integer "above_1_2_times_fpl"
606595
t.integer "greater_2_times_fpl"
607596
t.integer "poverty_unknown"
608-
t.string "ages_served"
609597
t.string "executive_director_name"
610598
t.string "executive_director_phone"
611599
t.string "executive_director_email"
612600
t.string "primary_contact_name"
613601
t.string "primary_contact_phone"
614602
t.string "primary_contact_mobile"
615603
t.string "primary_contact_email"
616-
t.string "pick_up_method"
617604
t.string "pick_up_name"
618605
t.string "pick_up_phone"
619606
t.string "pick_up_email"

0 commit comments

Comments
 (0)