Skip to content

Commit

Permalink
Remove status from application form
Browse files Browse the repository at this point in the history
This removes the field (and related fields) from the application form
model as they've been replaced by others and are no longer being used
anywhere.
  • Loading branch information
thomasleese committed Oct 13, 2023
1 parent ade156c commit 788ec78
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 69 deletions.
14 changes: 0 additions & 14 deletions app/models/application_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,19 @@
# needs_registration_number :boolean not null
# needs_work_history :boolean not null
# needs_written_statement :boolean not null
# overdue_further_information :boolean default(FALSE), not null
# overdue_professional_standing :boolean default(FALSE), not null
# overdue_qualification :boolean default(FALSE), not null
# overdue_reference :boolean default(FALSE), not null
# personal_information_status :string default("not_started"), not null
# qualifications_status :string default("not_started"), not null
# received_further_information :boolean default(FALSE), not null
# received_professional_standing :boolean default(FALSE), not null
# received_qualification :boolean default(FALSE), not null
# received_reference :boolean default(FALSE), not null
# reduced_evidence_accepted :boolean default(FALSE), not null
# reference :string(31) not null
# registration_number :text
# registration_number_status :string default("not_started"), not null
# requires_preliminary_check :boolean default(FALSE), not null
# stage :string default("draft"), not null
# status :string default("draft"), not null
# statuses :string default(["\"draft\""]), not null, is an Array
# subjects :text default([]), not null, is an Array
# subjects_status :string default("not_started"), not null
# submitted_at :datetime
# teaching_authority_provides_written_statement :boolean default(FALSE), not null
# waiting_on_further_information :boolean default(FALSE), not null
# waiting_on_professional_standing :boolean default(FALSE), not null
# waiting_on_qualification :boolean default(FALSE), not null
# waiting_on_reference :boolean default(FALSE), not null
# withdrawn_at :datetime
# work_history_status :string default("not_started"), not null
# working_days_since_submission :integer
Expand All @@ -79,7 +66,6 @@
# index_application_forms_on_region_id (region_id)
# index_application_forms_on_reviewer_id (reviewer_id)
# index_application_forms_on_stage (stage)
# index_application_forms_on_status (status)
# index_application_forms_on_teacher_id (teacher_id)
#
# Foreign Keys
Expand Down
13 changes: 0 additions & 13 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,8 @@
- needs_registration_number
- needs_work_history
- needs_written_statement
- overdue_further_information
- overdue_professional_standing
- overdue_qualification
- overdue_reference
- personal_information_status
- qualifications_status
- received_further_information
- received_professional_standing
- received_qualification
- received_reference
- reduced_evidence_accepted
- reference
- region_id
Expand All @@ -69,18 +61,13 @@
- requires_preliminary_check
- reviewer_id
- stage
- status
- statuses
- subjects
- subjects_status
- submitted_at
- teacher_id
- teaching_authority_provides_written_statement
- updated_at
- waiting_on_further_information
- waiting_on_professional_standing
- waiting_on_qualification
- waiting_on_reference
- withdrawn_at
- work_history_status
- working_days_since_submission
Expand Down
49 changes: 49 additions & 0 deletions db/migrate/20230919123755_remove_status_from_application_forms.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
class RemoveStatusFromApplicationForms < ActiveRecord::Migration[7.0]
def change
change_table :application_forms, bulk: true do |t|
t.remove :status, type: :string, null: false, default: "draft"
t.remove :overdue_further_information,
type: :boolean,
default: false,
null: false
t.remove :overdue_professional_standing,
type: :boolean,
default: false,
null: false
t.remove :overdue_qualification,
type: :boolean,
default: false,
null: false
t.remove :overdue_reference, type: :boolean, default: false, null: false
t.remove :received_further_information,
type: :boolean,
default: false,
null: false
t.remove :received_professional_standing,
type: :boolean,
default: false,
null: false
t.remove :received_qualification,
type: :boolean,
default: false,
null: false
t.remove :received_reference, type: :boolean, default: false, null: false
t.remove :waiting_on_further_information,
type: :boolean,
default: false,
null: false
t.remove :waiting_on_professional_standing,
type: :boolean,
default: false,
null: false
t.remove :waiting_on_qualification,
type: :boolean,
default: false,
null: false
t.remove :waiting_on_reference,
type: :boolean,
default: false,
null: false
end
end
end
14 changes: 0 additions & 14 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions spec/factories/application_forms.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,19 @@
# needs_registration_number :boolean not null
# needs_work_history :boolean not null
# needs_written_statement :boolean not null
# overdue_further_information :boolean default(FALSE), not null
# overdue_professional_standing :boolean default(FALSE), not null
# overdue_qualification :boolean default(FALSE), not null
# overdue_reference :boolean default(FALSE), not null
# personal_information_status :string default("not_started"), not null
# qualifications_status :string default("not_started"), not null
# received_further_information :boolean default(FALSE), not null
# received_professional_standing :boolean default(FALSE), not null
# received_qualification :boolean default(FALSE), not null
# received_reference :boolean default(FALSE), not null
# reduced_evidence_accepted :boolean default(FALSE), not null
# reference :string(31) not null
# registration_number :text
# registration_number_status :string default("not_started"), not null
# requires_preliminary_check :boolean default(FALSE), not null
# stage :string default("draft"), not null
# status :string default("draft"), not null
# statuses :string default(["\"draft\""]), not null, is an Array
# subjects :text default([]), not null, is an Array
# subjects_status :string default("not_started"), not null
# submitted_at :datetime
# teaching_authority_provides_written_statement :boolean default(FALSE), not null
# waiting_on_further_information :boolean default(FALSE), not null
# waiting_on_professional_standing :boolean default(FALSE), not null
# waiting_on_qualification :boolean default(FALSE), not null
# waiting_on_reference :boolean default(FALSE), not null
# withdrawn_at :datetime
# work_history_status :string default("not_started"), not null
# working_days_since_submission :integer
Expand All @@ -79,7 +66,6 @@
# index_application_forms_on_region_id (region_id)
# index_application_forms_on_reviewer_id (reviewer_id)
# index_application_forms_on_stage (stage)
# index_application_forms_on_status (status)
# index_application_forms_on_teacher_id (teacher_id)
#
# Foreign Keys
Expand Down
14 changes: 0 additions & 14 deletions spec/models/application_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,19 @@
# needs_registration_number :boolean not null
# needs_work_history :boolean not null
# needs_written_statement :boolean not null
# overdue_further_information :boolean default(FALSE), not null
# overdue_professional_standing :boolean default(FALSE), not null
# overdue_qualification :boolean default(FALSE), not null
# overdue_reference :boolean default(FALSE), not null
# personal_information_status :string default("not_started"), not null
# qualifications_status :string default("not_started"), not null
# received_further_information :boolean default(FALSE), not null
# received_professional_standing :boolean default(FALSE), not null
# received_qualification :boolean default(FALSE), not null
# received_reference :boolean default(FALSE), not null
# reduced_evidence_accepted :boolean default(FALSE), not null
# reference :string(31) not null
# registration_number :text
# registration_number_status :string default("not_started"), not null
# requires_preliminary_check :boolean default(FALSE), not null
# stage :string default("draft"), not null
# status :string default("draft"), not null
# statuses :string default(["\"draft\""]), not null, is an Array
# subjects :text default([]), not null, is an Array
# subjects_status :string default("not_started"), not null
# submitted_at :datetime
# teaching_authority_provides_written_statement :boolean default(FALSE), not null
# waiting_on_further_information :boolean default(FALSE), not null
# waiting_on_professional_standing :boolean default(FALSE), not null
# waiting_on_qualification :boolean default(FALSE), not null
# waiting_on_reference :boolean default(FALSE), not null
# withdrawn_at :datetime
# work_history_status :string default("not_started"), not null
# working_days_since_submission :integer
Expand All @@ -79,7 +66,6 @@
# index_application_forms_on_region_id (region_id)
# index_application_forms_on_reviewer_id (reviewer_id)
# index_application_forms_on_stage (stage)
# index_application_forms_on_status (status)
# index_application_forms_on_teacher_id (teacher_id)
#
# Foreign Keys
Expand Down

0 comments on commit 788ec78

Please sign in to comment.