2
Seed folder instead of / in addition to seed.sql file (backwards compatible)
Source: supabase/supabase#14285 · opened by @chief-nerd
We are working as a team together on the supabase backend. One thing that is constantly creating merge conflicts ist the seed.sql file because each feature branch is writing into it. Solve it similar to migrations: a folder instead of / in addition to a file: Code option A: • Check if there is a seed.sql -> if so, execute it (current behaviour, backwards compatible) • Check if there is additionally a /seed FOLDER • If so execute each .sql file in that folder sorted by name. The sorted by name option allows to account for dependencies between seed files (similar to how migrations work). Code option B: • Check if seed.sql file or ./seed Folder exist • If file: -> execute it (current behaviour, backwards compatible) -> stop there • If folder: execute any SQL file in the /seed FOLDER -> stop there. • If both: give priority to the file Code option B has the advantage that if you run supabase db dump > seed.sql …
No pledges yet. Be the first to back this.
Comments
Similar requests
Multiple seed files for local development
9 votes · 0 comments
Seeding Data
3 votes · 0 comments
Support Git LFS for Github integration
3 votes · 0 comments
Enhanced SQL Query Management for Supabase CLI: A Proposal for Query File and Folder Support
4 votes · 0 comments
Possibility to add new seed data from cli or UI
1 vote · 0 comments
No comments yet.