-- Migration: Suspend all currently expired accounts
-- Date: 2025-11-26
-- Description: One-time script to suspend accounts with expired packages

UPDATE users 
SET status = 'suspended' 
WHERE package_expires_at IS NOT NULL 
  AND package_expires_at < NOW() 
  AND status = 'active';

-- Show results
SELECT 
    id, 
    email, 
    package_expires_at, 
    status 
FROM users 
WHERE package_expires_at IS NOT NULL 
  AND package_expires_at < NOW()
ORDER BY package_expires_at DESC;

