-- Nuclear option: Remove all loans migrations
-- This will let Django recreate all migrations in correct order

-- Remove ALL loans migrations
DELETE FROM django_migrations WHERE app = 'loans';

-- Ensure rollover_date column exists
ALTER TABLE rollover_requests 
ADD COLUMN IF NOT EXISTS rollover_date DATE NULL 
COMMENT 'Preferred rollover date';

-- Verify the fix
SELECT 'All loans migrations removed!' as status;
SELECT COUNT(*) as remaining_loans_migrations FROM django_migrations WHERE app = 'loans';
