# 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

#### Manual Review Mode (Recommended)

**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:**

{% stepper %}
{% step %}
Enable Manual Review in project settings

<figure><img src="/files/PgQ4Z3QVluKOmoy5OdqX" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Wait for Tech Lead stage

<figure><img src="/files/ZfAuHlHTrfkQxvlNoKNB" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Review and modify schemas as needed

<figure><img src="/files/yQUWkkPe8igCVpkyvBf1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Approve when satisfied
{% endstep %}
{% endstepper %}

```
Example scenario:
You're building a recipe app. eMOBIQ AI proposes a recipes table without a 
difficulty_level column. In Manual Review, you add it before approval, avoiding a 
migration later.
```

***

#### 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

***

{% stepper %}
{% step %}
Open your project
{% endstep %}

{% step %}
Click on **Debug Agent** tab
{% endstep %}

{% step %}
Use the prompt to let Debug Agent know your changes

<figure><img src="/files/Cd5dYVMDUlgeF78E9jJn" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Approve or Reject changes

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

<figure><img src="/files/UTSmeKanemLTH4wjf6BN" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

### Verifying Your Data in Supabase

After making changes or syncing data, you can inspect your tables directly in the Supabase Studio dashboard.

{% hint style="warning" %}
**The Table Editor paginates results at 100 rows per page.** If you're verifying that data was inserted correctly, use the **Next** button at the bottom of the grid to check later pages — new rows are typically appended at the end of the table, not the top.
{% endhint %}

For a full guide on browsing and filtering table data, see the official Supabase documentation:

<a href="https://supabase.com/docs/guides/database/tables" class="button primary" data-icon="up-right-from-square">Supabase Table Editor Docs</a>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-ai/readme/supabase/editing-your-database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
