Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annoyance with Supabase Dashboard Table Editor -> Composite Foreign Keys #23485

Open
dilly-sixmo opened this issue May 1, 2024 · 0 comments
Open
Labels
bug Something isn't working frontend Related to supabase dashboard

Comments

@dilly-sixmo
Copy link

I posted this issue in Supabase Discord and was told I should post it here:

When using composite foreign keys in a data table, the Table Editor's UI for updating a column or inserting a new record can become impossible to use.

For example, If I have a table named project_task_expenses that has columns: id, tenant_id, project_task_id, expense_account_id among others.

id + tenant_id is a composite primary key
expense_account_id + tenant_id is a composite foreign key
project_task_id + tenant_id is a composite foreign key

Now let's say I want to either manually edit the tenant_id for an existing record OR I want to insert a completely new record into this table. And I want to use the Supabase Dashboard's Table Editor to do it. Well here's what happens:

When I go to update/set the tenant_id, I'll see something like this:

image

And when I click "Select Record", I would expect to just see the records available in the tenants table, but instead I see this:

image

It makes it basically impossible for me to use the Table Editor in any capacity.

@dilly-sixmo dilly-sixmo added the bug Something isn't working label May 1, 2024
@encima encima added the frontend Related to supabase dashboard label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frontend Related to supabase dashboard
Projects
None yet
Development

No branches or pull requests

2 participants