From 8f0ce9fe2bc6cd44245c4f45ec0fed32bb0d0dc2 Mon Sep 17 00:00:00 2001 From: Jack S Date: Fri, 25 Nov 2022 09:20:08 +0000 Subject: [PATCH] Add inc1mort column --- db/migrate/20221124102329_add_mortgage1_to_sales.rb | 7 +++++++ db/schema.rb | 3 ++- spec/factories/sales_log.rb | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20221124102329_add_mortgage1_to_sales.rb diff --git a/db/migrate/20221124102329_add_mortgage1_to_sales.rb b/db/migrate/20221124102329_add_mortgage1_to_sales.rb new file mode 100644 index 000000000..472ac28b7 --- /dev/null +++ b/db/migrate/20221124102329_add_mortgage1_to_sales.rb @@ -0,0 +1,7 @@ +class AddMortgage1ToSales < ActiveRecord::Migration[7.0] + def change + change_table :sales_logs, bulk: true do |t| + t.column :inc1mort, :int + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 9df577686..4ceb57dbc 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_11_22_130928) do +ActiveRecord::Schema[7.0].define(version: 2022_11_24_102329) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -383,6 +383,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_11_22_130928) do t.integer "age5_known" t.integer "age6" t.integer "age6_known" + t.integer "inc1mort" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["managing_organisation_id"], name: "index_sales_logs_on_managing_organisation_id" t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id" diff --git a/spec/factories/sales_log.rb b/spec/factories/sales_log.rb index 8e37581c5..e6c45a009 100644 --- a/spec/factories/sales_log.rb +++ b/spec/factories/sales_log.rb @@ -52,6 +52,7 @@ FactoryBot.define do age6 { 40 } income1nk { 0 } income1 { 10_000 } + inc1mort { 1 } la_known { "1" } la { "E09000003" } end