Share

One-line Lovable prompt that adds RLS to every table

Open · 8 views · asked by noor_builds · edited

Lovable makes tables without RLS. Run this once per project, then check with the 'tables without RLS' snippet from this forum.

Prompt
Copied 8 times
For every table in the public schema that has a user_id or owner_id column: enable Row Level Security and add policies so a signed-in user can only select, insert, update and delete rows where that column equals auth.uid(). Show me the SQL before running it.
Comment

Activity