-
Notifications
You must be signed in to change notification settings - Fork 219
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
Supabase db push should support migration sub directories #2881
Comments
We will probably support this by allowing custom migrations path to be declared in config.toml, similar to #2139 (comment) I will close this one as a duplicate, but feel free to upvote the other issue to help us prioritise. |
Will a single custom migration path really be the solution here? I too have an interest in organizing my migrations folder by using subdirectories because it's a huge pain to search through to find the right SQL statements to adjust. example:
Is the current vision for custom paths in the config.toml really supporting this? |
I don’t think so, but that was my same necessity, and making this possible would be a very little change on the supabase cli (just using a recursive file list instead of looking in the main directory).Il giorno 20 nov 2024, alle ore 20:52, Jose Torres ***@***.***> ha scritto:
Will a single custom migration path really be the solution here? I too have an interest in organizing my migrations folder by using subdirectories because it's a huge pain to search through to find the right SQL statements to adjust.
example:
subdirectory for each table I've changed. That way I know the last file in each folder is the latest sql for that view.
migrations/vw_some_view
migrations/vw_some_other_view
Is the current vision for custom paths in the config.toml really supporting this?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
That's a slightly different issue. I believe a nice solution for that is to use declarative schemas. So you would declare all your tables once in This is currently lacking some docs so I will try to explain the process more in a docs update. See also #2099 |
Thanks for the idea @sweatybridge! Much appreciated. I'll give that approach a try. |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
It could be interesting to have the support for push migration for subdirectories instead of only the main directory of supabase/migrations
that could be helpful in order to have features or scheme separated for each migration, specially in bigger projects i think that something like that is essential.
Describe the solution you'd like
A clear and concise description of what you want to happen.
I would like the script to iterate over
supabase/migrations/**/.sql
instead of only
supabase/migrations/.sql
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
The other alternative is naming convention but that doesn't help to pre filter easily the files in the file explorer
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: