cli icon indicating copy to clipboard operation
cli copied to clipboard

Seed with a Script

Open clouedoc opened this issue 4 years ago • 0 comments

Feature request

Is your feature request related to a problem? Please describe.

We currently have seeding scripts written in TypeScript.

They served two purposes:

  1. Reproducibility of the project: if we had to deploy somewhere else, we would still have the essential data needed for the app to work.
  2. Easily provision a local development environment.

There is currently no way to run such seeding scripts after running supabase start since the CLI is blocking, which means we can't simply add a dev:start script to run supabase start && yarn db:seed.

Describe the solution you'd like

  • We would like supabase start to accept a flag to run a custom seeding command.
  • We would like to have the possibility to edit the Supabase config to run a seeding script

Describe alternatives you've considered

We considered converting our seeding scripts to SQL, but I believe this is a feature that could benefit Supabase too.

Additional context

The data we want to seed is pretty static. We wrote our seeding scripts in TypeScript. We could also solve our problem with #30.

clouedoc avatar Oct 29 '21 15:10 clouedoc