-ActiveRecord::Schema.define(version: 2023_04_01_014214) do +ActiveRecord::Schema.define(version: 2023_04_20_151651) do # These are extensions that must be enabled in order to support this database enable_extension "citext" @@ -239,6 +239,7 @@ 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 ["health_session_id"], name: "index_appointments_on_health_session_id" t.index ["program_referral_id"], name: "index_appointments_on_program_referral_id" t.index ["stream_participant_id"], name: "index_appointments_on_stream_participant_id" end @@ -388,11 +389,14 @@ t.boolean "being_pushed_to_api" t.string "identifier" t.string "preview_url" + t.jsonb "data", default: {}, null: false + t.string "status" t.index ["better_proposal_template_id"], name: "index_better_proposals_on_better_proposal_template_id" t.index ["company_id"], name: "index_better_proposals_on_company_id" t.index ["contact_id"], name: "index_better_proposals_on_contact_id" t.index ["created_by_id"], name: "index_better_proposals_on_created_by_id" t.index ["identifier"], name: "index_better_proposals_on_identifier" + t.index ["status"], name: "index_better_proposals_on_status" end create_table "break_reasons", force: :cascade do |t| @@ -652,6 +656,7 @@ t.integer "primary_organisation_id" t.bigint "employer_status_id" t.string "better_proposal_company_identifier" + t.boolean "unsubscribed_from_bulk_emails", default: false t.index ["account_manager_id"], name: "index_companies_on_account_manager_id" t.index ["activity_status"], name: "index_companies_on_activity_status" t.index ["address_postcode"], name: "index_companies_on_address_postcode" @@ -702,6 +707,9 @@ t.datetime "converted_at" t.bigint "lead_stage_id" t.bigint "lead_sub_stage_id" + t.bigint "created_by_id" + t.datetime "created_by" + t.index ["created_by_id"], name: "index_company_leads_on_created_by_id" t.index ["lead_manager_id"], name: "index_company_leads_on_lead_manager_id" t.index ["lead_stage_id"], name: "index_company_leads_on_lead_stage_id" t.index ["lead_sub_stage_id"], name: "index_company_leads_on_lead_sub_stage_id" @@ -1617,8 +1625,15 @@ t.boolean "provider_transfer", default: false, null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "reason_for_holding" + t.string "reason_for_closing" + t.datetime "on_hold_at" + t.datetime "closed_at" t.bigint "lead_stage_id" t.bigint "lead_sub_stage_id" + t.bigint "created_by_id" + t.datetime "created_by" + t.index ["created_by_id"], name: "index_jobseeker_leads_on_created_by_id" t.index ["lead_manager_id"], name: "index_jobseeker_leads_on_lead_manager_id" t.index ["lead_stage_id"], name: "index_jobseeker_leads_on_lead_stage_id" t.index ["lead_sub_stage_id"], name: "index_jobseeker_leads_on_lead_sub_stage_id" @@ -2043,9 +2058,11 @@ t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false t.string "status", default: "incomplete" + t.bigint "meeting_agenda_template_id" t.index ["company_id"], name: "index_meetings_on_company_id" t.index ["created_by_id"], name: "index_meetings_on_created_by_id" t.index ["deleted_at"], name: "index_meetings_on_deleted_at" + t.index ["meeting_agenda_template_id"], name: "index_meetings_on_meeting_agenda_template_id" end create_table "meetings_users", id: false, force: :cascade do |t| @@ -3012,6 +3029,7 @@ t.boolean "can_email_action_plan", default: false, null: false t.boolean "allied_health_activity_mandatory_delivery_mode", default: false, null: false t.text "jobseeker_suggestion_sms_engagement_body" + t.boolean "comment_mandatory", default: false, null: false end create_table "short_message_replies", id: :serial, force: :cascade do |t| @@ -3609,6 +3627,7 @@ t.string "address_line_1" t.string "address_line_2" t.text "duties" + t.boolean "send_automated_communications", default: true t.index ["company_id"], name: "index_vacancies_on_company_id" t.index ["contact_id"], name: "index_vacancies_on_contact_id" t.index ["employer_campaign_id"], name: "index_vacancies_on_employer_campaign_id" @@ -3918,6 +3937,7 @@ add_foreign_key "company_leads", "lead_sub_stages" add_foreign_key "company_leads", "referral_sources" add_foreign_key "company_leads", "sites" + add_foreign_key "company_leads", "users", column: "created_by_id" 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" @@ -3965,6 +3985,7 @@ add_foreign_key "jobseeker_leads", "lead_stages" add_foreign_key "jobseeker_leads", "lead_sub_stages" add_foreign_key "jobseeker_leads", "referral_sources" + add_foreign_key "jobseeker_leads", "users", column: "created_by_id" add_foreign_key "jobseeker_leads", "users", column: "lead_manager_id" add_foreign_key "jobseeker_portal_privacy_document_consents", "jobseeker_portal_privacy_document_files", column: "privacy_document_file_id" add_foreign_key "jobseeker_portal_privacy_document_consents", "jobseeker_portal_privacy_documents", column: "privacy_document_id" @@ -3980,6 +4001,7 @@ add_foreign_key "lead_sub_stages", "lead_stages" add_foreign_key "line_items", "expenses" add_foreign_key "meetings", "companies" + add_foreign_key "meetings", "meeting_agenda_templates" add_foreign_key "meetings", "users", column: "created_by_id" add_foreign_key "notes", "reminders" add_foreign_key "placements", "job_end_reasons" (END)