Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithCreationScript

Method
📦 Aspire.Hosting.PostgreSQL v17.0.0
func (PostgresDatabaseResource) 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().

Applies to

This method applies to the following types: