From 201a13796fdfe9bf97dac166a01952ceedce2d23 Mon Sep 17 00:00:00 2001 From: Chiziaruhoma Ogbonda Date: Fri, 12 Jun 2026 09:09:37 +0100 Subject: [PATCH 1/2] docs: Clarify how migrations are applied with serverpod start --- docs/06-concepts/06-database/11-migrations.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/06-concepts/06-database/11-migrations.md b/docs/06-concepts/06-database/11-migrations.md index 80bc54c2..1ed3f59e 100644 --- a/docs/06-concepts/06-database/11-migrations.md +++ b/docs/06-concepts/06-database/11-migrations.md @@ -94,7 +94,9 @@ For each migration, five files are created: ## Apply migrations -Migrations are applied using the server runtime. To apply migrations, navigate to your project's `server` package directory, then start the server with the `--apply-migrations` flag. Migrations are applied as part of the startup sequence and the framework asserts that each migration is only applied once to the database. +During local development, `serverpod start` applies your migrations for you: pending migrations run on the first boot, and you can apply new ones at any time by pressing **A** in the terminal UI. + +To apply migrations explicitly, for example in production or an automated pipeline, start the server runtime with the `--apply-migrations` flag from your `server` package directory. Migrations are applied as part of the startup sequence and the framework asserts that each migration is only applied once to the database. ```bash $ dart run bin/main.dart --apply-migrations From c2087b83e914a4f38452c87c3d26c01baa4539b5 Mon Sep 17 00:00:00 2001 From: Chiziaruhoma Ogbonda Date: Mon, 15 Jun 2026 08:28:47 +0100 Subject: [PATCH 2/2] docs: Make the apply migrations section scannable --- docs/06-concepts/06-database/11-migrations.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/06-concepts/06-database/11-migrations.md b/docs/06-concepts/06-database/11-migrations.md index 1ed3f59e..1112d4e0 100644 --- a/docs/06-concepts/06-database/11-migrations.md +++ b/docs/06-concepts/06-database/11-migrations.md @@ -94,9 +94,16 @@ For each migration, five files are created: ## Apply migrations -During local development, `serverpod start` applies your migrations for you: pending migrations run on the first boot, and you can apply new ones at any time by pressing **A** in the terminal UI. +### During development -To apply migrations explicitly, for example in production or an automated pipeline, start the server runtime with the `--apply-migrations` flag from your `server` package directory. Migrations are applied as part of the startup sequence and the framework asserts that each migration is only applied once to the database. +`serverpod start` applies your migrations for you. With the `serverpod start` terminal focused: + +- Pending migrations are applied automatically on the first boot. +- Press **A** to apply new migrations as you create them. + +### In production or CI + +To apply migrations explicitly, start the server runtime with the `--apply-migrations` flag from your `server` package directory. Migrations are applied as part of the startup sequence and the framework asserts that each migration is only applied once to the database. ```bash $ dart run bin/main.dart --apply-migrations