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
<PackageReference Include="TechIn.StatusPage.UI.Storage.MySQL" Version="1.2.0" />
<PackageVersion Include="TechIn.StatusPage.UI.Storage.MySQL" Version="1.2.0" />
<PackageReference Include="TechIn.StatusPage.UI.Storage.MySQL" />
paket add TechIn.StatusPage.UI.Storage.MySQL --version 1.2.0
#r "nuget: TechIn.StatusPage.UI.Storage.MySQL, 1.2.0"
#:package TechIn.StatusPage.UI.Storage.MySQL@1.2.0
#addin nuget:?package=TechIn.StatusPage.UI.Storage.MySQL&version=1.2.0
#tool nuget:?package=TechIn.StatusPage.UI.Storage.MySQL&version=1.2.0
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 serviceix_snapshots_service_name_timestamp— date-range queries per serviceix_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 | Versions 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. |
-
net10.0
- MySql.EntityFrameworkCore (>= 10.0.1)
- TechIn.StatusPage.UI.Data (>= 1.2.0)
-
net8.0
- MySql.EntityFrameworkCore (>= 8.0.22)
- TechIn.StatusPage.UI.Data (>= 1.2.0)
-
net9.0
- MySql.EntityFrameworkCore (>= 9.0.0)
- TechIn.StatusPage.UI.Data (>= 1.2.0)
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 |