I noticed the createDb was marked as deprecated, so I moved to refactor my code to support the newer syntax.
In my client I'd like to do the following:
client = await createPostgresPool();
const config: MigrateDBConfig = {
client,
ensureDatabaseExists: true,
defaultDatabase: databaseName,
};
await migrate(config, "src/data/migrations");
However, the type defined for MigrateDBConfig does not allow for ensureDatabaseExists at the same time with an existing client:
|
export type MigrateDBConfig = |
|
| (ConnectionParams & { |
|
readonly database: string |
|
} & EnsureDatabase) |
|
| ClientParams |