diff --git a/app/models/country.rb b/app/models/country.rb index 24b24479c1..46ae727f68 100644 --- a/app/models/country.rb +++ b/app/models/country.rb @@ -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 # diff --git a/config/analytics.yml b/config/analytics.yml index 142405a577..cb6645e4cd 100644 --- a/config/analytics.yml +++ b/config/analytics.yml @@ -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 diff --git a/db/migrate/20230904170502_remove_teaching_authority_from_countries.rb b/db/migrate/20230904170502_remove_teaching_authority_from_countries.rb new file mode 100644 index 0000000000..9f71e6e27a --- /dev/null +++ b/db/migrate/20230904170502_remove_teaching_authority_from_countries.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 4ca9121929..4aa291268f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -162,12 +162,6 @@ t.boolean "eligibility_enabled", default: true, null: false t.boolean "eligibility_skip_questions", default: false, null: false t.text "qualifications_information", default: "", null: false - t.text "teaching_authority_websites", default: [], null: false, array: true - t.string "teaching_authority_online_checker_url", default: "", null: false - t.text "teaching_authority_name", default: "", null: false - t.text "teaching_authority_emails", default: [], null: false, array: true - t.text "teaching_authority_certificate", default: "", null: false - t.text "teaching_authority_address", default: "", null: false t.index ["code"], name: "index_countries_on_code", unique: true end diff --git a/spec/factories/countries.rb b/spec/factories/countries.rb index eec697157f..9d00e2b925 100644 --- a/spec/factories/countries.rb +++ b/spec/factories/countries.rb @@ -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 # diff --git a/spec/models/country_spec.rb b/spec/models/country_spec.rb index 216a9269ca..ca1ac49712 100644 --- a/spec/models/country_spec.rb +++ b/spec/models/country_spec.rb @@ -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 #