Most apps teams build for themselves outgrow a spreadsheet the week they ship. They need records that relate to each other: requests and the people who approve them, accounts and their contracts, tickets and their history. Until now that meant asking for a database, waiting for someone to set it up, and keeping its schema in step with the code by hand.
Now in Helix, the database comes with the app. You describe the tables in one file, and the deploy does the rest: it creates the database the first time, and on every deploy after that it changes the schema to match your file before the new code goes live.
What that gives the team building it:
- No database to request or run. A project that has a
db/schema.tsgets its own Postgres database, with pgvector included. A project without one has no database. - No migrations to write. You edit the schema and deploy. Helix works out what changed and applies it.
- Typed queries. Functions get a Drizzle query builder typed from the schema, so a wrong column name fails in the editor, not in production. The AI assistant writes it the way it writes any Drizzle code.
- A safe local copy.
helix devruns an in-memory Postgres built from the same schema. It starts fresh on every save and can’t reach deployed data.
What it gives IT:
- One database per app, and only that app can read it. No shared database for every team’s experiments.
- Schema changes only through a deploy. The app’s functions can read and write data but can’t create, change or drop a table. The only way a table changes is a deploy, which is reviewed and recorded like any other.
- Destructive changes stopped at the door. A deploy that would drop a table or column is refused before it runs.
An example
A sales team runs a deal desk app on Helix for discount approvals. Requests come in through a form, and a manager approves or declines them. Here’s the app getting its database.
1. The team describes the data
They ask the AI assistant for two tables, discount requests and approvals, and it writes them into db/schema.ts: the account, the discount asked for, who asked, and each approval with the approver and a timestamp.
2. The first deploy creates the database
The team runs helix deploy. Helix sees the schema, creates the project’s Postgres database, applies the schema and only then puts the new code live. The form’s function writes each request with one call, and the manager’s view reads the open ones.
3. They add a field the next week
Finance wants a reason code on every request. The assistant adds a column with a default to the schema, and the next deploy adds it to the live table before the code that uses it ships. Nobody writes a migration.
4. A risky change gets stopped
Later someone renames the discount column in the same change that drops the old one. Helix reads that as data that would disappear, and the deploy is refused with a message saying to make the change in steps. The live app keeps running untouched.
What else you could build
- An asset tracker that records laptops, who has them and when they’re due back.
- A vendor onboarding app that keeps each vendor, its documents and its approval history together.
- A support triage tool that stores tickets with embeddings in a vector column, so similar cases can be found.
- A field service log that relates sites, visits and parts used.
Before you build one
Rename and remove in steps. Add the new column, copy the data across with a one-off function, and remove the old column in a later deploy. A deploy never carries data, only schema.
The first call after a quiet spell is slower. An idle database wakes when it’s next used. Helix retries a call that arrives while it wakes, for up to about 30 seconds. A statement that fails for any other reason isn’t retried, so a write never runs twice.
Some column types need a cast. Enum, numeric, array and vector values fail without one. Since Helix 1.28.0 the SDK has column types that cast for you, and helix dev fails the same way the deployed database does, so you catch it locally.
Big results are refused. A single result over about 1 MiB is rejected, so page large reads.
It’s for data that outlives a request. For a simple value or a flag, the project’s key-value store is lighter.
How to set it up, change the schema and query it is in the docs linked above.