Skip to content

Commit

Permalink
Rename teaching authority information fields
Browse files Browse the repository at this point in the history
This renames the fields to remove the reference to the teaching
authority as that's not really relevant, and it allows us to make a
better distinction between what's specific to the authority and what's
more about the country.
  • Loading branch information
thomasleese committed Sep 5, 2023
1 parent 681ca9f commit b8a648f
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 103 deletions.
34 changes: 17 additions & 17 deletions app/models/country.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
#
# Table name: countries
#
# id :bigint not null, primary key
# code :string not null
# eligibility_enabled :boolean default(TRUE), not null
# eligibility_skip_questions :boolean default(FALSE), not null
# qualifications_information :text default(""), not null
# requires_preliminary_check :boolean default(FALSE), not null
# teaching_authority_address :text default(""), not null
# teaching_authority_certificate :text default(""), not null
# teaching_authority_emails :text default([]), not null, is an Array
# teaching_authority_name :text default(""), not null
# teaching_authority_online_checker_url :string default(""), not null
# teaching_authority_other :text default(""), not null
# teaching_authority_sanction_information :string default(""), not null
# teaching_authority_status_information :string default(""), not null
# teaching_authority_websites :text default([]), not null, is an Array
# created_at :datetime not null
# updated_at :datetime not null
# id :bigint not null, primary key
# code :string not null
# eligibility_enabled :boolean default(TRUE), not null
# eligibility_skip_questions :boolean default(FALSE), not null
# other_information :text default(""), not null
# qualifications_information :text default(""), not null
# requires_preliminary_check :boolean default(FALSE), not null
# sanction_information :string default(""), not null
# status_information :string default(""), not null
# teaching_authority_address :text default(""), not null
# teaching_authority_certificate :text default(""), not null
# teaching_authority_emails :text default([]), not null, is an Array
# teaching_authority_name :text default(""), not null
# teaching_authority_online_checker_url :string default(""), not null
# teaching_authority_websites :text default([]), not null, is an Array
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
Expand Down
6 changes: 3 additions & 3 deletions app/models/region.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
# id :bigint not null, primary key
# application_form_skip_work_history :boolean default(FALSE), not null
# name :string default(""), not null
# other_information :text default(""), not null
# qualifications_information :text default(""), not null
# reduced_evidence_accepted :boolean default(FALSE), not null
# requires_preliminary_check :boolean default(FALSE), not null
# sanction_check :string default("none"), not null
# sanction_information :string default(""), not null
# status_check :string default("none"), not null
# status_information :string default(""), not null
# teaching_authority_address :text default(""), not null
# teaching_authority_certificate :text default(""), not null
# teaching_authority_emails :text default([]), not null, is an Array
# teaching_authority_name :text default(""), not null
# teaching_authority_online_checker_url :string default(""), not null
# teaching_authority_other :text default(""), not null
# teaching_authority_provides_written_statement :boolean default(FALSE), not null
# teaching_authority_requires_submission_email :boolean default(FALSE), not null
# teaching_authority_sanction_information :string default(""), not null
# teaching_authority_status_information :string default(""), not null
# teaching_authority_websites :text default([]), not null, is an Array
# written_statement_optional :boolean default(FALSE), not null
# created_at :datetime not null
Expand Down
44 changes: 22 additions & 22 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@
- working_days_submission_to_recommendation
- working_days_submission_to_started
:countries:
- id
- code
- created_at
- updated_at
- eligibility_enabled
- eligibility_skip_questions
- id
- other_information
- qualifications_information
- requires_preliminary_check
- sanction_information
- status_information
- teaching_authority_address
- teaching_authority_emails
- teaching_authority_websites
- teaching_authority_certificate
- teaching_authority_other
- teaching_authority_emails
- teaching_authority_name
- teaching_authority_online_checker_url
- teaching_authority_status_information
- teaching_authority_sanction_information
- qualifications_information
- requires_preliminary_check
- teaching_authority_websites
- updated_at
:documents:
- available
- completed
Expand Down Expand Up @@ -282,29 +282,29 @@
- failure_assessor_note
- reviewed_at
:regions:
- id
- application_form_skip_work_history
- country_id
- name
- created_at
- updated_at
- status_check
- sanction_check
- application_form_skip_work_history
- id
- name
- other_information
- qualifications_information
- reduced_evidence_accepted
- requires_preliminary_check
- sanction_check
- sanction_information
- status_check
- status_information
- teaching_authority_address
- teaching_authority_certificate
- teaching_authority_emails
- teaching_authority_websites
- teaching_authority_name
- teaching_authority_other
- teaching_authority_certificate
- teaching_authority_online_checker_url
- teaching_authority_status_information
- teaching_authority_sanction_information
- teaching_authority_provides_written_statement
- teaching_authority_requires_submission_email
- qualifications_information
- teaching_authority_websites
- updated_at
- written_statement_optional
- requires_preliminary_check
:reminder_emails:
- id
- created_at
Expand Down
15 changes: 15 additions & 0 deletions db/migrate/20230904131351_rename_teaching_authority_information.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class RenameTeachingAuthorityInformation < ActiveRecord::Migration[7.0]
def change
change_table :countries, bulk: true do |t|
t.rename :teaching_authority_other, :other_information
t.rename :teaching_authority_status_information, :status_information
t.rename :teaching_authority_sanction_information, :sanction_information
end

change_table :regions, bulk: true do |t|
t.rename :teaching_authority_other, :other_information
t.rename :teaching_authority_status_information, :status_information
t.rename :teaching_authority_sanction_information, :sanction_information
end
end
end
42 changes: 21 additions & 21 deletions db/schema.rb

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

34 changes: 17 additions & 17 deletions spec/factories/countries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@
#
# Table name: countries
#
# id :bigint not null, primary key
# code :string not null
# eligibility_enabled :boolean default(TRUE), not null
# eligibility_skip_questions :boolean default(FALSE), not null
# qualifications_information :text default(""), not null
# requires_preliminary_check :boolean default(FALSE), not null
# teaching_authority_address :text default(""), not null
# teaching_authority_certificate :text default(""), not null
# teaching_authority_emails :text default([]), not null, is an Array
# teaching_authority_name :text default(""), not null
# teaching_authority_online_checker_url :string default(""), not null
# teaching_authority_other :text default(""), not null
# teaching_authority_sanction_information :string default(""), not null
# teaching_authority_status_information :string default(""), not null
# teaching_authority_websites :text default([]), not null, is an Array
# created_at :datetime not null
# updated_at :datetime not null
# id :bigint not null, primary key
# code :string not null
# eligibility_enabled :boolean default(TRUE), not null
# eligibility_skip_questions :boolean default(FALSE), not null
# other_information :text default(""), not null
# qualifications_information :text default(""), not null
# requires_preliminary_check :boolean default(FALSE), not null
# sanction_information :string default(""), not null
# status_information :string default(""), not null
# teaching_authority_address :text default(""), not null
# teaching_authority_certificate :text default(""), not null
# teaching_authority_emails :text default([]), not null, is an Array
# teaching_authority_name :text default(""), not null
# teaching_authority_online_checker_url :string default(""), not null
# teaching_authority_websites :text default([]), not null, is an Array
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
Expand Down
6 changes: 3 additions & 3 deletions spec/factories/regions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
# id :bigint not null, primary key
# application_form_skip_work_history :boolean default(FALSE), not null
# name :string default(""), not null
# other_information :text default(""), not null
# qualifications_information :text default(""), not null
# reduced_evidence_accepted :boolean default(FALSE), not null
# requires_preliminary_check :boolean default(FALSE), not null
# sanction_check :string default("none"), not null
# sanction_information :string default(""), not null
# status_check :string default("none"), not null
# status_information :string default(""), not null
# teaching_authority_address :text default(""), not null
# teaching_authority_certificate :text default(""), not null
# teaching_authority_emails :text default([]), not null, is an Array
# teaching_authority_name :text default(""), not null
# teaching_authority_online_checker_url :string default(""), not null
# teaching_authority_other :text default(""), not null
# teaching_authority_provides_written_statement :boolean default(FALSE), not null
# teaching_authority_requires_submission_email :boolean default(FALSE), not null
# teaching_authority_sanction_information :string default(""), not null
# teaching_authority_status_information :string default(""), not null
# teaching_authority_websites :text default([]), not null, is an Array
# written_statement_optional :boolean default(FALSE), not null
# created_at :datetime not null
Expand Down
Loading

0 comments on commit b8a648f

Please sign in to comment.