Lovable adds separate test databases to app drafts
Edited and reviewed by AI Ping Editorial Team
3-line summary
- Lovable is rolling out separate test databases for drafts in projects that use its built-in backend.
- Drafts copy the database structure and start with example data. Projects connected to their own Supabase database still use live data in drafts.
- Accepting a draft can change the live database and deploy backend functions. Updated pages reach visitors when the project is published.
Lovable is rolling out test databases for drafts in projects that use its built-in backend, the AI app builder announced on November 16. A draft with the new setup takes the structure of the live database and populates it with example records. A team building a new signup form or booking field can check how it saves information in the preview without writing those test entries into the live app’s database.
Lovable introduced drafts in September. Each has its own AI chat and preview, so a team can work on different versions of an app side by side. The September release notes said drafts used the project’s live data. The November rollout extends the feature to database changes: a team can now try a screen and the changes needed to store the information it collects.
Which drafts get their own database
On the built-in backend, a draft that receives a separate database starts with a copy of the live tables, columns and access rules. It uses example records and separate test accounts. Its storage starts empty with the same settings as the live app. If a team adds a field to a booking form, for example, it can add the corresponding column and see whether an entry saves to the draft’s table.
A project that connects to its own Supabase database continues to use the live database in drafts. Lovable also falls back to the live backend when it cannot provision a separate one, such as when the database is paused or it cannot copy the structure. The example-data banner on the preview identifies drafts with their own backend. An edit made to a record in a draft that shares its backend takes effect immediately. Deleting the draft leaves that record change in place.
The separation covers the backend Lovable provisions for the draft. Connected services still use the live settings. The company’s documentation says an email sent through a connected service can go out for real. Lovable’s built-in payments use test mode in drafts, while a payments connection using a live key from the team’s own Stripe account can process a real charge.
Accepting a draft applies backend changes
Lovable separates accepting a draft from publishing the project. Accepting can change the live tables and columns, deploy changed server functions and apply storage settings from a draft with its own backend. The trial records, users and files in that draft are discarded when it is accepted. Before applying the changes, Lovable checks that they fit the current live database. If any structural change fails, it applies none of them and leaves the draft code out of the main project.
The edits to pages and screens wait in the main project until it is published. In the meantime, visitors still see the earlier screens, which already use the changed database and server functions. If the old form needs a column that the accepted draft renamed or removed, that form can stop working in the gap. Lovable’s guide tells users to publish the main project promptly in that case.
Project history and database backups restore different things
Lovable creates no new database backup when a draft is accepted. Restoring an earlier version in project history brings back its code and server functions. Restoring the database is a separate operation. Lovable provides daily backups for its built-in database and says a restore can remove records added since the selected backup.
Anyone with edit access can accept a draft, including one created by a teammate. If the main project has changed in the meantime, Lovable updates the draft before applying it. The service queues drafts accepted around the same time and applies them one by one. An accepted draft remains available to read in project history. Further edits start in a new draft from the current project.
Sources
- November 16 announcement on separate backends in drafts — Lovable
- Explore changes with drafts — Lovable
- September 9 and November 16 release notes — Lovable
- Built-in backend — Lovable
- Connect to Supabase — Lovable
- Publish your Lovable project — Lovable
- Project version history — Lovable
- Database backup, restore and export — Lovable
- Built-in payments and test mode — Lovable
- Connect your own Stripe account — Lovable