Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

PostgresDatabaseResource.WithCreationScript

Method
📦 Aspire.Hosting.PostgreSQL v17.0.0
type PostgresDatabaseResource interface {
// ... omitted for brevity
WithCreationScript(script string) PostgresDatabaseResource
}

Signature

methodWithCreationScriptbuilder
Defines the SQL script used to create the database.
WithCreationScript(script string) PostgresDatabaseResource
scriptstringThe SQL script used to create the database.
PostgresDatabaseResource

The resource builder.

Returns a handle; failures surface later via Err().

Defined on

This method is defined on the following type: