-ActiveRecord::Schema.define(version: 2021_10_07_002031) do
+ActiveRecord::Schema.define(version: 2021_10_21_040049) do
@@ -513,2 +513,3 @@ create_table "companies", id: :serial, force: :cascade do |t|
t.bigint "company_lead_id"
+ t.string "contact_method"
t.index ["account_manager_id"], name: "index_companies_on_account_manager_id"
@@ -1131,2 +1132,4 @@ create_table "jobseeker_action_plans", force: :cascade do |t|
t.datetime "updated_at", null: false
+ t.datetime "approved_at"
+ t.text "jobseeker_comments"
t.index ["jobseeker_id"], name: "index_jobseeker_action_plans_on_jobseeker_id"
@@ -1136,3 +1139,2 @@ create_table "jobseeker_goals", force: :cascade do |t|
t.bigint "jobseeker_id", null: false
- t.bigint "goal_id", null: false
t.bigint "created_by_id"
@@ -1142,2 +1144,6 @@ create_table "jobseeker_goals", force: :cascade do |t|
t.datetime "updated_at", null: false
+ t.bigint "goal_id", null: false
+ t.text "rejection_reason"
+ t.datetime "rejected_at"
+ t.datetime "approved_at"
t.index ["created_by_id"], name: "index_jobseeker_goals_on_created_by_id"
@@ -1868,2 +1874,10 @@ create_table "queries", force: :cascade do |t|
+ create_table "query_types", force: :cascade do |t|
+ t.string "name", null: false
+ t.string "priority", null: false
+ t.boolean "active", default: true
+ t.bigint "default_note_template_id"
+ t.index ["default_note_template_id"], name: "index_query_types_on_default_note_template_id"
+ end
+
create_table "quest_engine_pdf_templates", force: :cascade do |t|
@@ -2098,3 +2112,3 @@ create_table "reminders", id: :serial, force: :cascade do |t|
t.text "comment"
- t.bigint "goal_id"
+ t.bigint "jobseeker_goal_id"
t.index ["completed_by_id"], name: "index_reminders_on_completed_by_id"
@@ -2102,3 +2116,3 @@ create_table "reminders", id: :serial, force: :cascade do |t|
t.index ["deleted_at"], name: "index_reminders_on_deleted_at"
- t.index ["goal_id"], name: "index_reminders_on_goal_id"
+ t.index ["jobseeker_goal_id"], name: "index_reminders_on_jobseeker_goal_id"
t.index ["remindable_type", "remindable_id"], name: "index_reminders_on_remindable_type_and_remindable_id"
@@ -2941,3 +2955,7 @@ create_table "wage_subsidy_requests", force: :cascade do |t|
t.text "end_reason"
+ t.datetime "cancelled_at"
+ t.bigint "cancelled_by_id"
+ t.text "cancel_reason"
t.index "((id)::text) text_pattern_ops", name: "index_wage_subsidy_requests_on_cast_id_as_text"
+ t.index ["cancelled_by_id"], name: "index_wage_subsidy_requests_on_cancelled_by_id"
t.index ["custom_expense_type_id"], name: "index_wage_subsidy_requests_on_custom_expense_type_id"
@@ -2972,2 +2990,20 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
+ create_table "work_for_doles", force: :cascade do |t|
+ t.bigint "jobseeker_id", null: false
+ t.bigint "site_id", null: false
+ t.boolean "aar_required"
+ t.integer "total_hours_required"
+ t.decimal "completed_hours"
+ t.decimal "tracking_required_hours"
+ t.boolean "aar_on_track"
+ t.date "hours_last_updated"
+ t.boolean "aar_met"
+ t.boolean "aar_currently_commenced"
+ t.boolean "wfd_currently_commenced"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["jobseeker_id"], name: "index_work_for_doles_on_jobseeker_id"
+ t.index ["site_id"], name: "index_work_for_doles_on_site_id"
+ end
+
add_foreign_key "annual_activity_requirements", "jobseekers"
@@ -3050,5 +3086,7 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
add_foreign_key "programs", "smart_forms"
+ add_foreign_key "queries", "users", column: "created_by_id"
+ add_foreign_key "query_types", "note_templates", column: "default_note_template_id"
add_foreign_key "quest_fields_smart_forms", "smart_forms"
add_foreign_key "quest_submission_view_tokens", "quest_submissions"
- add_foreign_key "reminders", "goals"
+ add_foreign_key "reminders", "jobseeker_goals"
add_foreign_key "reminders", "repeats"
@@ -3093,2 +3131,3 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
add_foreign_key "wage_subsidy_requests", "placements"
+ add_foreign_key "wage_subsidy_requests", "users", column: "cancelled_by_id"
add_foreign_key "wage_subsidy_requests", "users", column: "ended_by_id"
@@ -3100,2 +3139,4 @@ create_table "widget_configurations", id: :serial, force: :cascade do |t|
add_foreign_key "widget_configurations", "users"
+ add_foreign_key "work_for_doles", "jobseekers"
+ add_foreign_key "work_for_doles", "sites"
end