NeonN
Neon2mo ago
1 reply
ordinary-sapphire

Cannot select Foreign Key target (neon_auth.users_sync) when public schema is empty

I've encountered a UI bug in the Neon table editor, specifically when trying to set a foreign key that references a table in another schema (like neon_auth) while the public schema is empty.

Setup:
- Neon Auth is enabled, so neon_auth.users_sync exists.
- The public schema is completely empty (0 tables).

Steps to Reproduce:
- In the public schema, start creating the first new table (e.g., profiles).
- Add a column (e.g., user_id).
- Attempt to designate this column as a Foreign Key.

Actual Behavior: The UI element (button/dropdown) used to select the foreign key target table is unresponsive. I cannot click it to browse or select neon_auth.users_sync as the reference.

Workaround:
- Create any "dummy" table in the public schema first.
- Create the profiles table again.
- When I now attempt to set the foreign key, the UI works, and I can successfully select neon_auth.users_sync as the target.

This seems to be a UI bug triggered only when creating the first table in an empty schema and trying to link it to an existing table (like users_sync).
Was this page helpful?