Your project database
Projects created with a database get a real PostgreSQL or MySQL of their own — shaped by prompts, browsable in Settings. It backs your preview and your deploys, and you can connect your own tools to it.
What you get
Picking PostgreSQL or MySQL at create time provisions a real database server for that project alone, with its own name, user, and password.
The choice is locked at create time. A project created with No database cannot have one added later, and you cannot switch engines — see creating & managing projects.
When a project has one, the workspace header shows a Postgres or MySQL chip that opens Settings → Database — where everything on this page lives. A project without one shows a No database panel there instead.
The AI and your schema
You do not create tables by hand. Describe the data you want in a prompt — "add a Product table with a name, price, and stock count" — and the AI writes the schema and pushes it to the database. Prisma ships with every project.
A new database is empty until the first prompt puts a schema in it; until then the Schema tab says so and suggests a prompt to run.
Browsing your data
Settings → Database has four tabs.
- Overview — Size, Tables, Total rows and Active connections, plus your connection details and the danger zone. The row count is an engine estimate, not an exact tally.
- Schema — every table with its columns: Column, Type, Nullable, Key. Primary keys are marked
PKand unique columnsUQ. Read-only. - Browse — pick a table and page through its rows, 50 at a time. Click a column header to sort; click again to flip direction. ← Prev and Next → move between pages.
- SQL — the query runner, below.
Running SQL
The SQL Runner gives you an editor and a Run button. Results come back as a table with the row count and the time taken; Cancel stops waiting for a query in flight.
Anything destructive is checked first. DROP, TRUNCATE, ALTER, and an UPDATE or DELETE without a WHERE clause open a Confirm destructive operation dialog naming the table and the rows affected. Nothing runs until you click Continue.
Recent keeps your last 20 queries so you can pull one back into the editor. That list belongs to the browser tab you ran them in — not shared with collaborators, and gone when the tab closes.
Queries are capped: 30 seconds, 1,000 rows returned, and 10,000 characters of SQL. A result cut at 1,000 rows says so and suggests adding a LIMIT for an exact answer.
Connecting external tools
The Overview tab lists your Host, Port, Database, User and Password — the password is hidden until you click the eye. There is also a full Connection URL (masked) and copy buttons.
Two forms of the connection string exist, and they are not interchangeable:
- Copy host URL — the one you want for TablePlus, DBeaver,
psql, or anything else on your own machine. The panel also offers a ready-made command line for your engine. - Copy container URL — the internal address your workspace and your deployed app use to reach the database. It will not resolve from your laptop.
Treat these credentials like any other secret — do not paste them into a public repository, an issue, or a chat.
Preview, production and your data
By default your preview and your published app talk to the same database. Test rows you create while prompting are the rows your visitors will see.
To keep production separate, set DATABASE_URL (or MYSQL_URL) in the Env variables editor of the Deploy dialog and point it at a database you host yourself. A value set there wins for deploys — details in publish & deploy. Your preview always uses the project database, whatever you set for production.
Dropping the database
The Danger zone at the bottom of Overview has Drop database. Confirming deletes every table and row and revokes the connection URL.
This is permanent and one-way: because the database choice is fixed at create time, you cannot attach a new one afterwards. The project keeps working — it just has nowhere to store data. Only the owner sees this button; editors can read, browse, and run SQL.
Limits & notes
- One database per project, PostgreSQL or MySQL, chosen at create time and locked.
- SQL runner: 30-second timeout, 1,000 rows per result, 10,000 characters per query.
- Browse pages 50 rows at a time; the Schema and Browse tabs are read-only.
- Recent queries: 20, kept per browser tab only.
- The host connection string is for external tools; the container one only works inside the platform.
- Deploys use this database unless you set
DATABASE_URL/MYSQL_URLyourself. Preview always uses it. - Dropping the database is permanent, owner-only, and cannot be undone.
- Deleting the project also deletes the database.
- Limits may change during alpha.
Related
- Creating & managing projects — where the database choice is made.
- Publish & deploy — environment variables and production data.
- REST API for your data — expose these tables over HTTP.
- Live preview — the dev server that reads this database.