diff --git a/db/schema.rb b/db/schema.rb index 593902d51..ea914599f 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.2].define(version: 2026_01_28_121417) do +ActiveRecord::Schema[7.2].define(version: 2026_02_03_142107) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -84,7 +84,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_28_121417) do t.datetime "last_accessed" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.check_constraint "log_type::text = ANY (ARRAY['lettings'::character varying::text, 'sales'::character varying::text])", name: "log_type_check" + t.check_constraint "log_type::text = ANY (ARRAY['lettings'::character varying, 'sales'::character varying]::text[])", name: "log_type_check" t.check_constraint "year >= 2000 AND year <= 2099", name: "year_check" end @@ -375,14 +375,6 @@ ActiveRecord::Schema[7.2].define(version: 2026_01_28_121417) do t.bigint "created_by_id" t.boolean "manual_address_entry_selected", default: false t.integer "referral_type" - t.string "sexrab1" - t.string "sexrab2" - t.string "sexrab3" - t.string "sexrab4" - t.string "sexrab5" - t.string "sexrab6" - t.string "sexrab7" - t.string "sexrab8" t.index ["assigned_to_id"], name: "index_lettings_logs_on_assigned_to_id" t.index ["bulk_upload_id"], name: "index_lettings_logs_on_bulk_upload_id" t.index ["created_by_id"], name: "index_lettings_logs_on_created_by_id" diff --git a/spec/factories/sales_log.rb b/spec/factories/sales_log.rb index a2e3f7d4c..7c6762b0d 100644 --- a/spec/factories/sales_log.rb +++ b/spec/factories/sales_log.rb @@ -83,6 +83,7 @@ FactoryBot.define do privacynotice { 1 } age1_known { 0 } age1 { Faker::Number.within(range: 27..45) } + sexrab1 { %w[F M X R].sample } sex1 { %w[F M X R].sample } national { 18 } buy1livein { 1 } @@ -93,6 +94,7 @@ FactoryBot.define do builtype { 1 } ethnic { 3 } ethnic_group { 17 } + sexrab2 { %w[F M X R].sample } sex2 { "X" } buy2livein { "1" } ecstat1 { "1" } @@ -125,9 +127,13 @@ FactoryBot.define do savingsnk { 1 } prevown { 1 } prevshared { 2 } + sexrab3 { %w[F M X R].sample } sex3 { %w[F M X R].sample } + sexrab4 { %w[F M X R].sample } sex4 { %w[F M X R].sample } + sexrab5 { %w[F M X R].sample } sex5 { %w[F M X R].sample } + sexrab6 { %w[F M X R].sample } sex6 { %w[F M X R].sample } mortgage { 20_000 } ecstat3 { 9 }