Skip to content

Commit

Permalink
Remove teaching authority fields from countries
Browse files Browse the repository at this point in the history
We're going to keep them only on regions to simplify the support
console.
  • Loading branch information
thomasleese committed Sep 7, 2023
1 parent d6c03e4 commit d38cd58
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 60 deletions.
26 changes: 10 additions & 16 deletions app/models/country.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
#
# 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
# other_information :text default(""), not null
# qualifications_information :text default(""), 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
# 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
# sanction_information :string default(""), not null
# status_information :string default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
Expand Down
6 changes: 0 additions & 6 deletions config/analytics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,6 @@
- qualifications_information
- sanction_information
- status_information
- teaching_authority_address
- teaching_authority_certificate
- teaching_authority_emails
- teaching_authority_name
- teaching_authority_online_checker_url
- teaching_authority_websites
- updated_at
:documents:
- available
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
class RemoveTeachingAuthorityFromCountries < ActiveRecord::Migration[7.0]
def change
change_table :countries, bulk: true do |t|
t.remove :teaching_authority_address,
type: :text,
default: "",
null: false
t.remove :teaching_authority_certificate,
type: :text,
default: "",
null: false
t.remove :teaching_authority_emails,
type: :text,
default: [],
null: false,
array: true
t.remove :teaching_authority_name, type: :text, default: "", null: false
t.remove :teaching_authority_online_checker_url,
type: :string,
default: "",
null: false
t.remove :teaching_authority_websites,
type: :text,
default: [],
null: false,
array: true
end
end
end
6 changes: 0 additions & 6 deletions db/schema.rb

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

26 changes: 10 additions & 16 deletions spec/factories/countries.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
#
# 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
# other_information :text default(""), not null
# qualifications_information :text default(""), 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
# 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
# sanction_information :string default(""), not null
# status_information :string default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
Expand Down
26 changes: 10 additions & 16 deletions spec/models/country_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
#
# 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
# other_information :text default(""), not null
# qualifications_information :text default(""), 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
# 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
# sanction_information :string default(""), not null
# status_information :string default(""), not null
# created_at :datetime not null
# updated_at :datetime not null
#
# Indexes
#
Expand Down

0 comments on commit d38cd58

Please sign in to comment.