diff --git a/app/models/organisation.rb b/app/models/organisation.rb index d21717206..bd57838b8 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -89,7 +89,7 @@ class Organisation < ApplicationRecord { name: "Rent_periods", value: rent_period_labels, editable: false, format: :bullet }, { name: "Owns housing stock", value: holds_own_stock ? "Yes" : "No", editable: false }, { name: "Other stock owners", value: other_stock_owners, editable: false }, - { name: "Managing agents", value: managing_agents, editable: false }, + { name: "Managing agents", value: managing_agents_label, editable: false }, { name: "Data protection agreement", value: data_protection_agreement_string, editable: false }, ] end diff --git a/db/migrate/20221019082625_rename_managing_agents_column.rb b/db/migrate/20221019082625_rename_managing_agents_column.rb new file mode 100644 index 000000000..dd03a7435 --- /dev/null +++ b/db/migrate/20221019082625_rename_managing_agents_column.rb @@ -0,0 +1,5 @@ +class RenameManagingAgentsColumn < ActiveRecord::Migration[7.0] + def change + rename_column :organisations, :managing_agents, :managing_agents_label + end +end diff --git a/db/schema.rb b/db/schema.rb index 59a0dbd24..80f37a6b0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2022_10_17_095918) do +ActiveRecord::Schema[7.0].define(version: 2022_10_19_082625) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -297,7 +297,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_10_17_095918) do t.string "postcode" t.boolean "holds_own_stock" t.string "other_stock_owners" - t.string "managing_agents" + t.string "managing_agents_label" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.boolean "active" diff --git a/db/seeds.rb b/db/seeds.rb index f8d421999..dfc479cb8 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -15,7 +15,7 @@ unless Rails.env.test? postcode: "SW1P 4DF", holds_own_stock: true, other_stock_owners: "None", - managing_agents: "None", + managing_agents_label: "None", provider_type: "LA", ) do info = "Seeded DLUHC Organisation" @@ -33,9 +33,9 @@ unless Rails.env.test? postcode: "SW1P 4DF", holds_own_stock: true, other_stock_owners: "None", - managing_agents: "None", + managing_agents_label: "None", provider_type: "LA", - child_organisations: [org] + child_organisations: [org], ) @@ -78,7 +78,7 @@ unless Rails.env.test? postcode: "BA21 4AT", holds_own_stock: false, other_stock_owners: "None", - managing_agents: "None", + managing_agents_label: "None", provider_type: "LA", )