- Docker is installed and running
- Install dependencies:
npm install
- Start Supabase:
npx supabase start
ornpm run db-start
- Migrate & Seed:
npm run init
- Applying Migrations:
npx prisma migrate deploy
- Creating a new migration file:
npx prisma migrate dev --name [NAME]
- Pushing schema to database without migration:
npx prisma db push
- Create Prisma client & types without migrating:
npx prisma generate
- Generate Supabase types from Database:
npx supabase gen types typescript --local --schema public > src/types/supabaseTypes.ts
ornpm run update-types
- Running Seed:
npx prisma db seed
- Querying via SupaBase client (data API):
npx ts-node src/supabase.ts
- Querying via Prisma client:
npx ts-node src/prisma.ts
- Stop Supabase and backup current state:
npx supabase stop --backup
ornpm run db-stop
- Kill all running supabase docker container if you've deleted the project that started them:
docker stop $(docker ps -aq --filter "name=supabase") && docker rm $(docker ps -aq --filter "name=supabase")