Seed folder instead of / in addition to seed.sql file (backwards compatible) #14285
Unanswered
chief-nerd
asked this question in
Feature Requests
Replies: 1 comment
|
Here is the script I am using as a quick fix for now: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We are working as a team together on the supabase backend. One thing that is constantly creating merge conflicts ist the
seed.sqlfile 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:
The sorted by name option allows to account for dependencies between seed files (similar to how migrations work).
Code option B:
Code option B has the advantage that if you run
supabase db dump > seed.sqlit is NOT executing the folder in addition, which would otherwise replicate the data in the db.All reactions