-- Add sort_order column to categories for controlling display order in the order wizard
ALTER TABLE public.categories ADD COLUMN IF NOT EXISTS sort_order INTEGER DEFAULT 0 NOT NULL;

-- Index for efficient ordering
CREATE INDEX IF NOT EXISTS idx_categories_sort_order ON public.categories(sort_order);
