wip: doctor/cli/docs/api to vector db consolidation; api hardening for descriptions, tenant, and scopes; migrations and conversions of all DALs to EF v10
This commit is contained in:
@@ -19,8 +19,8 @@ AirGap manages sealed knowledge snapshot export and import for offline/air-gappe
|
||||
**Libraries:**
|
||||
- `StellaOps.AirGap.Policy` - Staleness policy evaluation
|
||||
- `StellaOps.AirGap.Time` - Time anchor validation and trust
|
||||
- `StellaOps.AirGap.Storage.Postgres` - PostgreSQL storage for snapshots
|
||||
- `StellaOps.AirGap.Storage.Postgres.Tests` - Storage integration tests
|
||||
- `StellaOps.AirGap.Persistence` - PostgreSQL persistence (EF Core v10)
|
||||
- `StellaOps.AirGap.Persistence.Tests` - Persistence integration tests
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -33,6 +33,45 @@ Key settings:
|
||||
- PostgreSQL connection (schema: `airgap`)
|
||||
- Export/import paths and validation rules
|
||||
|
||||
## EF Core Persistence Workflow
|
||||
|
||||
AirGap persistence now uses EF Core v10 models generated from the module migration schema.
|
||||
|
||||
Scaffold baseline context/models:
|
||||
|
||||
```bash
|
||||
dotnet ef dbcontext scaffold \
|
||||
"Host=...;Port=...;Database=...;Username=...;Password=..." \
|
||||
Npgsql.EntityFrameworkCore.PostgreSQL \
|
||||
--project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--startup-project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--schema airgap \
|
||||
--table state \
|
||||
--table bundle_versions \
|
||||
--table bundle_version_history \
|
||||
--context-dir EfCore/Context \
|
||||
--context AirGapDbContext \
|
||||
--output-dir EfCore/Models \
|
||||
--namespace StellaOps.AirGap.Persistence.EfCore.Models \
|
||||
--context-namespace StellaOps.AirGap.Persistence.EfCore.Context \
|
||||
--use-database-names
|
||||
```
|
||||
|
||||
Regenerate compiled model artifacts after model updates:
|
||||
|
||||
```bash
|
||||
dotnet ef dbcontext optimize \
|
||||
--project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--startup-project src/AirGap/__Libraries/StellaOps.AirGap.Persistence/StellaOps.AirGap.Persistence.csproj \
|
||||
--context AirGapDbContext \
|
||||
--output-dir EfCore/CompiledModels \
|
||||
--namespace StellaOps.AirGap.Persistence.EfCore.CompiledModels
|
||||
```
|
||||
|
||||
Runtime behavior:
|
||||
- The static compiled model is used explicitly for the default `airgap` schema path.
|
||||
- Non-default schemas (for integration fixtures) use runtime model construction to preserve schema isolation.
|
||||
|
||||
## Bundle manifest (v2) additions
|
||||
|
||||
- `canonicalManifestHash`: sha256 of canonical JSON for deterministic verification.
|
||||
|
||||
Reference in New Issue
Block a user