You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the idea of adding a config option. My only worry is that it might be harder for users to find compared to a CLI flag, and it could be less convenient for one-time use. It depends on how often people would need to change this setting.
For compatibility, can we add this new config automatically when the CLI runs for the first time (some kind of migration process)? Or should we use some logic like:
No [db.seed] in config: Use the current behavior.
[db.seed] in config: Seed from the given path or skip if empty/disabled.
Also, for different branches, should we still use "supabase/seed/*.sql" by default, or follow the path set in config.toml?
Another solution could be adding a --seed-path flag. If this flag is given an empty value, it would skip seeding. This way, users can control seeding behavior directly from the command line.
Activity
feat: db reset --skip-seed flag
sweatybridge commentedon Sep 10, 2024
@avallete I wonder if this issue can be better solved by a config option, and if so what would it be?
Perhaps something that allows users to specify different sources or skip completely if omitted.
avallete commentedon Sep 10, 2024
@sweatybridge,
I like the idea of adding a config option. My only worry is that it might be harder for users to find compared to a CLI flag, and it could be less convenient for one-time use. It depends on how often people would need to change this setting.
For compatibility, can we add this new config automatically when the CLI runs for the first time (some kind of migration process)? Or should we use some logic like:
[db.seed]in config: Use the current behavior.[db.seed]in config: Seed from the given path or skip if empty/disabled.Also, for different branches, should we still use
"supabase/seed/*.sql"by default, or follow the path set inconfig.toml?Another solution could be adding a
--seed-pathflag. If this flag is given an empty value, it would skip seeding. This way, users can control seeding behavior directly from the command line.What do you think?
sweatybridge commentedon Sep 11, 2024
This sounds good to me. We can start with a cli flag for adhoc usage, followed by the config approach for branching use cases.
The config approach would eventually support different sources so that users can control what to seed for each branch.
feat: db reset skip seed flag (supabase#2665)
frederikheld commentedon Sep 26, 2026
Can we please have the flag as well? Sometimes you just want to skip seeding once to debug something.