Browse Source

Rename managing_agents column

CLDC-1661-new-page-for-housing-providers
Jack S 2 years ago
parent
commit
1943357db1
  1. 2
      app/models/organisation.rb
  2. 5
      db/migrate/20221019082625_rename_managing_agents_column.rb
  3. 4
      db/schema.rb
  4. 8
      db/seeds.rb

2
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

5
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

4
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"

8
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",
)

Loading…
Cancel
Save