Skip to content

Tools

Lovable adds separate test databases to app drafts

Edited and reviewed by AI Ping Editorial Team

3-line summary

  1. Lovable is rolling out separate test databases for drafts in projects that use its built-in backend.
  2. Drafts copy the database structure and start with example data. Projects connected to their own Supabase database still use live data in drafts.
  3. Accepting a draft can change the live database and deploy backend functions. Updated pages reach visitors when the project is published.
PracticalDevelopers
A closed drawer next to an open drawer of sample dividers on a fictional workbench
AI-generated conceptual image: two drawers on one workbench represent live data and the draft’s example data · AI Ping

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.

Colorful ceramic tiles in compartments beside a stencil with a matching pattern
AI-generated conceptual image: a stencil and colored tiles represent a copied database structure filled with example records · AI Ping

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.

A printing block in a press and a folded booklet on a rack behind it
AI-generated conceptual image: a block in a press and a booklet on a rack represent separate steps for applying backend changes and publishing pages · AI Ping

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