-- Update cbill table to allow duplicate bill numbers across financial years
-- Remove UNIQUE constraint from bl_no column

-- First, drop the existing UNIQUE key
ALTER TABLE `cbill` DROP INDEX `bl_no`;

-- Add a regular index (non-unique) for performance
ALTER TABLE `cbill` ADD INDEX `idx_bl_no` (`bl_no`);

-- Optional: Add composite unique index if you want unique bill_no per financial year
-- This requires adding financial year columns to track, or you can skip this step
-- ALTER TABLE `cbill` ADD UNIQUE KEY `unique_bill_per_fy` (`bl_no`, `bl_year`, `bl_month`);
