When npx supabase init
, npx supabase start
, or npx supabase db reset
is run, supabase will look for our seed.sql
file and seed our local database.
Since we have already created the project and we want to add seed data, we can run npx supabase db reset
.
[00:00] Whenever you start your local instance of Supabase, you'll notice you have the c dot SQL file. Starting off, it'll be empty, but as your project grows, you probably want to have some seed data in this file. So we're just gonna paste some to dos here, and we're gonna save it. Now if you were starting up super bass and ran [00:20] super bass in it, then this would run. If you had already initted super bass and you ran start, then this would run. But since our local instance has already started, we can just say super bass, DB reset. And when we run this, it's gonna reset everything. And then it's gonna run our seed command. And [00:39] then we'll see our data populated over here on the right. Okay. The command has finished running. Now if we come back to our project, we see our to dos.
Member comments are a way for members to communicate, interact, and ask questions about a lesson.
The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io
Be on-Topic
Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.
Avoid meta-discussion
Code Problems?
Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context
Details and Context
Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!