File size: 424 Bytes
6fc3143
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Run this in Supabase SQL Editor to manually insert your current user
-- This will sync your existing authenticated user to the public.users table

INSERT INTO public.users (id, email, full_name, avatar_url, credits)
SELECT 
    id, 
    email, 
    raw_user_meta_data->>'full_name', 
    raw_user_meta_data->>'avatar_url', 
    5
FROM auth.users
WHERE id NOT IN (SELECT id FROM public.users)
ON CONFLICT (id) DO NOTHING;