# withCreationScript

- Module: [Aspire.Hosting.PostgreSQL](/reference/api/typescript/aspire.hosting.postgresql.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/microsoft/aspire)

Defines the SQL script used to create the database.

## Definition

```typescript
interface PostgresDatabaseResource {
  // ... omitted for brevity
  withCreationScript(script: string): PostgresDatabaseResource
}
```

## Parameters

- `script` (`string`)

## Returns

[PostgresDatabaseResource](/reference/api/typescript/aspire.hosting.postgresql/postgresdatabaseresource.md) `builder`

## Applies to

- [PostgresDatabaseResource](/reference/api/typescript/aspire.hosting.postgresql/postgresdatabaseresource.md)
