Skip to content
Helix Docs

Database commands

List the schema migrations the platform applied to a deployed project's managed database with helix db migrations, newest first.

For developers Updated Nov 16, 2026
View as Markdown

helix db migrations lists the schema migrations the platform applied to your project’s managed database when you deployed, newest first. Use it to see which deployment changed the schema and whether each change was additive or destructive.

Before you start

The command needs you to be logged in and to have a projectId in the config file, which a first helix deploy writes for you. It reads the deployed database’s history, so the list is empty until a deploy whose source has a db/schema.ts has created the database. It does not read the in-memory database that helix dev runs.

helix db migrations

helix db migrations
helix db migrations --limit 5 --json
FlagWhat it does
--limit <n>Migrations to list, from 1 to 200. Default 50
--jsonPrint the migrations as JSON instead of a table
--config <path>Config file to read the project from, instead of ./helix.config.ts

The table has one row per migration, newest first:

ColumnMeaning
Applied (UTC)When the platform applied the migration
Deployment IDThe deployment that applied it
Migration IDThe migration’s identifier
Typeadditive or destructive

With --json, each entry carries appliedAt, deploymentId, migrationId, and classification.

Errors

MessageWhat to do
No migrations applied yet: no schema has been deployed.Deploy a source that has a db/schema.ts. The first such deploy creates the database.
projectId is not set in helix.config.tsRun helix deploy to provision the project, or helix project set <uuid> if it already exists.
The platform rejected your sessionRun helix login and try again.
You do not have access to project ... databaseCheck projectId and workspaceId in the config file, and use --config for a non-default target.
No database for project ...The project has no database yet. If you have deployed a schema, check projectId in the config file.
The platform failed to read the migrations (HTTP ...)Try again shortly.
Invalid --limit valueUse a whole number between 1 and 200.

For what the migrations are and how deploys apply them, see the database guide.

Loading search…

Jump to a section

tab to move · esc to close