-ActiveRecord::Schema.define(version: 2023_03_01_034120) do +ActiveRecord::Schema.define(version: 2023_03_22_040344) do @@ -20,2 +20,10 @@ + create_table "abn_verifications", force: :cascade do |t| + t.bigint "company_id", null: false + t.string "business_name" + t.string "status" + t.date "verified_at" + t.index ["company_id"], name: "index_abn_verifications_on_company_id" + end + create_table "access_tokens", id: :serial, force: :cascade do |t| @@ -379,2 +387,5 @@ create_table "better_proposals", force: :cascade do |t| t.datetime "updated_at", precision: 6, null: false + t.boolean "being_pushed_to_api" + t.string "identifier" + t.string "preview_url" t.index ["better_proposal_template_id"], name: "index_better_proposals_on_better_proposal_template_id" @@ -383,2 +394,3 @@ create_table "better_proposals", force: :cascade do |t| t.index ["created_by_id"], name: "index_better_proposals_on_created_by_id" + t.index ["identifier"], name: "index_better_proposals_on_identifier" end @@ -641,2 +653,3 @@ create_table "companies", id: :serial, force: :cascade do |t| t.bigint "employer_status_id" + t.string "better_proposal_company_identifier" t.index ["account_manager_id"], name: "index_companies_on_account_manager_id" @@ -756,2 +769,8 @@ create_table "contacts_jobseeker_portal_privacy_document_consents", id: false, f + create_table "contacts_meetings", id: false, force: :cascade do |t| + t.bigint "contact_id", null: false + t.bigint "meeting_id", null: false + t.index ["meeting_id", "contact_id"], name: "index_contacts_meetings_on_meeting_id_and_contact_id", unique: true + end + create_table "cortex_rails_api_configs", id: :serial, force: :cascade do |t| @@ -797,5 +816,5 @@ create_table "custom_alerts", force: :cascade do |t| t.boolean "pin_status", default: false - t.index ["priority"], name: "index_custom_alerts_on_priority" t.index ["deleted_at"], name: "index_custom_alerts_on_deleted_at" t.index ["pin_status"], name: "index_custom_alerts_on_pin_status" + t.index ["priority"], name: "index_custom_alerts_on_priority" t.index ["resource_type"], name: "index_custom_alerts_on_resource_type" @@ -1850,2 +1869,10 @@ create_table "kpis", force: :cascade do |t| + create_table "lead_stages", force: :cascade do |t| + t.string "name", null: false + t.boolean "active", default: true, null: false + t.text "lead_stage_types", default: [], array: true + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + end + create_table "lead_sub_sources", force: :cascade do |t| @@ -1859,2 +1886,11 @@ create_table "lead_sub_sources", force: :cascade do |t| + create_table "lead_sub_stages", force: :cascade do |t| + t.string "name", null: false + t.bigint "lead_stage_id" + t.boolean "active", default: true, null: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["lead_stage_id"], name: "index_lead_sub_stages_on_lead_stage_id" + end + create_table "letters_letter_heads", id: :serial, force: :cascade do |t| @@ -1969,2 +2005,33 @@ create_table "marketo_field_maps", force: :cascade do |t| + create_table "meeting_agenda_templates", force: :cascade do |t| + t.string "name", null: false + t.text "agenda_details", null: false + t.datetime "deleted_at" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["deleted_at"], name: "index_meeting_agenda_templates_on_deleted_at" + end + + create_table "meetings", force: :cascade do |t| + t.bigint "company_id" + t.bigint "created_by_id" + t.text "title", null: false + t.text "location" + t.datetime "starts_at", null: false + t.datetime "ends_at", null: false + t.text "agenda_details" + t.datetime "deleted_at" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + 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" + end + + create_table "meetings_users", id: false, force: :cascade do |t| + t.bigint "user_id", null: false + t.bigint "meeting_id", null: false + t.index ["meeting_id", "user_id"], name: "index_meetings_users_on_meeting_id_and_user_id", unique: true + end + create_table "note_templates", id: :serial, force: :cascade do |t| @@ -2502,2 +2569,3 @@ create_table "quest_forms", id: :uuid, default: -> { "uuid_generate_v4()" }, for t.string "type", null: false + t.boolean "save_as_draft", default: false t.index ["deleted_at"], name: "index_quest_forms_on_deleted_at" @@ -2683,2 +2751,30 @@ create_table "regions", id: :serial, force: :cascade do |t| + create_table "reminder_schedules", force: :cascade do |t| + t.string "name", null: false + t.boolean "active", default: true, null: false + t.datetime "deleted_at" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["deleted_at"], name: "index_reminder_schedules_on_deleted_at" + end + + create_table "reminder_schedules_templates", id: false, force: :cascade do |t| + t.bigint "reminder_schedule_id" + t.bigint "reminder_template_id" + t.index ["reminder_schedule_id"], name: "index_reminder_schedules_templates_on_reminder_schedule_id" + t.index ["reminder_template_id"], name: "index_reminder_schedules_templates_on_reminder_template_id" + end + + create_table "reminder_templates", force: :cascade do |t| + t.text "description", null: false + t.integer "assigned_to_id" + t.integer "number_of_days_after_creation_due", null: false + t.text "tags", default: [], array: true + t.text "comments" + t.datetime "deleted_at" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["deleted_at"], name: "index_reminder_templates_on_deleted_at" + end + create_table "reminders", id: :serial, force: :cascade do |t| @@ -3661,3 +3757,5 @@ create_table "wage_subsidy_payment_schedules", force: :cascade do |t| t.string "previous_system_identifier" + t.bigint "created_by_id" t.index ["contact_id"], name: "index_wage_subsidy_payment_schedules_on_contact_id" + t.index ["created_by_id"], name: "index_wage_subsidy_payment_schedules_on_created_by_id" t.index ["wage_subsidy_payment_schedule_template_id"], name: "index_ws_payment_schedules_on_ws_payment_schedule_template_id" @@ -3776,2 +3874,3 @@ create_table "work_for_doles", force: :cascade do |t| + add_foreign_key "abn_verifications", "companies" add_foreign_key "annual_activity_requirements", "jobseekers" @@ -3855,3 +3954,6 @@ create_table "work_for_doles", force: :cascade do |t| add_foreign_key "lead_sub_sources", "referral_sources" + add_foreign_key "lead_sub_stages", "lead_stages" add_foreign_key "line_items", "expenses" + add_foreign_key "meetings", "companies" + add_foreign_key "meetings", "users", column: "created_by_id" add_foreign_key "notes", "reminders" @@ -3935,2 +4037,3 @@ create_table "work_for_doles", force: :cascade do |t| add_foreign_key "wage_subsidy_payment_schedules", "contacts" + add_foreign_key "wage_subsidy_payment_schedules", "users", column: "created_by_id" add_foreign_key "wage_subsidy_payment_schedules", "wage_subsidy_payment_schedule_templates" end