Seeding Data #19773
-
Hello all, The current situation is that you have to write a seed script if you want to have seeding data in the database. This is then located here: Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Totally, I really want this feature! I'm willing to contribute if someone could point me in the right direction. :P |
Beta Was this translation helpful? Give feedback.
-
Tying this request with branching feature. It would be nice to have an option to configure seed directories for each of the branches . |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, I'm excited to share that we have some news on this. For example, if you have a staging branch, you can set up your configuration like this: [remotes.staging]
project_id = "your-staging-project-ref"
[remotes.staging.db.seed]
sql_paths = [
"./seeds/staging/01_users.sql",
"./seeds/staging/02_orders.sql"
] This configuration tells Supabase branching to configure some seed specifics for the staging branch. Or any other branch. For more details, please check out the remote config docs and the db seeding docs Let us know if you have any feedback or questions. Happy coding! |
Beta Was this translation helpful? Give feedback.
Hi everyone,
I'm excited to share that we have some news on this.
You should now be able to do this via the
[remotes.branch-name.db.seed]
feature.For example, if you have a staging branch, you can set up your configuration like this:
This configuration tells Supabase branching to configure some seed specifics for the staging branch. Or any other branch.
For more details, please check out the remote config docs and the db seeding docs
Let us know if you have any feedback or questions. Happy coding!