-- Migration: Add priority and assigned_couriers columns to courier_partner table
-- Date: 2026-02-14
-- Purpose: Add priority system and multi-select courier assignment

ALTER TABLE `tbl_courier_partner` ADD COLUMN `priority` INT(11) DEFAULT NULL COMMENT 'Priority order: 1=DelhiVert, 2=Secondary, 3=Tertiary' AFTER `preference_order`;

ALTER TABLE `tbl_courier_partner` ADD COLUMN `assigned_couriers` LONGTEXT DEFAULT NULL COMMENT 'JSON array of assigned courier partner IDs' AFTER `priority`;

-- Add index for priority
ALTER TABLE `tbl_courier_partner` ADD KEY `idx_priority` (`priority`);
