FeatureFuel
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.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests