-- =====================================================
-- Remove Paystack Payment Method
-- Run this script to clean up Paystack from your database
-- =====================================================

USE wakatraffic;

-- Remove Paystack from payment_gateways table
DELETE FROM payment_gateways WHERE name = 'Paystack';

-- Remove Paystack from payment_methods table (if it exists)
DELETE FROM payment_methods WHERE code = 'paystack' OR name LIKE '%Paystack%';

-- Remove Paystack settings from site_settings table
DELETE FROM site_settings WHERE setting_key IN ('paystack_public_key', 'paystack_secret_key');

-- Verify removal
SELECT 'Payment Gateways After Cleanup:' as '';
SELECT id, name, type, status FROM payment_gateways ORDER BY display_order;

SELECT '' as '';
SELECT 'Payment Methods After Cleanup:' as '';
SELECT id, name, code, type, is_active FROM payment_methods ORDER BY display_order;

-- Show message
SELECT '✅ Paystack has been removed from the database' as 'Status';
