Upcoming database changes RELEASE 28 October 2022

-ActiveRecord::Schema.define(version: 2022_09_19_035044) do
+ActiveRecord::Schema.define(version: 2022_10_18_074142) do

@@ -229,6 +229,7 @@
     t.string "status"
     t.bigint "cancelled_by_id"
     t.index ["cancelled_by_id"], name: "index_appointments_on_cancelled_by_id"
+    t.index ["consultant_id"], name: "index_appointments_on_consultant_id"
     t.index ["ess_identifier"], name: "index_appointments_on_ess_identifier"
     t.index ["program_referral_id"], name: "index_appointments_on_program_referral_id"
     t.index ["stream_participant_id"], name: "index_appointments_on_stream_participant_id"
@@ -1002,6 +1003,41 @@
     t.datetime "updated_at", null: false
   end

+  create_table "ess_wage_subsidy_agreements", force: :cascade do |t|
+    t.bigint "jobseeker_id", null: false
+    t.bigint "site_id", null: false
+    t.bigint "placement_id", null: false
+    t.bigint "created_by_id"
+    t.bigint "ended_by_id"
:...skipping...
diff --git a/db/schema.rb b/db/schema.rb
index b141bda4a..d1101ebea 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@

-ActiveRecord::Schema.define(version: 2022_09_19_035044) do
+ActiveRecord::Schema.define(version: 2022_10_18_074142) do

@@ -229,6 +229,7 @@
     t.string "status"
     t.bigint "cancelled_by_id"
     t.index ["cancelled_by_id"], name: "index_appointments_on_cancelled_by_id"
+    t.index ["consultant_id"], name: "index_appointments_on_consultant_id"
     t.index ["ess_identifier"], name: "index_appointments_on_ess_identifier"
     t.index ["program_referral_id"], name: "index_appointments_on_program_referral_id"
     t.index ["stream_participant_id"], name: "index_appointments_on_stream_participant_id"
@@ -1002,6 +1003,41 @@
     t.datetime "updated_at", null: false
   end

+  create_table "ess_wage_subsidy_agreements", force: :cascade do |t|
+    t.bigint "jobseeker_id", null: false
+    t.bigint "site_id", null: false
+    t.bigint "placement_id", null: false
+    t.bigint "created_by_id"
+    t.bigint "ended_by_id"
+    t.string "agreement_type"
:...skipping...
diff --git a/db/schema.rb b/db/schema.rb
index b141bda4a..d1101ebea 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@

-ActiveRecord::Schema.define(version: 2022_09_19_035044) do
+ActiveRecord::Schema.define(version: 2022_10_18_074142) do

@@ -229,6 +229,7 @@
     t.string "status"
     t.bigint "cancelled_by_id"
     t.index ["cancelled_by_id"], name: "index_appointments_on_cancelled_by_id"
+    t.index ["consultant_id"], name: "index_appointments_on_consultant_id"
     t.index ["ess_identifier"], name: "index_appointments_on_ess_identifier"
     t.index ["program_referral_id"], name: "index_appointments_on_program_referral_id"
     t.index ["stream_participant_id"], name: "index_appointments_on_stream_participant_id"
@@ -1002,6 +1003,41 @@
     t.datetime "updated_at", null: false
   end

+  create_table "ess_wage_subsidy_agreements", force: :cascade do |t|
+    t.bigint "jobseeker_id", null: false
+    t.bigint "site_id", null: false
+    t.bigint "placement_id", null: false
+    t.bigint "created_by_id"
+    t.bigint "ended_by_id"
+    t.string "agreement_type"
+    t.string "approval_method"
+    t.date "approved_on"
+    t.string "claimed_amount"
+    t.string "eligibility_overridden"
+    t.string "eligibility_type_code"
+    t.string "end_reason_code"
+    t.date "ess_created_on"
+    t.date "ess_ended_on"
+    t.date "first_payment_date"
+    t.string "instalment_schedule_code"
+    t.string "job_ess_identifier"
+    t.date "job_placement_date"
+    t.date "latest_payment_date"
+    t.string "master_agreement_id"
+    t.string "maximum_amount_payable"
+    t.string "payment_count"
+    t.string "remaining_balance"
+    t.string "schedule_agreement_id"
+    t.date "started_on"
+    t.string "status"
+    t.string "vacancy_agreement_eligible"
+    t.index ["created_by_id"], name: "index_ess_wage_subsidy_agreements_on_created_by_id"
+    t.index ["ended_by_id"], name: "index_ess_wage_subsidy_agreements_on_ended_by_id"
+    t.index ["jobseeker_id"], name: "index_ess_wage_subsidy_agreements_on_jobseeker_id"
+    t.index ["placement_id"], name: "index_ess_wage_subsidy_agreements_on_placement_id"
+    t.index ["site_id"], name: "index_ess_wage_subsidy_agreements_on_site_id"
+  end
+
   create_table "events", id: :uuid, default: nil, force: :cascade do |t|
     t.integer "eventable_id"
     t.string "eventable_type"
@@ -1074,6 +1110,8 @@
   create_table "expense_dual_line_limits", force: :cascade do |t|
     t.string "programme", null: false
     t.integer "limit"
+    t.datetime "deleted_at"
+    t.index ["deleted_at"], name: "index_expense_dual_line_limits_on_deleted_at"
   end

   create_table "expense_exports", id: :serial, force: :cascade do |t|
@@ -1316,7 +1354,6 @@

   create_table "health_sessions", force: :cascade do |t|
     t.bigint "site_id"
-    t.bigint "program_id"
     t.integer "created_by_id", null: false
     t.datetime "starts_at", null: false
     t.datetime "ends_at", null: false
@@ -1326,11 +1363,17 @@
     t.datetime "updated_at", null: false
     t.integer "available", default: 1
     t.bigint "repeat_id"
-    t.index ["program_id"], name: "index_health_sessions_on_program_id"
     t.index ["repeat_id"], name: "index_health_sessions_on_repeat_id"
     t.index ["site_id"], name: "index_health_sessions_on_site_id"
   end

+  create_table "health_sessions_programs", id: false, force: :cascade do |t|
+    t.bigint "health_session_id"
+    t.bigint "program_id"
+    t.index ["health_session_id"], name: "index_health_sessions_programs_on_health_session_id"
+    t.index ["program_id"], name: "index_health_sessions_programs_on_program_id"
+  end
+
   create_table "imported_documents", id: :serial, force: :cascade do |t|
     t.string "file"
     t.integer "batch_id"
@@ -1797,6 +1840,17 @@
     t.index ["address_line_1", "address_line_2", "suburb", "postcode"], name: "locations_address_suburb_postcode"
   end

+  create_table "locked_tracking_methods", force: :cascade do |t|
+    t.bigint "placement_id"
+    t.string "placement_outcome_description"
+    t.string "stage", null: false
+    t.string "tracking_method", null: false
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["placement_id"], name: "index_locked_tracking_methods_on_placement_id"
+    t.index ["stage"], name: "index_locked_tracking_methods_on_stage"
+  end
+
   create_table "marketo_access_tokens", force: :cascade do |t|
     t.string "access_token"
     t.string "expires_at"
@@ -1849,6 +1903,7 @@
     t.index ["attachment_id"], name: "index_notes_on_attachment_id"
     t.index ["deleted_at"], name: "index_notes_on_deleted_at"
     t.index ["deprecated_occurred_on"], name: "index_notes_on_deprecated_occurred_on"
+    t.index ["noteable_id", "noteable_type"], name: "index_notes_on_noteable_id_and_noteable_type"
     t.index ["noteable_id"], name: "index_notes_on_noteable_id"
     t.index ["noteable_type"], name: "index_notes_on_noteable_type"
     t.index ["occurred_at"], name: "index_notes_on_occurred_at"
@@ -2065,6 +2120,8 @@
     t.bigint "program_referral_id"
     t.json "expense_type_properties", default: {}
     t.string "previous_system_identifier"
+    t.bigint "appointment_id"
+    t.index ["appointment_id"], name: "index_professional_service_activities_on_appointment_id"
     t.index ["intervention_provided_by_id"], name: "index_indigenous_mentoring_activities_on_user_id"
     t.index ["jobseeker_id"], name: "index_professional_service_activities_on_jobseeker_id"
     t.index ["program_referral_id"], name: "index_professional_service_activities_on_program_referral_id"
@@ -2133,6 +2190,7 @@
     t.datetime "cancelled_at"
     t.text "comments"
     t.string "previous_system_identifier"
+    t.string "activity_id"
     t.index ["approved_by_id"], name: "index_program_referrals_on_approved_by_id"
     t.index ["cancelled_by_id"], name: "index_program_referrals_on_cancelled_by_id"
     t.index ["created_by_id"], name: "index_program_referrals_on_created_by_id"
@@ -2861,7 +2919,7 @@
     t.string "encrypted_imap_password_iv"
     t.string "imap_email"
     t.json "imap_fetch_progress_tracking", default: {}, null: false
-    t.string "smtp_server_type", default: "other"
+    t.string "smtp_server_type", default: "Other"
     t.string "ses_configuration_set"
   end

@@ -3611,6 +3669,11 @@
   add_foreign_key "employment_hours", "placements"
   add_foreign_key "employment_hours", "sites"
   add_foreign_key "employment_property_options", "employment_properties"
+  add_foreign_key "ess_wage_subsidy_agreements", "jobseekers"
+  add_foreign_key "ess_wage_subsidy_agreements", "placements"
+  add_foreign_key "ess_wage_subsidy_agreements", "sites"
+  add_foreign_key "ess_wage_subsidy_agreements", "users", column: "created_by_id"
+  add_foreign_key "ess_wage_subsidy_agreements", "users", column: "ended_by_id"
   add_foreign_key "expense_approvals", "expenses"
   add_foreign_key "expense_credit_cards", "users"
   add_foreign_key "expense_imports", "expense_exports"
@@ -3625,7 +3688,6 @@
   add_foreign_key "expenses", "wage_subsidy_payment_schedules"
   add_foreign_key "filter_bar_configurations", "users"
   add_foreign_key "goals", "goal_types"
-  add_foreign_key "health_sessions", "programs"
   add_foreign_key "health_sessions", "repeats"
   add_foreign_key "health_sessions", "sites"
   add_foreign_key "imported_documents", "batches"
@@ -3664,6 +3726,7 @@
   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 "professional_service_activities", "appointments"
   add_foreign_key "professional_service_activities", "program_referrals"
   add_foreign_key "professional_service_staff", "users"
   add_foreign_key "program_referral_types", "custom_expense_types"
   end

Did you find it helpful? Yes No

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