Upcoming database changes RELEASE 20 June 2024

-ActiveRecord::Schema[7.0].define(version: 2024_04_02_092837) do
+ActiveRecord::Schema[7.0].define(version: 2024_06_04_121909) do
   # These are extensions that must be enabled in order to support this database
   enable_extension "citext"
   enable_extension "hstore"
@@ -30,6 +30,7 @@
     t.string "token", null: false
     t.datetime "created_at", precision: nil
     t.datetime "updated_at", precision: nil
+    t.string "scope"
   end
 
   create_table "action_plan_templates", force: :cascade do |t|
@@ -183,7 +184,7 @@
   create_table "annual_activity_requirements", force: :cascade do |t|
     t.bigint "site_id"
     t.bigint "jobseeker_id"
-    t.integer "activity_id", null: false
+    t.string "activity_id", null: false
     t.integer "activity_referral_sequence_number", null: false
     t.boolean "activity_for_own_org", default: false, null: false
     t.boolean "activity_placement_from_same_org", default: false, null: false
@@ -206,7 +207,15 @@
     t.string "type_code"
     t.datetime "created_at", precision: nil, null: false
     t.datetime "updated_at", precision: nil, null: false
+    t.string "progress_payment_status"
+    t.bigint "progress_payment_id"
+    t.text "justification"
+    t.bigint "created_by_id"
+    t.bigint "placement_id"
+    t.index ["created_by_id"], name: "index_annual_activity_requirements_on_created_by_id"
     t.index ["jobseeker_id"], name: "index_annual_activity_requirements_on_jobseeker_id"
+    t.index ["placement_id"], name: "index_annual_activity_requirements_on_placement_id"
+    t.index ["progress_payment_id"], name: "index_annual_activity_requirements_on_progress_payment_id"
     t.index ["site_id"], name: "index_annual_activity_requirements_on_site_id"
   end
 
@@ -877,7 +886,6 @@
     t.string "search_title"
     t.string "filters"
     t.string "resource_type"
-    t.string "tag"
     t.datetime "deleted_at", precision: nil
     t.string "priority", default: "business_as_usual"
     t.boolean "pin_status", default: false
@@ -887,6 +895,13 @@
     t.index ["resource_type"], name: "index_custom_alerts_on_resource_type"
   end
 
+  create_table "custom_alerts_roles", id: false, force: :cascade do |t|
+    t.bigint "custom_alert_id", null: false
+    t.bigint "role_id", null: false
+    t.index ["custom_alert_id", "role_id"], name: "index_custom_alerts_roles_on_custom_alert_id_and_role_id"
+    t.index ["role_id", "custom_alert_id"], name: "index_custom_alerts_roles_on_role_id_and_custom_alert_id"
+  end
+
   create_table "custom_expense_types", id: :serial, force: :cascade do |t|
     t.string "code", null: false
     t.string "description", null: false
@@ -957,12 +972,28 @@
     t.index ["user_id"], name: "index_document_library_files_on_user_id"
   end
 
+  create_table "elcapitan_feature_groups", force: :cascade do |t|
+    t.string "name"
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["name"], name: "index_elcapitan_feature_groups_on_name", unique: true
+  end
+
+  create_table "elcapitan_feature_groups_roles", id: false, force: :cascade do |t|
+    t.bigint "elcapitan_feature_group_id", null: false
+    t.bigint "role_id", null: false
+    t.index ["elcapitan_feature_group_id", "role_id"], name: "index_efg_roles_on_efg_id_and_role_id"
+    t.index ["role_id", "elcapitan_feature_group_id"], name: "index_efg_roles_on_role_id_and_efg_id"
+  end
+
   create_table "elcapitan_tenant_configurations", id: :serial, force: :cascade do |t|
     t.text "name", null: false
     t.text "value", null: false
     t.datetime "created_at", precision: nil
     t.datetime "updated_at", precision: nil
     t.text "description"
+    t.bigint "elcapitan_feature_group_id"
+    t.index ["elcapitan_feature_group_id"], name: "index_tenant_config_on_feature_group_id"
     t.index ["name"], name: "index_elcapitan_tenant_configurations_on_name", unique: true
   end
 
@@ -1694,6 +1725,8 @@
     t.integer "participation_rate"
     t.boolean "extension"
     t.bigint "site_id"
+    t.boolean "gp_approved", default: false
+    t.boolean "final_report_approved", default: false
     t.index ["case_number"], name: "index_jobseeker_decisions_on_case_number"
     t.index ["site_id"], name: "index_jobseeker_decisions_on_site_id"
     t.index ["stream_participant_id"], name: "index_jobseeker_decisions_on_stream_participant_id"
@@ -2504,6 +2537,8 @@
     t.string "basic_rate_name"
     t.integer "basic_rate_base"
     t.date "dhs_cycle_date"
+    t.string "organisation_name"
+    t.string "organisation_number"
     t.index ["additional_ess_data"], name: "index_placements_on_additional_ess_data", using: :gin
     t.index ["centrelink_outcome_started_on"], name: "index_placements_on_centrelink_outcome_started_on"
     t.index ["completion_expected_updated_by_id"], name: "index_placements_on_completion_expected_updated_by_id"
@@ -2720,6 +2755,32 @@
     t.index ["smart_form_id"], name: "index_programs_on_smart_form_id"
   end
 
+  create_table "progress_payment_eligibility_settings", force: :cascade do |t|
+    t.string "activity_type_code", null: false
+    t.string "activity_type_description"
+    t.string "activity_sub_type_code"
+    t.string "activity_sub_type_description"
+    t.boolean "eligible", default: false
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.index ["activity_type_code", "activity_sub_type_code"], name: "index_progress_payment_eligibility_settings_type", unique: true
+  end
+
+  create_table "progress_payments", force: :cascade do |t|
+    t.bigint "jobseeker_id", null: false
+    t.date "start_date", null: false
+    t.string "status", default: "no_progress"
+    t.string "likelihood", default: "low"
+    t.bigint "claim_id"
+    t.date "service_commenced_on", null: false
+    t.datetime "created_at", null: false
+    t.datetime "updated_at", null: false
+    t.bigint "submitted_by_id"
+    t.index ["claim_id"], name: "index_progress_payments_on_claim_id"
+    t.index ["jobseeker_id"], name: "index_progress_payments_on_jobseeker_id"
+    t.index ["submitted_by_id"], name: "index_progress_payments_on_submitted_by_id"
+  end
+
   create_table "provider_ratings", id: :serial, force: :cascade do |t|
     t.integer "jobseeker_id", null: false
     t.integer "value"
@@ -3411,6 +3472,9 @@
     t.string "locale", default: "en"
     t.string "country_code", default: "AU"
     t.text "default_email_signature"
+    t.string "calendar_policy_active_days", default: [], array: true
+    t.time "calendar_policy_start_time"
+    t.time "calendar_policy_end_time"
   end
 
   create_table "short_message_replies", id: :serial, force: :cascade do |t|
@@ -3675,8 +3739,10 @@
     t.string "programme"
     t.jsonb "additional_ess_data", default: {}, null: false
     t.bigint "customer_coordinator_id"
+    t.bigint "current_decision_id"
     t.index ["additional_ess_data"], name: "index_stream_participants_on_additional_ess_data", using: :gin
     t.index ["commenced_on"], name: "index_stream_participants_on_commenced_on"
+    t.index ["current_decision_id"], name: "index_stream_participants_on_current_decision_id"
     t.index ["customer_coordinator_id"], name: "index_stream_participants_on_customer_coordinator_id"
     t.index ["deleted_at"], name: "index_stream_participants_on_deleted_at"
     t.index ["jobseeker_id"], name: "index_stream_participants_on_jobseeker_id"
@@ -3855,7 +3921,7 @@
   end
 
   create_table "users", id: :serial, force: :cascade do |t|
-    t.citext "email", default: "", null: false
+    t.citext "email"
     t.datetime "remember_created_at", precision: nil
     t.string "uid", default: "", null: false
     t.string "avatar_url"
@@ -4360,7 +4426,9 @@
 
   add_foreign_key "abn_verifications", "companies"
   add_foreign_key "annual_activity_requirements", "jobseekers"
+  add_foreign_key "annual_activity_requirements", "placements"
   add_foreign_key "annual_activity_requirements", "sites"
+  add_foreign_key "annual_activity_requirements", "users", column: "created_by_id"
   add_foreign_key "appointments", "health_sessions"
   add_foreign_key "appointments", "program_referrals"
   add_foreign_key "appointments", "users", column: "cancelled_by_id"
@@ -4388,6 +4456,7 @@
   add_foreign_key "company_leads", "users", column: "lead_manager_id"
   add_foreign_key "contacts", "users", column: "created_by_id"
   add_foreign_key "cortex_rails_organisations", "cortex_rails_api_configs", column: "api_config_id"
+  add_foreign_key "elcapitan_tenant_configurations", "elcapitan_feature_groups"
   add_foreign_key "email_events", "emails"
   add_foreign_key "emails", "reminders"
   add_foreign_key "employer_campaigns", "companies"
@@ -4484,6 +4553,7 @@
   add_foreign_key "programs", "program_referral_types"
   add_foreign_key "programs", "sites"
   add_foreign_key "programs", "smart_forms"
+  add_foreign_key "progress_payments", "jobseekers"
   add_foreign_key "provider_tags", "jobseekers"
   add_foreign_key "provider_tags", "provider_tag_categories"
   add_foreign_key "provider_tags", "provider_tag_descriptions"

Did you find it helpful? Yes No

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