[Solved] How to see a supabase with references to authUsers.id?

I have a supabase postgres and I'm trying to seed a table (permissions) with a foreign key to the drizzle-orm/supabase authUsers table. Here's what I'm getting when I try to seed permissions:
Error: Column 'userId' has not null contraint,
and you didn't specify a table for foreign key on column 'userId' in 'permissions' table.
Error: Column 'userId' has not null contraint,
and you didn't specify a table for foreign key on column 'userId' in 'permissions' table.
1 Reply
playsonmac
playsonmacOP4w ago
You need to inlcude authUsers import { authUsers } from "drizzle-orm/supabase" in the seed schema which allows you to seed users as well

Did you find this page helpful?