page:guides:asp net core:schema changes

Apply Database Schema Changes for ASP.NET Core

Summary

Schema changes for an ASP.NET Core app on Ample. Verified on ASP.NET Core: a --release-command migration ran before activation and its marker was readable by the live app (migrated=release-ok). Build and start: dotnet publish -c Release -o out in the builder, then dotnet .dll on the dotnet-10 template with ASPNETCORE_URLS bound to PORT.

Resource Requirements

Infrastructure Requirements

Prerequisites

Workload

Build and Start

dotnet publish -c Release -o out in the builder, then dotnet .dll on the dotnet-10 template with ASPNETCORE_URLS bound to PORT; the server must bind 0.0.0.0 on PORT.

Run Migrations as the Release Command

Ample runs the command before activation and fails the release if it exits non-zero; keep migrations idempotent.

ample deploy . --name <app_name> --public --release-command "python3 migrate.py"

Verify

Fetch the live URL and /p/migrated on the example; on failure read the build and runtime logs.

ample logs <app_name> --kind build

Limitations

Success Checks

  1. App responds on its public URL.

    • Kind: http_get
    • Path: /
    • Expect: "ample canary asp net core patterns"
  2. Migrated check from the example.

    • Kind: http_get
    • Path: /p/migrated
    • Expect: "see the pattern fixture checks"

Cost Estimate

Examples

ASP.NET Core Pattern Fixture

Next Actions