Special Walk Admin

Helpdesk — Database Setup

Creates the 3 helpdesk tables and seeds default categories. Safe to re-run (idempotent).

Tables & Steps
  • 1 helpdesk_categories_tbl
    Ticket categories — name, color, icon, sort_order, is_active
  • 2 helpdesk_tickets_tbl
    Support tickets — subject, description, priority, status, source, user info, provider_id (links to providers_tbl), assigned_team_id (links to providers_team_tbl), response & resolution timestamps
    idx_provider idx_assignee idx_status idx_priority idx_category idx_updated
  • 3 helpdesk_messages_tbl
    Conversation thread — user replies, team replies, internal notes (is_internal), system events; sender_type: user / team / system
  • 4 Migration — add missing indexes
    Checks existing tables and adds any indexes not yet present. Safe to re-run — skips indexes that already exist.
  • 5 Seed default categories
    Inserts 8 standard categories only if the table is empty: Order Issues, Payment & Billing, Service Issues, Shipping & Delivery, Refunds & Returns, Account & Login, General Inquiry, Technical Support.