Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Supabase Database Adapter

Supabase is used to store bounty hunters profiles and bounties information.

How to setup supabase project locally

  1. To get started with supabase, you have to create a project at Supabase. Once you create a project, please put both variables into .env file.
SUPABASE_PROJECT_URL=XXX
SUPABASE_PROJECT_KEY=XXX
  1. Install the Supabase CLI The Supabase CLI provides tools to develop your project locally and deploy to the Supabase Platform. Most common useful commands are
  • Run Supabase locally
supabase start
  • Manager database migrations
supabase migratio
  • CI/CD for releasing to production
supabase db push
  • Manager your supabase projects
supabase projects
  • Generate types directly from your database schemas
supabase gen types
  1. Link the local project to the supabase project you created.
supabase link -p PASSWORD --project-ref PROJECT_REF

For more information about arguments, please go through here

Database Operation

  • supabase migration new MIGRATION_NAME: It will create a migration file in supabase/migrations folder.
  • supabase db push -p PASSWORD: Update database schema on supabase platform
  • supabase gen types typescript > src/adapters/supabase/types/database.types.ts --linked: Generate typescript types from the supabase project linked