NativeLaunch
Supabase

Database Tables Setup

Setting up your database is essential for getting started with NativeLaunch. This guide explains how to configure your Supabase database quickly using ready-to-apply migrations — so you don’t have to manually recreate the schema or SQL queries.

How It Works

NativeLaunch uses Supabase as the backend. Instead of writing SQL by hand, you can instantly recreate the required tables, columns, policies, and triggers using the migrations included in the template.

NativeLaunch comes with pre-built profile, notes, and feedback screens that require specific database tables and security policies to function. This guide provides the necessary SQL setup that powers these features:

  • The profiles table that drives the Profile screen, including user avatars and profile information
  • The notes table that demonstrates offline-first syncing of user notes
  • An avatars storage bucket for profile images
  • Security policies and triggers to protect user data and automatically create profiles

Use Supabase Migrations

  1. Install Supabase CLI
brew install supabase/tap/supabase

After installation, verify it:

supabase --version

You can also run Supabase CLI without installing it globally:

npx supabase@latest --help

Great for quick commands like supabase init or supabase db push.

  1. Login to Supabase
supabase login
  1. Link your Supabase project

Go to your Supabase Dashboard, find your project, and copy the Project ID (ref).

supabase link --project-ref your-project-id

After running this command, Supabase CLI will prompt you for your database password.
You can find it in the Supabase Dashboard under Project Settings → Database → Connection string.

  1. Apply the migrations

Assuming your current working directory is the root of the NativeLaunch repo:

supabase db push

This will recreate all required tables, columns, policies, roles, and triggers in your Supabase project.

In earlier versions of NativeLaunch you had to manually add the on_auth_user_created trigger. Now it is included automatically in the migrations — no manual step required.

supabase tables NativeLaunch


What Tables Are Created?

NativeLaunch schema includes:

  • auth.users — managed by Supabase Auth
  • profiles — linked automatically via trigger to auth.users (a new profile row is created when a user signs up)
  • notes — demo table to store note content per user

You don’t need to modify anything — it’s preconfigured to work with the rest of the app out of the box.


Learn More