-- ============================================================================
-- Drop eDNC Special Character Fix Tables and Data
-- Run on PRODUCTION to remove deprecated eDNC tracking
-- Created: 2025-12-12
-- ============================================================================

-- Remove view first (depends on table)
DROP VIEW IF EXISTS vw_ednclogs;

-- Remove log table
DROP TABLE IF EXISTS ednclogs;

-- Remove installation tracking records
DELETE FROM installedapps WHERE appid = 79;

-- Remove application definition
DELETE FROM applications WHERE appid = 79;

-- Verify cleanup
SELECT 'Cleanup complete. Verify tables removed:' AS status;
SHOW TABLES LIKE '%ednc%';
SELECT COUNT(*) AS remaining_installedapps FROM installedapps WHERE appid = 79;
SELECT COUNT(*) AS remaining_applications FROM applications WHERE appid = 79;
