Editing Your Database

Your database structure isn't set in stone, but changes need to happen in the right places. Here's your complete guide to when, where, and how to modify your Supabase database.

The Golden Rule

Database changes can ONLY be made in two places in our platform:

  1. 🔍 Manual Review Mode - During schema approval (before tables are created)

  2. 🐛 Debug Agent - For testing, iteration, and fixing issues


Where You CAN Make Changes

When: During the Tech Lead stage, before tables are created

What you can change:

  • Table names

  • Column names and data types

  • Add or remove columns

  • Modify constraints (NOT NULL, UNIQUE, etc.)

  • Change default values

  • Update foreign key relationships

  • Add indexes

  • Set up Row-Level Security policies

Best for:

  • Initial database design

  • Major structural changes

  • Adding new features early in development

How to access:

1

Enable Manual Review in project settings

2

Wait for Tech Lead stage

3

Review and modify schemas as needed

4

Approve when satisfied


Debug Agent

When: After initial development, during testing and debugging

What you can change:

  • Add test data

  • Modify existing records for testing

  • Test new columns or tables

  • Execute ad-hoc SQL queries

  • Troubleshoot issues

Best for:

  • Testing new features

  • Debugging data issues

  • Experimenting with schema changes

  • Iterating on database design


1

Open your project

2

Click on Debug Agent tab

3

Use the prompt to let Debug Agent know your changes

4

Approve or Reject changes

Verify that this is the change you want before accepting the change

Last updated