microsoft / microsoft/aspire

make PostgresServerResource.AddDatabase public for extensibility

Open
#4,748 1 comment 1 reaction 0 assignees View on GitHub
area-integrations postgres
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

I have to have support for schemas in Postgres resources in my Aspire application.

I have tried to implement a `PostgresDatabaseWithSchemaResource` resource which is an exact copy of `PostgresDatabaseResource` with an optional `SchemaName` property, but ran into an issue with the extension method implementation as it calls `AddDatabase` which is internal on the server resource.

I don't know if the exposed `Databases` property is used down the line or not, but this is a blocker for custom PostgresDatabaseResource implementations.

Needing schema name is just one example that I currently need, but I can imagine a lot other usecases which involves configuration at the database level (like requiring a postgres extension) and such that would need a custom resource.

Since schemas as widely used is it possible to include it as optional property for the `PostgresDatabaseResource` beside making `AddDatabase` public ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.