بنقرة واحدة
serverpod-upgrading
// Upgrade Serverpod — minor/patch updates, major upgrade to v3. Use when upgrading Serverpod versions or updating dependencies.
// Upgrade Serverpod — minor/patch updates, major upgrade to v3. Use when upgrading Serverpod versions or updating dependencies.
Serverpod web server (Relic) — REST APIs, webhooks, middleware, static files, server-rendered HTML, SPAs, Flutter web. Use when adding HTTP routes, serving web pages or web apps, intercepting requests, or working with the Relic web server.
Serverpod overview — what it is, project structure, how to work with. Always use at least once when working with projects that use Serverpod.
Serverpod Authentication — Signing in users, verify if they are authenticated, assinging scopes (e.g., admin). Use when adding features that require the user to be signed in.
Serverpod ORM with PostgreSQL or SQLite — CRUD, filters, sorting, pagination, relations, transactions, raw SQL, client-side database. Use when querying the database or working with relations.
Serverpod logging — session.log, log levels, persistence, retention, console output. Use when adding logging or debugging server calls.
Serverpod database migrations — when and how to create/apply/repair migrations. Use whenever database schema changes are involved.
| name | serverpod-upgrading |
| description | Upgrade Serverpod — minor/patch updates, major upgrade to v3. Use when upgrading Serverpod versions or updating dependencies. |
Requirements: Dart 3.10.3+, Flutter 3.38.4+.
Use the same pinned Serverpod version across all packages. Use the CLI to do the upgrade. Ask the user to start the server with serverpod start after the upgrade. NEVER update the CLI tooling, instead STOP and ask the user to do it.
serverpod version to verify that the tooling has the correct version. If not, STOP and ask the user to install the correct version (dart install serverpod_cli for latest or dart install serverpod_cli 3.x.x for specific version).dart pub upgrade in all packages.serverpod generate.serverpod create-migration.dart analyze in the root of the project and address any issues.FROM dart:3.10.3 AS build.serverpod start.After following the regular upgrade process, ensure that the following breaking changes are addressed.
Web server (Relic):
handleCall: HttpRequest → Request, Future<bool> → FutureOr<Result>, return Response.ok(...) instead of writing to responserequest.remoteIpAddress → request.remoteInfo; request.headers.value('name') → request.headers['name']AbstractWidget→WebWidget, Widget→TemplateWidget, WidgetList→ListWidget, WidgetJson→JsonWidget, WidgetRedirect→RedirectWidgetRouteStaticDirectory(...) → StaticRoute.directory(Directory(...)) with cacheControlFactorySession.request: Optional request property on Session (null for non-HTTP sessions).
Enum serialization: Default now byName. Add serialized: byIndex in YAML to keep old behavior.
Models: SerializableEntity → SerializableModel. YAML: parent=table → relation(parent=table); database → scope=serverOnly; api → !persist.
Auth: session.authenticated is now synchronous. AuthenticationInfo.authId non-nullable, userIdentifier is String. Client: authenticationKeyManager → authKeyProvider. Custom handlers receive unwrapped Bearer token.
Deprecated: Legacy streaming endpoints; use streaming methods.