A third party ATProto appview
1-- Clean up empty avatar URLs in lists table
2-- This fixes the "Output/list/avatar must be a uri" validation error
3
4UPDATE lists
5SET avatar_url = NULL
6WHERE avatar_url = '' OR avatar_url = 'undefined' OR avatar_url = 'null';
7
8-- Verify the fix
9SELECT COUNT(*) as fixed_count
10FROM lists
11WHERE avatar_url IS NULL;
12
13SELECT COUNT(*) as remaining_invalid
14FROM lists
15WHERE avatar_url = '' OR avatar_url = 'undefined' OR avatar_url = 'null';