-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
type:bugSomething is not working; user-visible defect.Something is not working; user-visible defect.
Description
Self Checks
- This is only for bug report, if you would like to ask a question, please head to Discussions
- I have searched for existing issues
- I confirm that I am using English to submit this report
- Please do not modify this template and fill in all the required fields
AgentifUI Version
main (commit fbcbe9f)
Environment
Local Development (pnpm dev)
Bug Description
Applying Supabase migrations with npx supabase db push fails on the notification RLS policy because target_roles is defined as text[] while profiles.role is the user_role enum. The policy uses text[] && user_role[], and Postgres errors out.
Steps to Reproduce
- Fresh checkout of main
- Run
npx supabase db pushagainst the project - Migration
20250822140000_create_notifications_system.sqlfails when creating the policy
✔️ Expected Behavior
The migration should apply cleanly and create notification policies.
❌ Actual Behavior
Migration stops with SQLSTATE 42883: operator does not exist: text[] && user_role[] in the policy "Users can read targeted published notifications".
Console Logs
ERROR: operator does not exist: text[] && user_role[] (SQLSTATE 42883)
At statement: (target_roles && ARRAY[(SELECT role FROM public.profiles WHERE id = auth.uid())])
Additional Context
Root cause: target_roles column is text[] but compared with profiles.role (user_role). Fix: change target_roles to user_role[] or cast role to text. I patched locally to user_role[] to match the enum.
Metadata
Metadata
Assignees
Labels
type:bugSomething is not working; user-visible defect.Something is not working; user-visible defect.