Upcoming database changes RELEASE 20 November 2024

-ActiveRecord::Schema[7.1].define(version: 2024_10_01_051723) do
-
+ActiveRecord::Schema[7.1].define(version: 2024_11_13_234419) do
   # These are extensions that must be enabled in order to support this database
   enable_extension "plpgsql"
 
@@ -4346,6 +4345,117 @@ ActiveRecord::Schema[7.1].define(version: 2024_10_01_051723) do
     t.index ["participant_id", "master_agreement_id", "schedule_agreement_id"], name: "sub533_composite_key"
   end
 
+  create_table "sub590s", force: :cascade do |t|
+    t.string "extract_date"
+    t.string "org_code"
+    t.string "org_name"
+    t.string "region_code"
+    t.string "region_name"
+    t.string "site_code"
+    t.string "site_name"
+    t.string "contract_id"
+    t.string "participant_id"
+    t.string "crn"
+    t.string "first_given_name"
+    t.string "second_given_name"
+    t.string "family_name"
+    t.string "preferred_name"
+    t.string "participant_pronoun"
+    t.string "gender"
+    t.string "date_of_birth"
+    t.string "country_of_birth"
+    t.string "age_at_extract"
+    t.string "age_of_youngest_child"
+    t.string "ajs_mygov_linked"
+    t.string "ajs_mygov_linked_date"
+    t.string "contract_referral_status"
+    t.string "contract_referral_id"
+    t.string "contract_referral_start_date"
+    t.string "contract_referral_placement_id"
+    t.string "creation_method_code"
+    t.string "referral_source"
+    t.string "period_of_service"
+    t.string "placement_date"
+    t.string "placement_status"
+    t.string "commencement_date"
+    t.string "placement_end_date"
+    t.string "end_date"
+    t.string "end_reason"
+    t.string "parent_snapshot_date"
+    t.string "parent_snapshot_status"
+    t.string "goal_plan_date"
+    t.string "goal_plan_status"
+    t.string "number_of_activities"
+    t.string "allowance_type_code"
+    t.string "pause_reason_code"
+    t.string "pause_reason_desc"
+    t.string "pause_actual_start_date"
+    t.string "pause_expected_end_date"
+    t.string "pause_actual_end_date"
+    t.string "first_nations_flag"
+    t.string "cald_flag"
+    t.string "refugee_flag"
+    t.string "pwd_flag"
+    t.string "mental_illness_flag"
+    t.string "homeless_flag"
+    t.string "ex_offender_flag"
+    t.string "drug_alcohol_flag"
+    t.string "esl_flag"
+    t.string "highest_edu_attained"
+    t.string "relationship_status"
+    t.string "single_parent_flag"
+    t.string "mature_age_flag"
+    t.string "carer_type"
+    t.string "primary_parent_carer_flag"
+    t.string "com_aid_req_type"
+    t.string "interpreter_lang_code"
+    t.string "interpreter_lang_desc"
+    t.string "concurrent_referral"
+    t.string "cta_eligible"
+    t.string "est_eligible"
+    t.string "sea_flag"
+    t.string "see_flag"
+    t.string "ttw_flag"
+    t.string "wage_eligibility_type"
+    t.string "wage_subsidy_flag"
+    t.string "postal_address"
+    t.string "postal_suburb"
+    t.string "postal_state"
+    t.string "postal_postcode"
+    t.string "residential_address"
+    t.string "residential_suburb"
+    t.string "residential_state"
+    t.string "residential_postcode"
+    t.string "preferred_contact_method"
+    t.string "home_phone_no"
+    t.string "mobile_phone_no"
+    t.string "email_address"
+    t.string "managed_by"
+    t.string "client_note"
+    t.string "group_by"
+    t.string "special_requirements"
+    t.string "initial_callback"
+    t.string "last_appointment_type"
+    t.string "last_appointment_reason"
+    t.string "last_appointment_date"
+    t.string "last_appointment_mentor"
+    t.string "last_appointment_result"
+    t.string "next_appointment_type"
+    t.string "next_appointment_reason"
+    t.string "next_appointment_date"
+    t.string "next_appointment_mentor"
+    t.string "checksum"
+    t.string "bdf_status", default: "pending", null: false
+    t.string "sync_error"
+    t.datetime "sync_errored_at"
+    t.datetime "created_at", default: -> { "now()" }, null: false
+    t.datetime "updated_at", default: -> { "now()" }, null: false
+    t.text "transitioning_programmes", default: [], array: true
+    t.index ["bdf_status"], name: "index_sub590s_on_bdf_status"
+    t.index ["contract_referral_start_date"], name: "index_sub590s_on_contract_referral_start_date"
+    t.index ["participant_id"], name: "index_sub590s_on_participant_id"
+  end
+
   create_table "tenants", force: :cascade do |t|
     t.string "name", null: false
     t.string "domain", null: false




-ActiveRecord::Schema[7.0].define(version: 2024_10_25_095358) do
+ActiveRecord::Schema[7.0].define(version: 2024_11_13_073245) do
   # These are extensions that must be enabled in order to support this database
   enable_extension "citext"
   enable_extension "hstore"
@@ -918,11 +918,19 @@
     t.boolean "claimable", default: false, null: false
     t.boolean "second_approval_required", default: false
     t.datetime "deleted_at", precision: nil
+    t.boolean "prezzee", default: false
     t.index ["code"], name: "index_custom_expense_types_on_code"
     t.index ["deleted_at"], name: "index_custom_expense_types_on_deleted_at"
     t.index ["employment_fund"], name: "index_custom_expense_types_on_employment_fund"
   end
 
+  create_table "custom_expense_types_prezzee_gift_card_denominations", id: false, force: :cascade do |t|
+    t.bigint "custom_expense_type_id", null: false
+    t.bigint "prezzee_gift_card_denomination_id", null: false
+    t.index ["custom_expense_type_id", "prezzee_gift_card_denomination_id"], name: "index_custom_expense_types_prezzee_gift_card_denominations_ids"
+    t.index ["prezzee_gift_card_denomination_id", "custom_expense_type_id"], name: "index_prezzee_gift_card_denominations_custom_expense_types_ids"
+  end
+
   create_table "decision_interruption_reasons", force: :cascade do |t|
     t.text "name", null: false
     t.datetime "deleted_at"
@@ -1272,9 +1280,13 @@
     t.text "tags", default: [], array: true
     t.integer "group_event_schedule_id"
     t.uuid "quest_form_id"
+    t.boolean "remind_by_sms", default: false
+    t.datetime "remind_at", precision: nil
+    t.bigint "reminder_sms_template_id"
     t.index ["event_calendar_id"], name: "idst_id_idx"
     t.index ["jobseeker_id"], name: "index_event_calendar_schedules_on_jobseeker_id"
     t.index ["quest_form_id"], name: "index_event_calendar_schedules_on_quest_form_id"
+    t.index ["reminder_sms_template_id"], name: "index_event_calendar_schedules_on_reminder_sms_template_id"
     t.index ["schedule_event_id"], name: "index_event_calendar_schedules_on_schedule_event_id"
     t.index ["schedule_location_id"], name: "index_event_calendar_schedules_on_schedule_location_id"
     t.index ["stream_participant_id"], name: "index_event_calendar_schedules_on_stream_participant_id"
@@ -1502,6 +1514,8 @@
     t.integer "finance_status_id", default: 2, null: false
     t.string "payment_id"
     t.boolean "linked", default: false
+    t.boolean "prezzee", default: false
+    t.string "sub_status"
     t.index ["approver_id"], name: "index_expenses_on_approver_id"
     t.index ["bank_transaction_id"], name: "index_expenses_on_bank_transaction_id"
     t.index ["expense_payment_type_id"], name: "index_expenses_on_expense_payment_type_id"
@@ -1518,6 +1532,13 @@
     t.index ["wage_subsidy_payment_schedule_id"], name: "index_expenses_on_wage_subsidy_payment_schedule_id"
   end
 
+  create_table "expenses_prezzee_gift_card_denominations", id: false, force: :cascade do |t|
+    t.bigint "expense_id", null: false
+    t.bigint "prezzee_gift_card_denomination_id", null: false
+    t.index ["expense_id", "prezzee_gift_card_denomination_id"], name: "index_expenses_prezzee_gift_card_denominations_on_ids"
+    t.index ["prezzee_gift_card_denomination_id", "expense_id"], name: "index_prezzee_gift_card_denominations_expenses_on_ids"
+  end
+
   create_table "exportling_exports", id: :serial, force: :cascade do |t|
     t.integer "owner_id"
     t.string "klass", null: false
@@ -2667,6 +2688,52 @@
     t.index ["type"], name: "index_pps_records_on_type"
   end
 
+  create_table "prezzee_gift_card_denominations", force: :cascade do |t|
+    t.integer "amount"
+    t.string "currency"
+    t.integer "price"
+    t.string "price_currency"
+    t.string "stock_level"
+    t.boolean "available", default: false
+    t.bigint "prezzee_gift_card_id", null: false
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["prezzee_gift_card_id"], name: "index_prezzee_gift_card_denominations_on_prezzee_gift_card_id"
+  end
+
+  create_table "prezzee_gift_cards", force: :cascade do |t|
+    t.string "name"
+    t.string "code"
+    t.jsonb "json_data"
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+  end
+
+  create_table "prezzee_order_items", force: :cascade do |t|
+    t.string "reference"
+    t.string "product_code"
+    t.integer "amount"
+    t.jsonb "json_data"
+    t.bigint "prezzee_order_id", null: false
+    t.bigint "prezzee_gift_card_denomination_id", null: false
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["prezzee_gift_card_denomination_id"], name: "index_prezzee_order_items_on_prezzee_gift_card_denomination_id"
+    t.index ["prezzee_order_id"], name: "index_prezzee_order_items_on_prezzee_order_id"
+  end
+
+  create_table "prezzee_orders", force: :cascade do |t|
+    t.string "order_uuid"
+    t.string "reference"
+    t.string "status"
+    t.integer "amount"
+    t.jsonb "json_data"
+    t.bigint "expense_id", null: false
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["expense_id"], name: "index_prezzee_orders_on_expense_id"
+  end
+
   create_table "professional_service_activities", id: :serial, force: :cascade do |t|
     t.integer "jobseeker_id", null: false
     t.integer "intervention_provided_by_id", null: false
@@ -4501,6 +4568,7 @@
   add_foreign_key "ess_wage_subsidy_agreements", "users", column: "ended_by_id"
   add_foreign_key "event_calendar_schedules", "event_calendars"
   add_foreign_key "event_calendar_schedules", "quest_forms"
+  add_foreign_key "event_calendar_schedules", "sms_templates", column: "reminder_sms_template_id"
   add_foreign_key "expense_approvals", "expenses"
   add_foreign_key "expense_credit_cards", "users"
   add_foreign_key "expense_imports", "expense_exports"
@@ -4572,6 +4640,10 @@
   add_foreign_key "placements", "users", column: "pps_managed_by_id"
   add_foreign_key "placements", "users", column: "pps_updated_by_id"
   add_foreign_key "pps_records", "placements"
+  add_foreign_key "prezzee_gift_card_denominations", "prezzee_gift_cards"
+  add_foreign_key "prezzee_order_items", "prezzee_gift_card_denominations"
+  add_foreign_key "prezzee_order_items", "prezzee_orders"
+  add_foreign_key "prezzee_orders", "expenses"
   add_foreign_key "professional_service_activities", "appointments"
   add_foreign_key "professional_service_activities", "program_referrals"
   add_foreign_key "professional_service_staff", "users"

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.