-- Migration 0042: Drop command-center RPCs and founder_pain_log -- -- The /admin/command-center page is being removed (see commit message). -- All objects it depended on are also dropped: -- - get_platform_command_center_metrics (JSONB-returning RPC) -- - get_platform_activity_feed (TABLE-returning RPC) -- - get_brand_health_snapshot (TABLE-returning RPC) -- - founder_pain_log (table) -- - founder_pain_log_platform (view, joins brand name onto founder_pain_log) -- -- The platform_admin role has no other consumer of these objects. The -- cross-brand KPIs and activity feed that the page showed are reachable -- per-brand via /admin, /admin/orders, /admin/stops, and /admin/reports. DROP VIEW IF EXISTS founder_pain_log_platform; DROP FUNCTION IF EXISTS get_brand_health_snapshot(); DROP FUNCTION IF EXISTS get_platform_activity_feed(); DROP FUNCTION IF EXISTS get_platform_command_center_metrics(); DROP TABLE IF EXISTS founder_pain_log;