TechIn.StatusPage.UI.Storage.PostgreSQL
1.2.0
dotnet add package TechIn.StatusPage.UI.Storage.PostgreSQL --version 1.2.0
NuGet\Install-Package TechIn.StatusPage.UI.Storage.PostgreSQL -Version 1.2.0
<PackageReference Include="TechIn.StatusPage.UI.Storage.PostgreSQL" Version="1.2.0" />
<PackageVersion Include="TechIn.StatusPage.UI.Storage.PostgreSQL" Version="1.2.0" />
<PackageReference Include="TechIn.StatusPage.UI.Storage.PostgreSQL" />
paket add TechIn.StatusPage.UI.Storage.PostgreSQL --version 1.2.0
#r "nuget: TechIn.StatusPage.UI.Storage.PostgreSQL, 1.2.0"
#:package TechIn.StatusPage.UI.Storage.PostgreSQL@1.2.0
#addin nuget:?package=TechIn.StatusPage.UI.Storage.PostgreSQL&version=1.2.0
#tool nuget:?package=TechIn.StatusPage.UI.Storage.PostgreSQL&version=1.2.0
TechIn.StatusPage.UI.Storage.PostgreSQL
PostgreSQL storage provider for TechIn.StatusPage. Persists health-check snapshots to a PostgreSQL database using Entity Framework Core and Npgsql.
Installation
dotnet add package TechIn.StatusPage.UI.Storage.PostgreSQL
Usage
builder.Services
.AddStatusPage(o => o.HistoryRetentionDays = 90)
.AddPostgreSqlStorage(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": "Host=localhost;Port=5432;Database=statuspage;Username=app;Password=secret;"
}
}
What It Registers
| Service | Lifetime | Description |
|---|---|---|
IDbContextFactory<StatusPageDbContext> |
Singleton | Configured with Npgsql |
IStatusRepository |
Scoped | EF Core implementation using ExecuteDeleteAsync for efficient purge |
DatabaseMigrationHostedService |
Hosted | Applies pending migrations at startup |
Database Schema
Tables are created under the status_page schema:
status_page.snapshots
├── id bigint (PK, auto-increment)
├── service_name varchar(256)
├── status varchar(32) — Operational, Degraded, Down
├── timestamp timestamptz
├── latency interval — 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.PostgreSQL \
--framework net8.0
Requirements
- PostgreSQL 12 or later
- .NET 8.0, 9.0, or 10.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
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.0)
- TechIn.StatusPage.UI.Data (>= 1.2.0)
-
net8.0
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 8.0.11)
- TechIn.StatusPage.UI.Data (>= 1.2.0)
-
net9.0
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 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 | 112 | 2/25/2026 |