The error "column "last_seen" does not exist" means your users table is missing required columns. This happens when the database schema wasn't applied completely.
- Go to your Supabase Dashboard
- Click "SQL Editor"
- Copy and paste the contents of
database/fix_users_table.sql - Click "Run"
This will add the missing columns to your existing users table.
- Go to your Supabase Dashboard
- Click "SQL Editor"
- Copy and paste the contents of
database/complete_schema_fix.sql - Click "Run"
This will recreate all tables with the correct structure.
After applying either fix:
-
Restart your dev server:
cd frontend npm run dev -
Test registration:
- Go to http://localhost:5173/register
- Create a new account
- Check your Supabase dashboard → Table Editor →
userstable
- Adds missing columns to existing
userstable - Preserves any existing data
- Safe to run multiple times
- Recreates all tables with correct structure
- Includes all indexes, triggers, and policies
- Ensures everything is properly set up
The fix is working when:
- ✅ No more "column does not exist" errors
- ✅ User registration works without errors
- ✅ Users appear in the
userstable in Supabase - ✅ All required columns are present
- Check the SQL Editor for any error messages
- Make sure you copied the entire file content
- Try the complete reset option if the quick fix doesn't work
- Check your Supabase project permissions
The quick fix should resolve the "last_seen" column error immediately! 🚀