lexixon
DTDrizzle Team
•Created by lexixon on 1/19/2024 in #help
Order of migration files
Drizzle-kit generates migration files which stay in order based on its naming pattern
<xxxx_name.sql>
Supabase, e.g. when using supabase db pull
(to ensure production/local development setup is in sync) creates migration files naming them like <timestamp>_name.sql
This leaves us with a local list like:
This can cause problems when migrating because the order isn't correct. Is there a common approach to that, or how to make drizzle and supabase work in harmony?1 replies
DTDrizzle Team
•Created by lexixon on 1/14/2024 in #help
Common ways to reference and work with the `user_id` when managed by Supabase
As far as I understood, it's a valid approach to keep user management and its related auth schemas the way Supabase provides it out of the box.
All my custom tables, and their schema, have been created/managed by drizzle.
I created a local
users
table so I can reference it in my relations for joint queries, e.g. in toolsToQualitiesToUsersRelations
.
But when I migrate, it doesn't work; either I include the local users
table in my migration - which I don't want -, or it throws an error if I do not include it.
How can I make it work AND/OR what's the adviced approach to work in harmony with Supabase and its user management?16 replies
DTDrizzle Team
•Created by lexixon on 1/5/2024 in #help
RLS and Policies
I'm working with supabase and I wonder if, by now, there's a way to enable RLS and include some policies when creating/migrating tables. Is there? What's the currently recommended approach for my setup?
2 replies