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

Auto index foreign key #74

Open
vani-rf opened this issue Sep 27, 2024 · 2 comments · May be fixed by #82
Open

Auto index foreign key #74

vani-rf opened this issue Sep 27, 2024 · 2 comments · May be fixed by #82
Assignees
Labels
enhancement New feature or request

Comments

@vani-rf
Copy link
Contributor

vani-rf commented Sep 27, 2024

Problem

I'm facing performance issues in Supabase, where foreign keys are not automatically indexed. This causes some queries to be inefficient, particularly when working with large datasets. Supabase's performance editor highlights this as a key optimization concern, and I have to manually create indexes for foreign keys, which is not ideal for scalability or developer experience.

Solution

I would like Raiden to automatically create indexes on foreign key columns when models are applied to Supabase. This feature should ensure that whenever a foreign key is added, the corresponding index is automatically generated, improving query performance without manual intervention.

@vani-rf vani-rf self-assigned this Sep 27, 2024
@toopay toopay added the enhancement New feature or request label Oct 7, 2024
@toopay
Copy link
Member

toopay commented Oct 15, 2024

Also add the foreign key options (both in cloud and local drivers) for on delete/on update.

@toopay
Copy link
Member

toopay commented Oct 22, 2024

@vani-rf It seems the feature is able to generate the model, but after updating the tag, it still tries to generate the same tag (see screenshot). It looks like this needs to be revisited, especially the part that compares the differences—because there is no difference here, yet it keeps showing as if there is.

Screenshot 2024-10-22 at 20 35 46

@toopay toopay linked a pull request Oct 24, 2024 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants