Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions app/controllers/profiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,28 +69,20 @@ def edit_profile_params
:program_age,
:case_management,
:evidence_based,
:evidence_based_description,
:program_client_improvement,
:essentials_use,
:receives_essentials_from_other,
:currently_provide_diapers,
:turn_away_child_care,
:program_address1,
:program_address2,
:program_city,
:program_state,
:program_zip_code,
:client_capacity,
:incorporate_plan,
:responsible_staff_position,
:storage_space,
:describe_storage_space,
:trusted_pickup,
:income_requirement_desc,
:serve_income_circumstances,
:income_verification,
:internal_db,
:maac,
:population_black,
:population_white,
:population_hispanic,
Expand All @@ -104,15 +96,13 @@ def edit_profile_params
:above_1_2_times_fpl,
:greater_2_times_fpl,
:poverty_unknown,
:ages_served,
:executive_director_name,
:executive_director_phone,
:executive_director_email,
:primary_contact_name,
:primary_contact_phone,
:primary_contact_mobile,
:primary_contact_email,
:pick_up_method,
:pick_up_name,
:pick_up_phone,
:pick_up_email,
Expand Down
18 changes: 3 additions & 15 deletions app/models/partners/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
# address2 :string
# agency_mission :text
# agency_type :string
# application_data :text
# at_fpl_or_below :integer
# case_management :boolean
# city :string
# client_capacity :string
# currently_provide_diapers :boolean
# describe_storage_space :text
# distribution_times :string
# distributor_type :string
# enable_child_based_requests :boolean default(TRUE), not null
# enable_individual_requests :boolean default(TRUE), not null
# enable_quantity_based_requests :boolean default(TRUE), not null
Expand Down Expand Up @@ -57,6 +59,7 @@
# program_address2 :string
# program_age :string
# program_city :string
# program_client_improvement :text
# program_description :text
# program_name :string
# program_state :string
Expand Down Expand Up @@ -176,21 +179,6 @@ class Profile < Base

# These are columns which currently do not appear in any partial of the profile form.
# It is possible these will be removed in the future.
self.ignored_columns += %w[
application_data
distributor_type
evidence_based_description
program_client_improvement
incorporate_plan
turn_away_child_care
responsible_staff_position
trusted_pickup
serve_income_circumstances
internal_db
maac
pick_up_method
ages_served
]

def client_share_total
# client_share could be nil
Expand Down
1 change: 0 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# last_sign_in_ip :inet
# name :string
# organization_admin :boolean
# pending_role_invites :text
# provider :string
# remember_created_at :datetime
# reset_password_sent_at :datetime
Expand Down
24 changes: 24 additions & 0 deletions db/migrate/20251007141240_unused_fields_cleanup.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
class UnusedFieldsCleanup < ActiveRecord::Migration[8.0]
def change
safety_assured do
# removing columns that were removed from user interface in 2022
remove_column :partner_profiles, :evidence_based_description
remove_column :partner_profiles, :turn_away_child_care
remove_column :partner_profiles, :incorporate_plan
remove_column :partner_profiles, :responsible_staff_position
remove_column :partner_profiles, :trusted_pickup
remove_column :partner_profiles, :serve_income_circumstances
remove_column :partner_profiles, :internal_db
remove_column :partner_profiles, :maac
remove_column :partner_profiles, :pick_up_method
remove_column :partner_profiles, :ages_served
# 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
# 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,
# and program_client_improveement has no data since 2022)
remove_column :partner_profiles, :application_data
remove_column :partner_profiles, :distributor_type
remove_column :partner_profiles, :program_client_improvement
end

end
end
12 changes: 1 addition & 11 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

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

Expand Down Expand Up @@ -569,28 +569,20 @@
t.string "program_age"
t.boolean "case_management"
t.boolean "evidence_based"
t.text "evidence_based_description"
t.text "program_client_improvement"
t.string "essentials_use"
t.string "receives_essentials_from_other"
t.boolean "currently_provide_diapers"
t.boolean "turn_away_child_care"
t.string "program_address1"
t.string "program_address2"
t.string "program_city"
t.string "program_state"
t.integer "program_zip_code"
t.string "client_capacity"
t.text "incorporate_plan"
t.boolean "responsible_staff_position"
t.boolean "storage_space"
t.text "describe_storage_space"
t.boolean "trusted_pickup"
t.boolean "income_requirement_desc"
t.boolean "serve_income_circumstances"
t.boolean "income_verification"
t.boolean "internal_db"
t.boolean "maac"
t.integer "population_black"
t.integer "population_white"
t.integer "population_hispanic"
Expand All @@ -604,15 +596,13 @@
t.integer "above_1_2_times_fpl"
t.integer "greater_2_times_fpl"
t.integer "poverty_unknown"
t.string "ages_served"
t.string "executive_director_name"
t.string "executive_director_phone"
t.string "executive_director_email"
t.string "primary_contact_name"
t.string "primary_contact_phone"
t.string "primary_contact_mobile"
t.string "primary_contact_email"
t.string "pick_up_method"
t.string "pick_up_name"
t.string "pick_up_phone"
t.string "pick_up_email"
Expand Down
3 changes: 3 additions & 0 deletions spec/factories/partners/profiles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
# address2 :string
# agency_mission :text
# agency_type :string
# application_data :text
# at_fpl_or_below :integer
# case_management :boolean
# city :string
# client_capacity :string
# currently_provide_diapers :boolean
# describe_storage_space :text
# distribution_times :string
# distributor_type :string
# enable_child_based_requests :boolean default(TRUE), not null
# enable_individual_requests :boolean default(TRUE), not null
# enable_quantity_based_requests :boolean default(TRUE), not null
Expand Down Expand Up @@ -57,6 +59,7 @@
# program_address2 :string
# program_age :string
# program_city :string
# program_client_improvement :text
# program_description :text
# program_name :string
# program_state :string
Expand Down
3 changes: 3 additions & 0 deletions spec/models/partners/profile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
# address2 :string
# agency_mission :text
# agency_type :string
# application_data :text
# at_fpl_or_below :integer
# case_management :boolean
# city :string
# client_capacity :string
# currently_provide_diapers :boolean
# describe_storage_space :text
# distribution_times :string
# distributor_type :string
# enable_child_based_requests :boolean default(TRUE), not null
# enable_individual_requests :boolean default(TRUE), not null
# enable_quantity_based_requests :boolean default(TRUE), not null
Expand Down Expand Up @@ -57,6 +59,7 @@
# program_address2 :string
# program_age :string
# program_city :string
# program_client_improvement :text
# program_description :text
# program_name :string
# program_state :string
Expand Down