postgresql

Configure PostgreSQL databases with EF Core for schema isolation and JSONB metadata.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/StuartF303/Sorcha --skill postgresql-stuartf303
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql
Source: https://github.com/StuartF303/Sorcha/tree/main/.claude/skills/postgresql
Command: npx skills add https://github.com/StuartF303/Sorcha --skill postgresql-stuartf303

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers configure and integrate PostgreSQL databases with .NET EF Core in Sorcha, delivering schema isolation, JSONB metadata handling, robust connection strategies, and smooth migrations across services.

Core Features & Use Cases

  • EF Core integration: Configure DbContext to use PostgreSQL with dedicated schemas and JSONB metadata.
  • Resilient connections: Enable retry logic and migrations history for reliable deployments.
  • Service discovery: Use Aspire to automatically inject connection strings into services.
  • Common patterns: Schema isolation, JSONB metadata, soft deletes, and optimistic concurrency.

Quick Start

Use this skill to configure wallet-db and tenant-db for Sorcha, enabling the wallet schema, JSON metadata, and retry policy; then wire up WalletService with AddNpgsqlDataSource and WithPgAdmin for development.

Frequently Asked Questions about postgresql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure PostgreSQL with EF Core for schema isolation?

Configure PostgreSQL with EF Core by setting up a DbContext with dedicated schemas and enabling Npgsql integration. This approach isolates wallet and tenant data into separate schemas, improving security and multi-tenancy management while maintaining a single database connection.

Can I use JSONB columns with EF Core migrations in PostgreSQL?

Yes. EF Core migrations fully support JSONB metadata columns in PostgreSQL through Npgsql. Define JSONB properties in your DbContext model, and migrations generate the correct column types and indexes automatically.

How do I set up resilient PostgreSQL connections with retry logic?

Enable retry policies in EF Core by configuring connection resilience through Npgsql's retry mechanism and migrations history tracking. This ensures deployments survive transient connection failures across development, staging, and production environments.

Does Aspire service discovery work with PostgreSQL connection strings?

Yes. Aspire automatically injects PostgreSQL connection strings into .NET services using service discovery. Wire up services with AddNpgsqlDataSource and PgAdmin for development, eliminating manual connection string configuration.

What PostgreSQL patterns does EF Core support for soft deletes and concurrency?

EF Core with Npgsql supports schema isolation, soft deletes via query filters, optimistic concurrency through row versioning, and JSONB metadata storage. These patterns enable robust multi-tenant and versioned data models.