View tables and data
The Database view lists your project’s tables and views with their row counts. Tables populate as soon as your app saves information. Click a table to browse its records. Views are read-only. Tables open in an editable records view.Edit records
Open a table to view and edit its records. Double-click a value to edit it in line. You can also:- Filter: add one or more column filters. Available operators depend on the column type, for example equals or contains for text, greater than or less than for numbers, and before or after for dates.
- Add row: opens a form generated from the table’s schema. Auto-generated columns are filled in for you.
- Edit row: opens the full row for editing. Updating rows currently supports tables with a single primary key.
- Delete rows: select rows and click Delete. Deleting rows cannot be undone.
- Export CSV: download the table’s records as a CSV file.
- Refresh: reload the table after your app writes new data. The view does not update live.
Run SQL queries
For direct database access, use the SQL editor at Cloud tab → SQL editor:- The query editor autocompletes table and column names from your schema.
- Run executes the query (or press ⌘/Ctrl + Enter), and Clear empties the editor.
- Results appear in a table below the query. If a query fails, the error message appears in its place.
DELETE, DROP, TRUNCATE, ALTER, or UPDATE, Lovable asks you to confirm before running it.
Row level security (RLS) policies
Row level security (RLS) controls which data users can access across your database, storage, and realtime features. Think of a policy as a rule that decides which rows a signed-in user can see or change, for example “users can only read their own orders”. Lovable sets up these rules automatically when it builds features that store user data, so one user’s private data is never served to another. To review the rules, go to Cloud tab → Database → RLS policies. The RLS policies view lists each policy with:- Policy name: what the rule is for.
- Command: the action the rule applies to. SELECT is reading data, INSERT is adding it, UPDATE is changing it, and DELETE is removing it.
- Applies to: which users the rule covers, such as signed-in (authenticated) or anonymous (anon) users.
- Rule expression: the condition that must be true for the action to be allowed.
Backup and restore
Lovable Cloud takes a daily backup of your project’s database. You can browse and restore them from Cloud tab → Database → Backups. Up to roughly 14 days of backups are retained. Each entry shows the snapshot timestamp in UTC (for example,18 May 2026, 04:27:12 UTC).
Click Restore to this backup on any backup row and confirm in the dialog. Lovable rolls the database back to that point, schema and data, and the project’s database is unavailable for a few minutes while the restore runs.
Restoring is permanent. Any data created or changed after the chosen backup is lost. Because the schema is also reverted, your app may no longer match the database if it changed after the backup.When the restore finishes, ask Lovable in chat to test your app and patch any schema mismatches.
Database health check
Get an on-demand snapshot of your Cloud database, including connections, memory, disk usage, uptime, and more, directly from Lovable chat. Prompt Lovable in chat with something like:Find and fix database performance problems
Lovable can pinpoint the slowest queries in your database and use that data to optimize performance, so you can fix real bottlenecks before considering a larger instance. Prompt Lovable in chat with something like:- Query statistics build up as your app handles real traffic. A brand new or recently restarted database may have nothing to report yet.
- Finding slow queries is read-only. Lovable only changes your database when it applies a fix, and it tells you what it changed.
FAQ
Do backups include storage files?
Do backups include storage files?
No. Backups cover the database only, both schema and data. Files in storage buckets are stored separately and are not part of database backups or database exports.
Can I restore my database to any point in time?
Can I restore my database to any point in time?
No. Lovable Cloud takes one backup per day and retains up to roughly 14 days of backups. You can restore to any of those daily snapshots, not to an arbitrary moment between them.