Browse Source

Add inc1mort column

pull/1025/head
Jack S 4 years ago
parent
commit
8f0ce9fe2b
  1. 7
      db/migrate/20221124102329_add_mortgage1_to_sales.rb
  2. 3
      db/schema.rb
  3. 1
      spec/factories/sales_log.rb

7
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

3
db/schema.rb

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # 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 # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
@ -383,6 +383,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_11_22_130928) do
t.integer "age5_known" t.integer "age5_known"
t.integer "age6" t.integer "age6"
t.integer "age6_known" t.integer "age6_known"
t.integer "inc1mort"
t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" 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 ["managing_organisation_id"], name: "index_sales_logs_on_managing_organisation_id"
t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id" t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id"

1
spec/factories/sales_log.rb

@ -52,6 +52,7 @@ FactoryBot.define do
age6 { 40 } age6 { 40 }
income1nk { 0 } income1nk { 0 }
income1 { 10_000 } income1 { 10_000 }
inc1mort { 1 }
la_known { "1" } la_known { "1" }
la { "E09000003" } la { "E09000003" }
end end

Loading…
Cancel
Save