serverpod-upgrading

Upgrade Serverpod projects by updating pinned dependencies, regenerating code, and creating migrations.

3.2k|369|Updated May 22, 2021
One-click install
npx skills add https://github.com/serverpod/serverpod --skill serverpod-upgrading
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serverpod-upgrading
Source: https://github.com/serverpod/serverpod/tree/main/packages/serverpod/skills/serverpod-upgrading
Command: npx skills add https://github.com/serverpod/serverpod --skill serverpod-upgrading

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Serverpod version upgrades can break builds, APIs, sessions, and migrations, leaving teams to manually coordinate dependency bumps and breaking changes.

Core Features & Use Cases

  • Minor/patch upgrade workflow: Guides a safe, repeatable sequence for updating pinned Serverpod packages and regenerating code and migrations.
  • Major upgrade support (v2.x to v3.0): Highlights concrete breaking changes in the web server layer, sessions, enum serialization, model APIs, and authentication behavior.
  • Operational guardrails: Prevents risky toolchain drift by explicitly instructing you not to upgrade the CLI tooling during the upgrade.

Quick Start

Perform a Serverpod upgrade of your Dart/Flutter backend using the Serverpod CLI, keeping the CLI tooling version pinned and then regenerating code, creating migrations, and running analysis to fix any issues.

Frequently Asked Questions about serverpod-upgrading

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Serverpod to a new version safely?

To upgrade Serverpod safely, update all pinned dependencies consistently across server, client, Flutter, and shared packages, run pub upgrade, regenerate code, and create database migrations. This coordinated sequence prevents build breaks and API failures.

What breaking changes occur when migrating Serverpod from v2.x to v3.0?

Migrating Serverpod from v2.x to v3.0 introduces breaking changes in the Relic web server, Session handling, enum serialization, model APIs, and authentication. You must analyze your project and explicitly remediate these documented breaking changes.

Should I upgrade the Serverpod CLI tooling version during a project upgrade?

No, you should not upgrade the Serverpod CLI tooling version during a project upgrade. Keeping the CLI tooling pinned prevents risky toolchain drift and ensures code generation and migration creation function predictably.

How do I handle database migrations when updating Serverpod dependencies?

To handle database migrations when updating Serverpod, you must run Serverpod code generation after updating pubspec.yaml entries, then create new migrations. This ensures your database schema matches the newly generated code.

Does Serverpod upgrade support Docker build environments?

Yes, Serverpod upgrades include specific Docker build constraints. You must verify your installed tooling version and ensure your Docker environment matches the pinned dependency updates to avoid build failures.

Why does my Serverpod build break after updating pubspec.yaml?

Your Serverpod build breaks after updating pubspec.yaml if dependencies are not updated consistently across all packages, or if code generation and migration creation are not run. You must also address any documented breaking changes in models and sessions.