-- SQL to check which columns exist in the categories table -- Run this first to confirm what columns are available -- Check table structure SELECT column_name, data_type, is_nullable FROM information_schema.columns WHERE table_schema = 'public' AND table_name = 'categories' ORDER BY ordinal_position; -- Count how many categories exist SELECT COUNT(*) AS total_categories FROM categories; -- Sample a few rows to see current data SELECT id, name, instance_count, created_at, updated_at FROM categories ORDER BY name LIMIT 5;