TechIn.StatusPage.UI.Storage.MySQL 1.2.0

dotnet add package TechIn.StatusPage.UI.Storage.MySQL --version 1.2.0
                    
NuGet\Install-Package TechIn.StatusPage.UI.Storage.MySQL -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TechIn.StatusPage.UI.Storage.MySQL" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TechIn.StatusPage.UI.Storage.MySQL" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="TechIn.StatusPage.UI.Storage.MySQL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TechIn.StatusPage.UI.Storage.MySQL --version 1.2.0
                    
#r "nuget: TechIn.StatusPage.UI.Storage.MySQL, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TechIn.StatusPage.UI.Storage.MySQL@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TechIn.StatusPage.UI.Storage.MySQL&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=TechIn.StatusPage.UI.Storage.MySQL&version=1.2.0
                    
Install as a Cake Tool

TechIn.StatusPage.UI.Storage.MySQL

MySQL storage provider for TechIn.StatusPage. Persists health-check snapshots to a MySQL database using Entity Framework Core and the official Oracle MySQL connector.

Installation

dotnet add package TechIn.StatusPage.UI.Storage.MySQL

Usage

builder.Services
    .AddStatusPage(o => o.HistoryRetentionDays = 90)
    .AddMySqlStorage(builder.Configuration.GetConnectionString("StatusPage")!);

That's it. The provider will automatically apply EF Core migrations on startup and begin persisting snapshots.

Connection String

{
  "ConnectionStrings": {
    "StatusPage": "Server=localhost;Port=3306;Database=statuspage;User=app;Password=secret;"
  }
}

What It Registers

Service Lifetime Description
IDbContextFactory<StatusPageDbContext> Singleton Configured with MySql.EntityFrameworkCore
IStatusRepository Scoped EF Core implementation with ExecuteDeleteAsync for efficient purge
DatabaseMigrationHostedService Hosted Applies pending migrations at startup

Database Schema

MySQL does not support schemas, so tables are created directly in the target database:

snapshots
├── id              bigint (PK, auto-increment)
├── service_name    varchar(256)
├── status          varchar(32)     — Operational, Degraded, Down
├── timestamp       datetime(6)
├── latency         time(6)         — nullable
└── description     varchar(2048)   — nullable

Indexes

  • ix_snapshots_service_name — filter by service
  • ix_snapshots_service_name_timestamp — date-range queries per service
  • ix_snapshots_timestamp — purge operations

Manual Migration

If you prefer not to run migrations automatically, you can apply them via CLI:

dotnet ef database update \
  --project src/TechIn.StatusPage.UI.Storage.MySQL \
  --framework net8.0

Docker (for local development)

docker run -d \
  --name statuspage-mysql \
  -e MYSQL_ROOT_PASSWORD=root \
  -e MYSQL_DATABASE=statuspage \
  -p 3306:3306 \
  mysql:8

Requirements

  • MySQL 8.0 or later
  • .NET 8.0 or 9.0

Custom Repository

If you need a different storage backend, implement IStatusRepository and register it:

builder.Services
    .AddStatusPage()
    .UseStatusRepository<YourCustomRepository>(ServiceLifetime.Scoped);

License

MIT — see LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 116 2/25/2026