Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

862 lines
30 KiB

3 years ago
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2024_10_31_102744) do
3 years ago
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "bulk_upload_errors", force: :cascade do |t|
t.bigint "bulk_upload_id"
t.text "cell"
t.text "row"
t.text "tenant_code"
t.text "property_ref"
t.text "purchaser_code"
t.text "field"
t.text "error"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "col"
t.text "category"
t.index ["bulk_upload_id"], name: "index_bulk_upload_errors_on_bulk_upload_id"
end
create_table "bulk_uploads", force: :cascade do |t|
t.bigint "user_id"
t.text "log_type", null: false
t.integer "year", null: false
t.uuid "identifier", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.text "filename"
t.integer "needstype"
t.text "choice"
t.integer "total_logs_count"
t.string "rent_type_fix_status", default: "not_applied"
t.integer "organisation_id"
t.integer "moved_user_id"
t.string "failure_reason"
t.boolean "processing"
t.index ["identifier"], name: "index_bulk_uploads_on_identifier", unique: true
t.index ["user_id"], name: "index_bulk_uploads_on_user_id"
end
create_table "collection_resources", force: :cascade do |t|
t.string "log_type"
t.string "resource_type"
t.string "display_name"
t.string "short_display_name"
t.integer "year"
t.string "download_filename"
t.boolean "mandatory"
t.boolean "released_to_user"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "discarded_at"
end
create_table "csv_variable_definitions", force: :cascade do |t|
t.string "variable", null: false
t.string "definition", null: false
t.string "log_type", null: false
t.integer "year", null: false
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, 'sales'::character varying]::text[])", name: "log_type_check"
t.check_constraint "year >= 2000 AND year <= 2099", name: "year_check"
end
create_table "data_protection_confirmations", force: :cascade do |t|
t.bigint "organisation_id"
t.bigint "data_protection_officer_id"
t.boolean "confirmed"
t.string "old_id"
t.string "old_org_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "signed_at"
t.string "organisation_name"
t.string "organisation_address"
t.string "organisation_phone_number"
t.string "data_protection_officer_email"
t.string "data_protection_officer_name"
t.index ["data_protection_officer_id"], name: "dpo_user_id"
t.index ["organisation_id"], name: "index_data_protection_confirmations_on_organisation_id"
end
create_table "exports", force: :cascade do |t|
t.datetime "created_at", default: -> { "CURRENT_TIMESTAMP" }
t.datetime "started_at", null: false
t.integer "base_number", default: 1, null: false
t.integer "increment_number", default: 1, null: false
t.boolean "empty_export", default: false, null: false
t.string "collection"
end
create_table "la_rent_ranges", force: :cascade do |t|
t.integer "ranges_rent_id"
t.integer "lettype"
t.string "la"
t.integer "beds"
t.decimal "soft_min", precision: 10, scale: 2
t.decimal "soft_max", precision: 10, scale: 2
t.decimal "hard_min", precision: 10, scale: 2
t.decimal "hard_max", precision: 10, scale: 2
t.integer "start_year"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["start_year", "lettype", "beds", "la"], name: "index_la_rent_ranges_on_start_year_and_lettype_and_beds_and_la", unique: true
end
create_table "la_sale_ranges", force: :cascade do |t|
t.string "la"
t.integer "bedrooms"
t.decimal "soft_min", precision: 10, scale: 2
t.decimal "soft_max", precision: 10, scale: 2
t.integer "start_year"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["start_year", "bedrooms", "la"], name: "index_la_sale_ranges_on_start_year_bedrooms_la", unique: true
end
create_table "legacy_users", force: :cascade do |t|
t.string "old_user_id"
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["old_user_id"], name: "index_legacy_users_on_old_user_id", unique: true
end
create_table "lettings_logs", force: :cascade do |t|
3 years ago
t.integer "status", default: 0
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "tenancycode"
t.integer "age1"
t.string "sex1"
t.integer "ethnic"
t.integer "national"
t.integer "prevten"
t.integer "ecstat1"
t.integer "hhmemb"
t.integer "age2"
t.string "sex2"
t.integer "ecstat2"
t.integer "age3"
t.string "sex3"
t.integer "ecstat3"
t.integer "age4"
t.string "sex4"
t.integer "ecstat4"
t.integer "age5"
t.string "sex5"
t.integer "ecstat5"
t.integer "age6"
t.string "sex6"
t.integer "ecstat6"
t.integer "age7"
t.string "sex7"
t.integer "ecstat7"
t.integer "age8"
t.string "sex8"
t.integer "ecstat8"
t.integer "homeless"
t.integer "underoccupation_benefitcap"
t.integer "leftreg"
t.integer "reservist"
t.integer "illness"
t.integer "preg_occ"
t.integer "startertenancy"
t.integer "tenancylength"
t.integer "tenancy"
t.string "ppostcode_full"
t.integer "rsnvac"
t.integer "unittype_gn"
t.integer "beds"
t.integer "offered"
t.integer "wchair"
t.integer "earnings"
t.integer "incfreq"
t.integer "benefits"
t.integer "period"
t.integer "layear"
t.integer "waityear"
t.string "postcode_full"
t.integer "reasonpref"
t.integer "cbl"
t.integer "chr"
t.integer "cap"
t.string "reasonother"
t.integer "housingneeds_a"
t.integer "housingneeds_b"
t.integer "housingneeds_c"
t.integer "housingneeds_f"
t.integer "housingneeds_g"
t.integer "housingneeds_h"
t.integer "illness_type_1"
t.integer "illness_type_2"
t.integer "illness_type_3"
t.integer "illness_type_4"
t.integer "illness_type_8"
t.integer "illness_type_5"
t.integer "illness_type_6"
t.integer "illness_type_7"
t.integer "illness_type_9"
t.integer "illness_type_10"
t.integer "rp_homeless"
t.integer "rp_insan_unsat"
t.integer "rp_medwel"
t.integer "rp_hardship"
t.integer "rp_dontknow"
t.string "tenancyother"
t.integer "net_income_value_check"
3 years ago
t.string "property_owner_organisation"
t.string "property_manager_organisation"
t.string "irproduct_other"
3 years ago
t.string "purchaser_code"
t.integer "reason"
t.string "propcode"
t.integer "majorrepairs"
t.string "la"
t.string "prevloc"
t.integer "hb"
t.integer "hbrentshortfall"
t.integer "property_relet"
t.datetime "mrcdate"
t.integer "incref"
t.datetime "startdate"
t.integer "armedforces"
t.integer "first_time_property_let_as_social_housing"
t.integer "unitletas"
3 years ago
t.integer "builtype"
t.datetime "voiddate"
t.bigint "owning_organisation_id"
t.bigint "managing_organisation_id"
t.integer "renttype"
t.integer "needstype"
t.integer "lettype"
t.integer "postcode_known"
t.boolean "is_la_inferred"
t.integer "totchild"
t.integer "totelder"
t.integer "totadult"
t.integer "net_income_known"
t.integer "nocharge"
t.integer "is_carehome"
t.integer "household_charge"
t.integer "referral"
t.decimal "brent", precision: 10, scale: 2
t.decimal "scharge", precision: 10, scale: 2
t.decimal "pscharge", precision: 10, scale: 2
t.decimal "supcharg", precision: 10, scale: 2
t.decimal "tcharge", precision: 10, scale: 2
t.decimal "tshortfall", precision: 10, scale: 2
t.decimal "chcharge", precision: 10, scale: 2
t.integer "declaration"
t.integer "ppcodenk"
t.integer "previous_la_known"
t.boolean "is_previous_la_inferred"
t.integer "age1_known"
t.integer "age2_known"
t.integer "age3_known"
t.integer "age4_known"
t.integer "age5_known"
t.integer "age6_known"
t.integer "age7_known"
t.integer "age8_known"
t.integer "ethnic_group"
t.integer "letting_allocation_unknown"
t.integer "details_known_2"
t.integer "details_known_3"
t.integer "details_known_4"
t.integer "details_known_5"
t.integer "details_known_6"
t.integer "details_known_7"
t.integer "details_known_8"
t.integer "rent_type"
t.integer "has_benefits"
t.integer "renewal"
t.decimal "wrent", precision: 10, scale: 2
t.decimal "wscharge", precision: 10, scale: 2
t.decimal "wpschrge", precision: 10, scale: 2
t.decimal "wsupchrg", precision: 10, scale: 2
t.decimal "wtcharge", precision: 10, scale: 2
t.decimal "wtshortfall", precision: 10, scale: 2
t.integer "refused"
t.integer "housingneeds"
t.decimal "wchchrg", precision: 10, scale: 2
t.integer "newprop"
t.string "relat2"
t.string "relat3"
t.string "relat4"
t.string "relat5"
t.string "relat6"
t.string "relat7"
t.string "relat8"
t.integer "rent_value_check"
t.integer "old_form_id"
t.integer "lar"
t.integer "irproduct"
t.string "old_id"
t.integer "joint"
t.bigint "assigned_to_id"
2 years ago
t.integer "retirement_value_check"
t.integer "tshortfall_known"
t.integer "sheltered"
t.integer "pregnancy_value_check"
t.integer "hhtype"
t.integer "new_old"
t.integer "vacdays"
t.bigint "scheme_id"
t.bigint "location_id"
t.integer "major_repairs_date_value_check"
t.integer "void_date_value_check"
t.integer "housingneeds_type"
t.integer "housingneeds_other"
t.boolean "unresolved"
t.bigint "updated_by_id"
t.bigint "bulk_upload_id"
t.string "uprn"
t.integer "uprn_known"
t.integer "uprn_confirmed"
t.string "address_line1"
t.string "address_line2"
t.string "town_or_city"
t.string "county"
t.integer "carehome_charges_value_check"
t.integer "status_cache", default: 0, null: false
t.datetime "discarded_at"
t.integer "creation_method", default: 1
t.datetime "values_updated_at"
t.integer "referral_value_check"
t.integer "supcharg_value_check"
t.integer "scharge_value_check"
t.integer "pscharge_value_check"
t.integer "duplicate_set_id"
t.integer "accessible_register"
t.integer "nationality_all"
t.integer "nationality_all_group"
t.integer "reasonother_value_check"
CLDC-2069 Find UPRNs by address (#2278) * feat: mvp commit with address selector from address line 1 and postcode using OS places find endpoint * feat: build out alternative routes through the address lookup flow * refactor: lint * refactor: remove commented lines * feat: make nil safe * feat: test address client * feat: store address input separately * feat: add migration * feat: display inputs in answer label * feat: update data presenter and test * feat: revert precicions schema update * feat: revert precision schema update * feat: migrate new fields to sales logs * feat: update shared log examples tests * feat: use -1 for not listed address for extensibility * feat: add service error to address_selection * feat: handle case when no addresses are found * feat: allow re-entering different uprns * feat: improve error handling and don't accept "no match" precisions * feat: add page tests * feat: confirm uprn on address update * feat: add question tests * feat: don't set minimum match for initial search * feat: mvp commit with address selector from address line 1 and postcode using OS places find endpoint * feat: build out alternative routes through the address lookup flow * refactor: lint * refactor: remove commented lines * feat: make nil safe * feat: test address client * feat: store address input separately * feat: add migration * feat: display inputs in answer label * feat: update data presenter and test * feat: revert precision schema update * feat: migrate new fields to sales logs * feat: update shared log examples tests * feat: use -1 for not listed address for extensibility * feat: add service error to address_selection * feat: handle case when no addresses are found * feat: allow re-entering different uprns * feat: improve error handling and don't accept "no match" precisions * feat: add page tests * feat: confirm uprn on address update * feat: add question tests * feat: don't set minimum match for initial search * feat: add no address found page * feat: allow uprn known to be skipped, and set 0.4 min precision * feat: accept best "good" match in bulk upload * feat: update validations and test * refactor: avoid stubbing using any_instance_of * refactor: use change_table in migrations * feat: add lettings behaviour to sales logs * feat: update sales tests * feat: xit test that is xited in lettings * feat: stub os api in sales row parser * feat: stub os api in sales row parser * feat: add address line 1 to required attributes * feat: update matching details and fix row parser validation * refactor: improve readability * feat: set uprns as option IDs to avoid multiple lookups * feat: add sales uprn_selection * feat: update schema * feat: update tests * feat: remove redundant methods * feat: update error message and fix tests * feat: update tests * feat: update tests and error behaviour * feat: update tests
10 months ago
t.string "address_line1_input"
t.string "postcode_full_input"
t.integer "address_search_value_check"
t.string "uprn_selection"
t.string "address_line1_as_entered"
t.string "address_line2_as_entered"
t.string "town_or_city_as_entered"
t.string "county_as_entered"
t.string "postcode_full_as_entered"
t.string "la_as_entered"
t.integer "partner_under_16_value_check"
t.integer "multiple_partners_value_check"
t.bigint "created_by_id"
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"
t.index ["location_id"], name: "index_lettings_logs_on_location_id"
t.index ["managing_organisation_id"], name: "index_lettings_logs_on_managing_organisation_id"
t.index ["old_id"], name: "index_lettings_logs_on_old_id", unique: true
t.index ["owning_organisation_id"], name: "index_lettings_logs_on_owning_organisation_id"
t.index ["scheme_id"], name: "index_lettings_logs_on_scheme_id"
t.index ["updated_by_id"], name: "index_lettings_logs_on_updated_by_id"
end
create_table "local_authorities", force: :cascade do |t|
t.string "code", null: false
t.string "name", null: false
t.datetime "start_date", null: false
t.datetime "end_date"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["code"], name: "index_local_authority_code", unique: true
end
create_table "local_authority_links", force: :cascade do |t|
t.bigint "local_authority_id"
t.bigint "linked_local_authority_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["linked_local_authority_id"], name: "index_local_authority_links_on_linked_local_authority_id"
t.index ["local_authority_id"], name: "index_local_authority_links_on_local_authority_id"
end
create_table "location_deactivation_periods", force: :cascade do |t|
t.datetime "deactivation_date"
t.datetime "reactivation_date"
t.bigint "location_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["location_id"], name: "index_location_deactivation_periods_on_location_id"
end
create_table "locations", force: :cascade do |t|
t.string "location_code"
t.string "postcode"
t.bigint "scheme_id", null: false
t.string "name"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "units"
CLDC-1337-permitted-user-can-add-location-when-creating-scheme (#704) * added last step * not finding postcode field * testing being direct to add locations page after submitting support questions * added route to locations controller * location controller spec * location controller * added template for new * next step in feature * added postcode * added name to locations * removed total units from schemes * moved total units to locations * changed type of unit type in db * using type of units * add locations page is finished * purged total units and added test for location create * creating location * testing creating location as data provider * fixed factory * refacotred update/create and added test creating location as a coord user * testing returning back to create page if create another location is selected * testing returning back to create page if create another location is selected - part 2 * thanks rubocop * thanks rubocop * testing back from new location * returned tests back * testing clickable locations link * testing clickable locations link under correct context * correctly looking table * table with caption * wip * fixed failing exisiting tests * fixed failing exisiting tests - part 2 * validating postcode case logs style * validating postcode specs * validating postcode specs debugger removed * navigation when editing location * spike creating new location after addition * small refactoring * added test to add another location from locations page * added test to amend a location * added test to amend a location - part 2 * testing location cell * added wheelchair adaptions to the unit tyupe * rebased * testing postcode missing * testing creating schem for a different org for coordinator * testing new scheme for a different org for coordinator * upcasing all postcodes before creation * testing edge cases around postcodes and yes or no for another location * create locations with support user * details locations specs * update locations specs * rubocop * checking raising error * fixed failed test * switched yes and no for wheelchairs * routes refactoring * fixed routing - WIP * further chanegs * feature tests passing * correct page when errros * redundant page * moving viewing locations away from schemes controller * new is fixed * create fixed * fixed locations specs * fixed tab nav specs * completed location specs * lint
3 years ago
t.integer "type_of_unit"
t.string "old_id"
t.string "old_visible_id"
t.string "mobility_type"
t.datetime "startdate"
t.string "location_admin_district"
t.boolean "confirmed"
t.boolean "is_la_inferred"
t.datetime "discarded_at"
t.index ["old_id"], name: "index_locations_on_old_id", unique: true
t.index ["scheme_id"], name: "index_locations_on_scheme_id"
end
create_table "log_validations", force: :cascade do |t|
t.string "log_type"
t.string "section"
t.string "validation_name"
t.string "description"
t.string "case"
t.string "field"
t.string "error_message"
t.datetime "from"
t.datetime "to"
t.string "validation_type"
t.string "hard_soft"
t.boolean "bulk_upload_specific", default: false
t.string "other_validated_models"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "checked"
end
create_table "merge_request_organisations", force: :cascade do |t|
t.integer "merge_request_id"
t.integer "merging_organisation_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "merge_requests", force: :cascade do |t|
t.integer "requesting_organisation_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "absorbing_organisation_id"
CLDC-3382 Add support user functionality to merge organisations (#2566) * CLDC-2093 Merge organisations page - view all merge requests (#2561) * CLDC-3585 Update absorbing organisation question (#2564) * Update user permissions and absorbing org question order * Update absorbing organisation question and routing * CLDC 2094: View a merge request (#2565) * CLDC-3584 Update merging orgs question (#2567) * Update merging organisations question * Update rebase tests * Update routing between CYA and questions * CLDC-3586 Update merge date merge request question (#2571) * Remove unused paths and update merge date * lint * Create delete merge request functionality (#2568) * CLDC-3588: Add helpdesk ticket question (#2572) * Merge request fixes (#2578) * Add cancel button to merging orgs and update merging orgs selection * Update submit button text * Update back buttons * CLDC-2101 Add begin merge (#2575) * Calculate merge request status * Add start merge and merge request job * Update merge request when it gets processed * Refactor and display a banner for failed requests * update test * Update change links * Update copy for error message (#2583) * Do not display cancel button if there's no submit (#2584) * Update hint date (#2588) * CLDC-2100++ Add success notification after delete (#2589) * Update helpdesk_ticket.html.erb * CLDC-2094++ Merge details page adjustments (#2593) * Change page name and hide buttons during processing status * Update test * Make merge request status dynamic (#2592) * Make merge request status dynamic * Update tests * Keep check answers referrer when validation is hit (#2594) * Keep check answers referrer when validation is hit * Remove absorbing org from merging organisations list * Update text to handle singular merge requests * Add merge start confirmation page (#2601) * Set merge request as non processing if it fails (#2598) * Set merge request to no longer processing if it fails * clear last_failed_attempt as soon as we start processing the merge * CLDC-3603 View merged users outcomes (#2602) * Update user outcomes view link * Add user outcomes page * Set user outcomes before merge and on merge fail * Update hardcoded total user count * Account for singular user numbers * CLDC-3603 View scheme outcomes (#2604) * Update scheme outcomes view link * Add scheme outcomes page * Update scheme outcome before merge and on merge fail * Update back links in merge outcomes pages (#2611) * CLDC-3605 View relationships page (#2606) * CLDC-3609 Add existing absorbing organisation merge request question (#2600) * Add existing absorbing organisation page and field * Update status calculation and add new question to check answers * Call correct merge service flow * Update test * Update test * Return correct status when existing_absorbing_organisation is false (#2617) * Change styling of relationship outcomes page (#2619) * CLDC-3604 View logs outcomes (#2618) * Update view logs outcomes link * Add logs outcomes page * Set logs outcome before merge and on merge fail * Update logs outcomes text * Update line break * Fix incorrect filtering of relationships and count * Fix test * Fix test * Fix test * Make example date depend on collection year (#2620) --------- Co-authored-by: Manny Dinssa <44172848+Dinssa@users.noreply.github.com>
4 months ago
t.datetime "merge_date"
t.integer "requester_id"
t.string "helpdesk_ticket"
t.integer "total_users"
t.integer "total_schemes"
t.integer "total_lettings_logs"
t.integer "total_sales_logs"
t.integer "total_stock_owners"
t.integer "total_managing_agents"
t.boolean "signed_dsa", default: false
t.datetime "discarded_at"
t.datetime "last_failed_attempt"
t.boolean "request_merged"
t.boolean "processing"
t.boolean "existing_absorbing_organisation"
end
CLDC-3116 Create homepage (#2113) * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * CLDC-2253 Add collection resources (#2120) * Update collection resources, add to homepage * Add guidance link to an empty page * Update headings * Rebase fix * Update title * Update file names * Add section break * CLDC-2593 Add upcoming deadlines section (#2119) * Add upcoming deadlines section * Update the content to use the correct dates * Update content * lint * typos * CLDC-2252 Add homepage task section (#2115) * feat: wip add lettings, sales and schemes sections with correct text, counts, links and colouring * feat: add flex styling to match designs * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * feat: update breakpoints for responsive layout changes * lint: use hash lookup where possible * lint: erblinting * feat: improve formatting * Reuse govuk grid * Revert "Reuse govuk grid" This reverts commit 8c71f5d9edf261802a8a86e07c13552f51283668. * feat: test home page data boxes * refactor: lint * refactor: lint * feat: test link behaviour is correct in all user scenarios * refactor: lint * feat: update tests * feat: combine task, resources, deadlines sections --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com> * CLDC-2255 Add homepage notifications (#2131) * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: default p tag around sanitized page content * feat: add active scope * feat: use newest active unread/unauthenticated notification and update start page * feat: add tests of notification behaviour and routing and refactor * refactor: lint * feat: update Gemfile.lock * feat: add timestamps to readmark table * feat: update gemfile.lock * refactor: lint * feat: test notifications page doesn't show notifications and code simplification * feat: move notification helper methods to notifications_helper.rb --------- Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: clear all no-status filters on in progress links * CLDC-2590 Add about this service section (#2124) * Add about core section * Move about core to the correct spot on start page * Update content * Add some margins --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com>
12 months ago
create_table "notifications", force: :cascade do |t|
t.string "title"
t.string "link_text"
t.string "page_content"
t.datetime "start_date"
t.datetime "end_date"
t.boolean "show_on_unauthenticated_pages"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "show_additional_page"
CLDC-3116 Create homepage (#2113) * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * CLDC-2253 Add collection resources (#2120) * Update collection resources, add to homepage * Add guidance link to an empty page * Update headings * Rebase fix * Update title * Update file names * Add section break * CLDC-2593 Add upcoming deadlines section (#2119) * Add upcoming deadlines section * Update the content to use the correct dates * Update content * lint * typos * CLDC-2252 Add homepage task section (#2115) * feat: wip add lettings, sales and schemes sections with correct text, counts, links and colouring * feat: add flex styling to match designs * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * feat: update breakpoints for responsive layout changes * lint: use hash lookup where possible * lint: erblinting * feat: improve formatting * Reuse govuk grid * Revert "Reuse govuk grid" This reverts commit 8c71f5d9edf261802a8a86e07c13552f51283668. * feat: test home page data boxes * refactor: lint * refactor: lint * feat: test link behaviour is correct in all user scenarios * refactor: lint * feat: update tests * feat: combine task, resources, deadlines sections --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com> * CLDC-2255 Add homepage notifications (#2131) * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: default p tag around sanitized page content * feat: add active scope * feat: use newest active unread/unauthenticated notification and update start page * feat: add tests of notification behaviour and routing and refactor * refactor: lint * feat: update Gemfile.lock * feat: add timestamps to readmark table * feat: update gemfile.lock * refactor: lint * feat: test notifications page doesn't show notifications and code simplification * feat: move notification helper methods to notifications_helper.rb --------- Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: clear all no-status filters on in progress links * CLDC-2590 Add about this service section (#2124) * Add about core section * Move about core to the correct spot on start page * Update content * Add some margins --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com>
12 months ago
end
create_table "organisation_relationships", force: :cascade do |t|
t.integer "child_organisation_id"
t.integer "parent_organisation_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["child_organisation_id"], name: "index_organisation_relationships_on_child_organisation_id"
t.index ["parent_organisation_id", "child_organisation_id"], name: "index_org_rel_parent_child_uniq", unique: true
t.index ["parent_organisation_id"], name: "index_organisation_relationships_on_parent_organisation_id"
end
3 years ago
create_table "organisation_rent_periods", force: :cascade do |t|
t.bigint "organisation_id"
t.integer "rent_period"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["organisation_id"], name: "index_organisation_rent_periods_on_organisation_id"
end
create_table "organisations", force: :cascade do |t|
t.string "name"
t.string "phone"
t.integer "provider_type"
t.string "address_line1"
t.string "address_line2"
t.string "postcode"
t.boolean "holds_own_stock"
t.string "other_stock_owners"
t.string "managing_agents_label"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.boolean "active", default: true
t.integer "old_association_type"
t.string "software_supplier_id"
t.string "housing_management_system"
t.boolean "choice_based_lettings"
t.boolean "common_housing_register"
t.boolean "choice_allocation_policy"
t.integer "cbl_proportion_percentage"
t.boolean "enter_affordable_logs"
t.boolean "owns_affordable_logs"
t.string "housing_registration_no"
t.integer "general_needs_units"
t.integer "supported_housing_units"
t.integer "unspecified_units"
t.string "old_org_id"
t.string "old_visible_id"
t.datetime "merge_date"
t.bigint "absorbing_organisation_id"
t.datetime "available_from"
t.datetime "discarded_at"
t.datetime "schemes_deduplicated_at"
t.index ["absorbing_organisation_id"], name: "index_organisations_on_absorbing_organisation_id"
t.index ["old_visible_id"], name: "index_organisations_on_old_visible_id", unique: true
3 years ago
end
CLDC-3116 Create homepage (#2113) * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * CLDC-2253 Add collection resources (#2120) * Update collection resources, add to homepage * Add guidance link to an empty page * Update headings * Rebase fix * Update title * Update file names * Add section break * CLDC-2593 Add upcoming deadlines section (#2119) * Add upcoming deadlines section * Update the content to use the correct dates * Update content * lint * typos * CLDC-2252 Add homepage task section (#2115) * feat: wip add lettings, sales and schemes sections with correct text, counts, links and colouring * feat: add flex styling to match designs * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * feat: update breakpoints for responsive layout changes * lint: use hash lookup where possible * lint: erblinting * feat: improve formatting * Reuse govuk grid * Revert "Reuse govuk grid" This reverts commit 8c71f5d9edf261802a8a86e07c13552f51283668. * feat: test home page data boxes * refactor: lint * refactor: lint * feat: test link behaviour is correct in all user scenarios * refactor: lint * feat: update tests * feat: combine task, resources, deadlines sections --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com> * CLDC-2255 Add homepage notifications (#2131) * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: default p tag around sanitized page content * feat: add active scope * feat: use newest active unread/unauthenticated notification and update start page * feat: add tests of notification behaviour and routing and refactor * refactor: lint * feat: update Gemfile.lock * feat: add timestamps to readmark table * feat: update gemfile.lock * refactor: lint * feat: test notifications page doesn't show notifications and code simplification * feat: move notification helper methods to notifications_helper.rb --------- Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: clear all no-status filters on in progress links * CLDC-2590 Add about this service section (#2124) * Add about core section * Move about core to the correct spot on start page * Update content * Add some margins --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com>
12 months ago
create_table "read_marks", force: :cascade do |t|
t.string "readable_type", null: false
t.bigint "readable_id"
t.string "reader_type", null: false
t.bigint "reader_id"
t.datetime "timestamp", precision: nil, null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
CLDC-3116 Create homepage (#2113) * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * CLDC-2253 Add collection resources (#2120) * Update collection resources, add to homepage * Add guidance link to an empty page * Update headings * Rebase fix * Update title * Update file names * Add section break * CLDC-2593 Add upcoming deadlines section (#2119) * Add upcoming deadlines section * Update the content to use the correct dates * Update content * lint * typos * CLDC-2252 Add homepage task section (#2115) * feat: wip add lettings, sales and schemes sections with correct text, counts, links and colouring * feat: add flex styling to match designs * CLDC-3076: Make example dates consistent (#2107) * CLDC-3076: Make example dates consistent * Use example date even when some hint text provided already * Temp remove some date restrictions * Update to 2 line breaks * Revert "Temp remove some date restrictions" This reverts commit cd7f18f9f10957be0cbabee7665c0abe4239acb6. * Fix lettings log accessor in date question (#2117) * Fix lettings log accessor in date question * Remove hardcoded date example from mrcdate question (#2118) --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> * feat: update breakpoints for responsive layout changes * lint: use hash lookup where possible * lint: erblinting * feat: improve formatting * Reuse govuk grid * Revert "Reuse govuk grid" This reverts commit 8c71f5d9edf261802a8a86e07c13552f51283668. * feat: test home page data boxes * refactor: lint * refactor: lint * feat: test link behaviour is correct in all user scenarios * refactor: lint * feat: update tests * feat: combine task, resources, deadlines sections --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com> * CLDC-2255 Add homepage notifications (#2131) * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: add blank homepage, update routing and tests * feat: add welcome message and thoroughly test routing * refactor: lint * feat: update tests * CLDC-3061 Add guidance page (#2121) * Add guidance page * Link to guidance from start page * feat: test home/start paths explicitly * feat: add notification table * feat: add notification banner, use unread gem for notification management * feat: add notifications page and remove unread_notification.rb * feat: default p tag around sanitized page content * feat: add active scope * feat: use newest active unread/unauthenticated notification and update start page * feat: add tests of notification behaviour and routing and refactor * refactor: lint * feat: update Gemfile.lock * feat: add timestamps to readmark table * feat: update gemfile.lock * refactor: lint * feat: test notifications page doesn't show notifications and code simplification * feat: move notification helper methods to notifications_helper.rb --------- Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: clear all no-status filters on in progress links * CLDC-2590 Add about this service section (#2124) * Add about core section * Move about core to the correct spot on start page * Update content * Add some margins --------- Co-authored-by: Rachael Booth <Rachael.Booth@softwire.com> Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Co-authored-by: Kat <kosiak.katrina@gmail.com>
12 months ago
t.index ["readable_type", "readable_id"], name: "index_read_marks_on_readable_type_and_readable_id"
t.index ["reader_id", "reader_type", "readable_type", "readable_id"], name: "read_marks_reader_readable_index", unique: true
t.index ["reader_type", "reader_id"], name: "index_read_marks_on_reader_type_and_reader_id"
end
create_table "sales_logs", force: :cascade do |t|
t.integer "status", default: 0
t.datetime "saledate"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "owning_organisation_id"
t.bigint "assigned_to_id"
t.string "purchid"
t.integer "type"
t.integer "ownershipsch"
t.string "othtype"
t.integer "jointmore"
t.integer "jointpur"
t.integer "beds"
t.integer "companybuy"
t.integer "age1"
t.integer "age1_known"
t.string "sex1"
t.integer "national"
t.integer "ethnic"
t.integer "ethnic_group"
t.integer "buy1livein"
t.integer "buylivein"
t.integer "builtype"
t.integer "proptype"
t.integer "age2"
t.integer "age2_known"
t.string "relat2"
t.string "sex2"
t.integer "noint"
t.integer "buy2livein"
t.integer "ecstat2"
t.integer "privacynotice"
t.integer "ecstat1"
t.integer "wheel"
t.integer "hholdcount"
t.integer "age3"
t.integer "age3_known"
t.string "la"
t.integer "la_known"
t.integer "income1"
t.integer "income1nk"
t.integer "details_known_2"
t.integer "details_known_3"
t.integer "details_known_4"
t.integer "age4"
t.integer "age4_known"
t.integer "age5"
t.integer "age5_known"
t.integer "age6"
t.integer "age6_known"
t.integer "inc1mort"
t.integer "income2"
t.integer "income2nk"
t.integer "savingsnk"
t.integer "savings"
t.integer "prevown"
t.string "sex3"
t.bigint "updated_by_id"
t.integer "income1_value_check"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.decimal "mortgage", precision: 10, scale: 2
t.integer "inc2mort"
t.integer "mortgage_value_check"
t.integer "ecstat3"
t.integer "ecstat4"
t.integer "ecstat5"
t.integer "ecstat6"
t.string "relat3"
t.string "relat4"
t.string "relat5"
t.string "relat6"
t.integer "hb"
t.string "sex4"
t.string "sex5"
t.string "sex6"
t.integer "savings_value_check"
t.integer "deposit_value_check"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.integer "frombeds"
t.integer "staircase"
t.decimal "stairbought"
t.decimal "stairowned"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.decimal "mrent", precision: 10, scale: 2
t.datetime "exdate"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.integer "exday"
t.integer "exmonth"
t.integer "exyear"
t.integer "resale"
t.decimal "deposit", precision: 10, scale: 2
t.decimal "cashdis", precision: 10, scale: 2
t.integer "disabled"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.integer "lanomagr"
Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
t.integer "wheel_value_check"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.integer "soctenant"
t.decimal "value", precision: 10, scale: 2
t.decimal "equity", precision: 10, scale: 2
t.decimal "discount", precision: 10, scale: 2
t.decimal "grant", precision: 10, scale: 2
Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
t.integer "pregyrha"
t.integer "pregla"
t.integer "pregghb"
t.integer "pregother"
t.string "ppostcode_full"
t.boolean "is_previous_la_inferred"
t.integer "ppcodenk"
t.string "ppostc1"
t.string "ppostc2"
t.string "prevloc"
t.integer "previous_la_known"
t.integer "hhregres"
t.integer "hhregresstill"
Cldc 1776 sales information sections (#1106) * Mark subsection as completed if it is not displayed in the tasklist and hide it from the UI * Add sale_information section * add sales information subsections * Cldc 1531 staircasing (#1109) * Add staircase field to sales_logs table * Add staircase question and page * add staircase page to the shared ownership scheme subsection fix file name * Cldc 1539 previous bedrooms (#1108) * add frombeds field * Add previous_bedrooms page and question * add Previous Bedrooms page to the shared ownership subsection * Cldc 1532 about staircasing (#1110) * Add stairboughts and stairowned fields to the database * Add about staircasing page and questions * Add about staircasing page to the shared wnership scheme subsection * Add a space before percent * Cldc 1546 monthly rent (#1111) * Add monthly rent column to sales logs table * Add monthly rent question and page * Add monthly rent page to the shared ownership scheme subsection * Cldc 1535 exchange contracts (#1112) * Add exdate to sales logs table * Add exchange date page and question * Add exchange contracts page to the shared ownership subsection * derive exday, exmonth and exyear, tests and lint * rebase tests * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * Cldc 1545 about the deposit (#1113) * feat: add question(s) without depends_on behaviour * feat: separate ids for diff sections * test: update tests * test: add tests * tests: test tweaks * refactor: linting * Cldc 1538 la nominations (#1115) * Add la nominations column to sales logs table * Add La nominations page and questions * Add la nominations to the shared ownership subsection * Add accidentally removed files * feat: add question(s) without depends_on behaviour Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * Cldc 1533 is resale (#1118) * feat: add resale question and page * tests: add new tests * test: update previous tests * refactor: linting * refactor: linting * Cldc 1576 buyer prp (#1117) * Add soctenant field to sales logs * Add buyer previous page and question * Add buyer previous page to shared ownership scheme subsection * rebase migrate * rebase too * Cldc 1540 about price (#1121) * add price fields to the sales logs table * Add about proce questions * add about proce pages * Add about price pages to sale information sections * rebase changes * happy new year * Switch the order of sales log sections * Cldc 1540 fixes (#1130) * Update order of pages and remove wrong id's * Add spacing to the hint text * Cldc 1521 living before purchase (#1129) * feat: add new page and question and update db * test: add and update tests * feat: reset db * Only display from beds for social housing (#1131) * Cldc 1544 mortgage amount (#1136) * feat: add sales log seeds * feat: add question and page and update db * tests: add and update tests * Cldc 1540 fixes part two (#1135) * Change about_price_social_housing to about_price_shared_ownership and display it in all shared ownership cases * Change about_price to purchase_price and display it for outright sale * lint * Move exchange contracts date page (#1143) * feat: PO fix and tests (#1144) * feat: PO fix and tests * feat: simmplification * refactor: linting * feat: copy tweak Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: natdeanlewissoftwire <nat.dean-lewis@softwire.com>
2 years ago
t.integer "proplen"
t.integer "has_mscharge"
t.decimal "mscharge", precision: 10, scale: 2
Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
t.integer "prevten"
t.integer "mortgageused"
t.integer "wchair"
t.integer "income2_value_check"
t.integer "armedforcesspouse"
t.datetime "hodate"
t.integer "hoday"
t.integer "homonth"
t.integer "hoyear"
t.integer "fromprop"
t.integer "socprevten"
t.integer "mortgagelender"
t.string "mortgagelenderother"
t.integer "mortlen"
CLDC-1723 Overhaul letting log owning & managing org questions & tests (#1140) * test: check managing org not gone from answer opts when relationship deleted * feat: add current managing org to answer opts * feat: check if managing org exists before trying to show it * wip * test: improve managing orgs opts test when not support * test: improve managing orgs opts tests when support * test: make relationship deletion test consistent with other tests * test: add "(with hint)" to managing org opts test descriptions * test: refactor managing orgs opts tests for support user case * fix: don't call user in get_answer_label in CYA component * style: reorder instance vars and remove old comments in managing_organisation.rb * refactor: ensure label_from_value always accepts log & nil as args * lint * test: pass in log and user in housing provider opts test for support user * test: update housing provider opts tests for non-support user * feat: update housing provider answer opts to include current HP in db * style: add space after user definition * test: make context definition more human-readable * test: refactor housing providers opts tests (not support user) * test: check housing prov. still selectable after deleting relationship * fix: define log and current_user instance vars in label_from_value (housing prov.) * lint * test: update lettings log feature tests to differentiate between different numbers of stock owners when acting as a data coordinator * test: check owning & managing orgs set correctly when a log is created * test: add line breaks and start context descriptions with and (not if) * test: artificially reference org_rel2 to avoid lint offense * feat: don't set log owning org as user's org if that org doesn't hold stock * test: improve test context descriptions in lettings_log_spec * test: finish overhauling owning and managing org tests in lettings_log_spec * test: change let! to let where possible in spec/features/lettings_log_spec.rb * test: change let! to let where possible in spec/models/form/lettings/questions/managing_organisation_spec.rb * test: change let! to let where possible in spec/models/form/lettings/questions/stock_owner_spec.rb * test: remove if statement from "coordinator user's org doesn't hold stock" managing org test * test: remove if statement from "coordinator user's org does hold stock" no managing orgs managing org test * test: remove if statement from "coordinator user's org does hold stock" >=1 managing orgs managing org test plus refactor previous test * test: explicitly reference org rels in "coordinator user's org doesn't hold stock" managing org test * test: don't create vars inside other vars (for tests edited/created in this branch) * chore: save schema changes after migration Co-authored-by: Phil Lee <asmega@users.noreply.github.com>
2 years ago
t.integer "extrabor"
t.integer "hhmemb"
t.integer "totadult"
t.integer "totchild"
t.integer "hhtype"
t.string "pcode1"
t.string "pcode2"
t.integer "pcodenk"
t.string "postcode_full"
t.boolean "is_la_inferred"
t.bigint "bulk_upload_id"
t.integer "retirement_value_check"
t.integer "hodate_check"
t.integer "extrabor_value_check"
t.integer "deposit_and_mortgage_value_check"
t.integer "shared_ownership_deposit_value_check"
t.integer "grant_value_check"
t.integer "value_value_check"
t.integer "old_persons_shared_ownership_value_check"
t.integer "staircase_bought_value_check"
t.integer "monthly_charges_value_check"
t.integer "details_known_5"
t.integer "details_known_6"
t.integer "saledate_check"
t.integer "prevshared"
t.integer "staircasesale"
t.integer "ethnic_group2"
t.integer "ethnicbuy2"
t.integer "proplen_asked"
t.string "old_id"
t.integer "buy2living"
t.integer "prevtenbuy2"
t.integer "pregblank"
t.string "uprn"
t.integer "uprn_known"
t.integer "uprn_confirmed"
t.string "address_line1"
t.string "address_line2"
t.string "town_or_city"
t.string "county"
t.integer "nationalbuy2"
t.integer "discounted_sale_value_check"
t.integer "student_not_child_value_check"
t.integer "percentage_discount_value_check"
t.integer "combined_income_value_check"
t.integer "buyer_livein_value_check"
t.integer "status_cache", default: 0, null: false
t.datetime "discarded_at"
t.integer "stairowned_value_check"
t.integer "creation_method", default: 1
t.integer "old_form_id"
t.datetime "values_updated_at"
t.bigint "managing_organisation_id"
t.integer "duplicate_set_id"
t.integer "nationality_all"
t.integer "nationality_all_group"
t.integer "nationality_all_buyer2"
t.integer "nationality_all_buyer2_group"
CLDC-2069 Find UPRNs by address (#2278) * feat: mvp commit with address selector from address line 1 and postcode using OS places find endpoint * feat: build out alternative routes through the address lookup flow * refactor: lint * refactor: remove commented lines * feat: make nil safe * feat: test address client * feat: store address input separately * feat: add migration * feat: display inputs in answer label * feat: update data presenter and test * feat: revert precicions schema update * feat: revert precision schema update * feat: migrate new fields to sales logs * feat: update shared log examples tests * feat: use -1 for not listed address for extensibility * feat: add service error to address_selection * feat: handle case when no addresses are found * feat: allow re-entering different uprns * feat: improve error handling and don't accept "no match" precisions * feat: add page tests * feat: confirm uprn on address update * feat: add question tests * feat: don't set minimum match for initial search * feat: mvp commit with address selector from address line 1 and postcode using OS places find endpoint * feat: build out alternative routes through the address lookup flow * refactor: lint * refactor: remove commented lines * feat: make nil safe * feat: test address client * feat: store address input separately * feat: add migration * feat: display inputs in answer label * feat: update data presenter and test * feat: revert precision schema update * feat: migrate new fields to sales logs * feat: update shared log examples tests * feat: use -1 for not listed address for extensibility * feat: add service error to address_selection * feat: handle case when no addresses are found * feat: allow re-entering different uprns * feat: improve error handling and don't accept "no match" precisions * feat: add page tests * feat: confirm uprn on address update * feat: add question tests * feat: don't set minimum match for initial search * feat: add no address found page * feat: allow uprn known to be skipped, and set 0.4 min precision * feat: accept best "good" match in bulk upload * feat: update validations and test * refactor: avoid stubbing using any_instance_of * refactor: use change_table in migrations * feat: add lettings behaviour to sales logs * feat: update sales tests * feat: xit test that is xited in lettings * feat: stub os api in sales row parser * feat: stub os api in sales row parser * feat: add address line 1 to required attributes * feat: update matching details and fix row parser validation * refactor: improve readability * feat: set uprns as option IDs to avoid multiple lookups * feat: add sales uprn_selection * feat: update schema * feat: update tests * feat: remove redundant methods * feat: update error message and fix tests * feat: update tests * feat: update tests and error behaviour * feat: update tests
10 months ago
t.string "address_line1_input"
t.string "postcode_full_input"
t.integer "address_search_value_check"
t.string "uprn_selection"
t.string "address_line1_as_entered"
t.string "address_line2_as_entered"
t.string "town_or_city_as_entered"
t.string "county_as_entered"
t.string "postcode_full_as_entered"
t.string "la_as_entered"
t.integer "partner_under_16_value_check"
t.integer "multiple_partners_value_check"
t.bigint "created_by_id"
t.index ["assigned_to_id"], name: "index_sales_logs_on_assigned_to_id"
t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_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 ["old_id"], name: "index_sales_logs_on_old_id", unique: true
t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id"
t.index ["updated_by_id"], name: "index_sales_logs_on_updated_by_id"
end
create_table "scheme_deactivation_periods", force: :cascade do |t|
t.datetime "deactivation_date"
t.datetime "reactivation_date"
t.bigint "scheme_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["scheme_id"], name: "index_scheme_deactivation_periods_on_scheme_id"
end
Cldc 1227 supported housing index (#648) * Added test file for supported housing schemes * Added factory bot for supported housing schemes * swapped managing agent to org for scheme * created migration for schemes * created model for scheme * added migration to add foreign key to the schemes table * missing spec and log spec for supported housing * fixed failing specs * added schemes migration * next step feature * added route * added controller * added index * added all schemes * correct test for scheme * added view * route alias for schemes * spec for index schemes * failing scheme controller spec * added simple view, scheme seed and authentication * spec for index schemes list * rubocop - thanks * better seed * added Heading to org * added feature flag to hide supported services on prod * added feature flag testing nav items * testing coordinator user can see the link to supported housing * moved toggle to a different place * moved toggle to PrimaryNavigationComponent * testing not being signed in on support pages * testing showing search bar * added search bar * testing subset of schemes for coordinator user * rubocop * failing test for title in page * code to expose title * pagination with tests without searching * partial for schemes * scoping out all but support and coord users * searching schemes code and test * searching via code and org tests * searching by org name tests * searching by org name code * search_by tests * search_by code * search_by woops must search by service * searching schemes feature * tests for data coordinator user * redirect for data coordinator user * testing org schemes for coordiantor user * schemes in org controller for coordiantor user * refactored specs moved into orgs what belongs there * view for org schemes * rubocop * accebility field * accebility field on org page * correct return when on org schemes * passing search test on the orgs page * highlight nav tab * navs helper done * rubocop * fixed failing tests for support user * correct view * how did I manage to delete this file? * checking you cant access schems unathorized * moved test * renamed service name * correct title for sup user schemes org * testing not being able to view any other orgs supported housing for coordinator user * Trigger WF * last fix * aded has many to org for schemes * rubocop Co-authored-by: Ted <ted.booton@madetech.com>
3 years ago
create_table "schemes", force: :cascade do |t|
t.string "service_name"
t.bigint "owning_organisation_id", null: false
Cldc 1227 supported housing index (#648) * Added test file for supported housing schemes * Added factory bot for supported housing schemes * swapped managing agent to org for scheme * created migration for schemes * created model for scheme * added migration to add foreign key to the schemes table * missing spec and log spec for supported housing * fixed failing specs * added schemes migration * next step feature * added route * added controller * added index * added all schemes * correct test for scheme * added view * route alias for schemes * spec for index schemes * failing scheme controller spec * added simple view, scheme seed and authentication * spec for index schemes list * rubocop - thanks * better seed * added Heading to org * added feature flag to hide supported services on prod * added feature flag testing nav items * testing coordinator user can see the link to supported housing * moved toggle to a different place * moved toggle to PrimaryNavigationComponent * testing not being signed in on support pages * testing showing search bar * added search bar * testing subset of schemes for coordinator user * rubocop * failing test for title in page * code to expose title * pagination with tests without searching * partial for schemes * scoping out all but support and coord users * searching schemes code and test * searching via code and org tests * searching by org name tests * searching by org name code * search_by tests * search_by code * search_by woops must search by service * searching schemes feature * tests for data coordinator user * redirect for data coordinator user * testing org schemes for coordiantor user * schemes in org controller for coordiantor user * refactored specs moved into orgs what belongs there * view for org schemes * rubocop * accebility field * accebility field on org page * correct return when on org schemes * passing search test on the orgs page * highlight nav tab * navs helper done * rubocop * fixed failing tests for support user * correct view * how did I manage to delete this file? * checking you cant access schems unathorized * moved test * renamed service name * correct title for sup user schemes org * testing not being able to view any other orgs supported housing for coordinator user * Trigger WF * last fix * aded has many to org for schemes * rubocop Co-authored-by: Ted <ted.booton@madetech.com>
3 years ago
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "primary_client_group"
t.string "secondary_client_group"
t.integer "sensitive"
t.integer "scheme_type"
t.integer "registered_under_care_act"
t.integer "support_type"
t.string "intended_stay"
t.datetime "end_date"
CLDC-1290 Permitted user can create a new scheme (#671) * added test to find link to create a new scheme * added button to create a new scheme * testing arriving to the new scheme form * non exsiting link to controller new action * SPIKEEEE * first page complete * posting to create * refactored scheme to enums * refactored new scheme page to use enums as well * views * SPIKE WIP * SPIKE WIP * SPIKE WIP * drawing list of scheme details * expanded on feature seeing more fields to fill in * expanded on feature seeing more fields to fill in 2nd page * refactored * working back buttons * working flash * more change in wip * default value for org * working spike * some spacing * filling answers * spike finished * correct name for details * testing fill in details * removed gem and further tests * Add has other client group field to schemes. Display it in the check answers. Fix tests and routing * remove details view and path Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com> * WIP change update paths * Implement changing answers (except the details one) * Add details page back for editing scheme details * added missing test for support questions and nested check answers under correct context * checking the back functionality * rubo and lint * checking the back functionality for primary gourp * checking the back functionality for confirm secondary * checking the back functionality for secondary group * checking the back functionality for support answers * checking the back functionality for returning to check answers from details page * checking the back functionality for returning to check answers from primary group page * checking the back functionality for secondary group confirm yes * checking the back functionality for secondary group confirm yes - fixed * checking the back functionality for secondary group * checking the back functionality for secondary group -fixed * checking the back functionality for returning from support page * Do not display secondary client group if the scheme doesn't have one * Add details path to schemes controller update method * Add more tests for back button * Add tests for new controller method * Add tests for creating schemes as data coordinator * fixed schema * added test for missing params when creating scheme * create for support user with or withotu required param * code to get controller render errors when required param is missing * code to implement correct validation * code to implement correct validation - part 2 * highlight missing field * doing silly dance to get correct field highlighted on the error * testing patch for schemes * testing patch for schemes - correct path * small refactoring * testing primary client group update via regular path * testing primary client group update via check answers page * testing confirm secondary group update with YES NO and returning from check answers page * testing updating secondary client group update and returning from check answers page * testing support answers and returning from check answers page * testing details and returning from check answers page * weird path when no names supplied * rubocop * lost in rebasing * started id to code refactoring * model specs remastered * fixed scheme controller specs * further refactorings * fixing feature schemes * final touches * removed code from db * remaining code purged * rubocop * included check for owning org field * checking for stock owning org selection * added stock owning org * added stock owning org on new page * added stock owning org to details * removed total units * managing related schems properly via Org * managing related schems properly via Org - rubocop * small refactoring * small refactoring - 2 * small refactoring - 3 * tests for owned_schemes and managed_schemes * rubocop * added tests for support user creating scheme * rubocop -a * tests for a primary-client-group * tests for a secondary-client-group * tests for a confirm-secondary-client-group * tests for a check-answers * tests for a details * rubocop * redundant action in controller * Trigger WF * switched to int for confirm * flashing test * flashing test for support user * flashing test rubocop Co-authored-by: Kat <katrina@madetech.com> Co-authored-by: baarkerlounger <baarkerlounger@users.noreply.github.com>
3 years ago
t.integer "has_other_client_group"
t.string "arrangement_type"
t.string "old_id"
t.string "old_visible_id"
t.integer "total_units"
t.boolean "confirmed"
t.datetime "startdate"
t.datetime "discarded_at"
t.index ["owning_organisation_id"], name: "index_schemes_on_owning_organisation_id"
Cldc 1227 supported housing index (#648) * Added test file for supported housing schemes * Added factory bot for supported housing schemes * swapped managing agent to org for scheme * created migration for schemes * created model for scheme * added migration to add foreign key to the schemes table * missing spec and log spec for supported housing * fixed failing specs * added schemes migration * next step feature * added route * added controller * added index * added all schemes * correct test for scheme * added view * route alias for schemes * spec for index schemes * failing scheme controller spec * added simple view, scheme seed and authentication * spec for index schemes list * rubocop - thanks * better seed * added Heading to org * added feature flag to hide supported services on prod * added feature flag testing nav items * testing coordinator user can see the link to supported housing * moved toggle to a different place * moved toggle to PrimaryNavigationComponent * testing not being signed in on support pages * testing showing search bar * added search bar * testing subset of schemes for coordinator user * rubocop * failing test for title in page * code to expose title * pagination with tests without searching * partial for schemes * scoping out all but support and coord users * searching schemes code and test * searching via code and org tests * searching by org name tests * searching by org name code * search_by tests * search_by code * search_by woops must search by service * searching schemes feature * tests for data coordinator user * redirect for data coordinator user * testing org schemes for coordiantor user * schemes in org controller for coordiantor user * refactored specs moved into orgs what belongs there * view for org schemes * rubocop * accebility field * accebility field on org page * correct return when on org schemes * passing search test on the orgs page * highlight nav tab * navs helper done * rubocop * fixed failing tests for support user * correct view * how did I manage to delete this file? * checking you cant access schems unathorized * moved test * renamed service name * correct title for sup user schemes org * testing not being able to view any other orgs supported housing for coordinator user * Trigger WF * last fix * aded has many to org for schemes * rubocop Co-authored-by: Ted <ted.booton@madetech.com>
3 years ago
end
create_table "users", force: :cascade do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at", precision: nil
t.datetime "remember_created_at", precision: nil
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "name"
t.bigint "organisation_id"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.integer "role"
t.string "old_user_id"
t.string "phone"
t.integer "failed_attempts", default: 0
t.string "unlock_token"
t.datetime "locked_at"
t.boolean "is_dpo", default: false
t.boolean "is_key_contact", default: false
t.integer "second_factor_attempts_count", default: 0
t.string "encrypted_otp_secret_key"
t.string "encrypted_otp_secret_key_iv"
t.string "encrypted_otp_secret_key_salt"
t.string "direct_otp"
t.datetime "direct_otp_sent_at"
t.datetime "totp_timestamp", precision: nil
t.boolean "active", default: true
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.string "unconfirmed_email"
t.boolean "initial_confirmation_sent"
t.boolean "reactivate_with_organisation"
t.datetime "discarded_at"
t.string "phone_extension"
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["encrypted_otp_secret_key"], name: "index_users_on_encrypted_otp_secret_key", unique: true
t.index ["organisation_id"], name: "index_users_on_organisation_id"
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
end
create_table "versions", force: :cascade do |t|
t.string "item_type", limit: 191, null: false
t.bigint "item_id", null: false
t.string "event", null: false
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
t.text "object_changes"
t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
end
add_foreign_key "lettings_logs", "locations"
add_foreign_key "lettings_logs", "organisations", column: "owning_organisation_id", on_delete: :cascade
add_foreign_key "lettings_logs", "schemes"
add_foreign_key "local_authority_links", "local_authorities"
add_foreign_key "local_authority_links", "local_authorities", column: "linked_local_authority_id"
add_foreign_key "locations", "schemes"
add_foreign_key "organisation_relationships", "organisations", column: "child_organisation_id"
add_foreign_key "organisation_relationships", "organisations", column: "parent_organisation_id"
add_foreign_key "organisations", "organisations", column: "absorbing_organisation_id"
add_foreign_key "sales_logs", "organisations", column: "owning_organisation_id", on_delete: :cascade
add_foreign_key "schemes", "organisations", column: "owning_organisation_id", on_delete: :cascade
add_foreign_key "users", "organisations", on_delete: :cascade
3 years ago
end