Skip to main content

Data Operations

This guide covers working with data in FindU’s Supabase environments, including seeding test data, performing CRUD operations, and safely handling production data.

Understanding Data Environments

Production data contains real user information and must never be copied to development environments. Always use synthetic test data in development.

Seeding Test Data

Creating Seed Files

Organize your seed data in the supabase/seed.sql file:

Running Seeds

Advanced Seed Patterns

CRUD Operations

Using Supabase Client

Direct SQL Operations

For complex operations, use SQL directly:

Using Supabase Studio

Visual Data Editor

1

Access Table Editor

Navigate to Table Editor in Supabase Dashboard
2

Filter and Sort

Use the UI to filter, sort, and search data
3

Edit Inline

Click any cell to edit directly (respects RLS)
4

Export Data

Export filtered results as CSV for analysis

SQL Editor Best Practices

Data Import/Export

Importing Data

Exporting Data

Data Privacy & Security

Anonymizing Test Data

Production Data Access

Production data access should be restricted and audited. Never run write operations directly in production.

Performance Considerations

Batch Operations

Query Optimization

Troubleshooting Data Issues

Check for existing records before insert:
Ensure referenced records exist:
Test with service role key or check policies:
Identify slow queries:

Next, learn about troubleshooting database issues or return to the database overview.