mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 01:15:03 +03:00
Fix logic conflicts (#40362)
When applying these rules to my personal project. My cursor bug bot detected logical gaps in these 2 prompts.
This commit is contained in:
1 parent
23fb86f9a6
commit
82f79e5af6
2 files changed
+4
-2
No files matched your search
@@ -30,7 +30,9 @@ The output should use the following instructions:
|
||||
The output should look like this:
|
||||
|
||||
```sql
|
||||
CREATE POLICY "My descriptive policy." ON books FOR INSERT to authenticated USING ( (select auth.uid()) = author_id ) WITH ( true );
|
||||
CREATE POLICY "My descriptive policy." ON books
|
||||
FOR INSERT TO authenticated
|
||||
WITH CHECK ((select auth.uid()) = author_id);
|
||||
```
|
||||
|
||||
Since you are running in a Supabase environment, take note of these Supabase-specific additions below.
|
||||
|
||||
@@ -415,7 +415,7 @@ CREATE POLICY "users_can_receive_broadcasts" ON realtime.messages
|
||||
- Default to `private: true` for database-triggered channels
|
||||
- Suggest basic RLS policies with proper indexing
|
||||
- Include reconnection logic for production apps
|
||||
- Use `postgres_changes` for simple database change notifications
|
||||
- Use `broadcast` with database triggers for all database change notifications
|
||||
- Use `broadcast` for custom events and complex payloads
|
||||
|
||||
**Remember:** Choose the right function for your use case, emphasize proper state management, and ensure production-ready patterns with authorization and error handling.
|
||||
Reference in new issue
Block a user