Optional attachOptional databaseThe database name.
Environment variable: DB_DATABASE or DB_${scope}_DATABASE
Optional dialectThe dialect of the database.
Environment variable: DB_DIALECT or DB_${scope}_DIALECT
'postgres'
Optional hostThe host of the database.
Environment variable: DB_HOST or DB_${scope}_HOST
Optional kyselyThe factory function to create a Kysely dialect.
Optional kyselyThe factory function to create a Kysely instance. It will completely override the default Kysely creation mechanism.
Optional kyselyThe factory function to create a Kysely logger.
Optional kyselyThe factory function to create a Kysely migrator.
Optional loggerThe logger to use for the database connection.
Optional migrationsThe migration configuration.
Optional enabled?: booleanEnable or disable the migration feature.
true
Optional params?: Omit<MigratorProps, "db" | "provider">Parameters for the migrator.
The migration provider.
Optional onExecuted once for each created connection in pool.
Optional passwordThe password of the database.
Environment variable: DB_PASSWORD or DB_${scope}_PASSWORD
Optional pluginsThe plugins to use for the Kysely instance.
Optional portThe port of the database.
Environment variable: DB_PORT or DB_${scope}_PORT
Optional rejectIf false it will allow self-signed database certificates.
true
Optional scopeThe scope of the Kysely instance. You may have multiple instances of Kysely with different scopes.
Optional urlThe connection URL to the database.
Use this or host, port, user, password, database to connect to the database.
Environment variable: DB_CONNECTION_URL or DB_${scope}_CONNECTION_URL
Optional userThe user of the database.
Environment variable: DB_USER or DB_${scope}_USER
Try to add the commands to @silvertree/cli to manage database. If
falseit will not attach any commands. Iftrueit will try to attach the commands to the default cli scope. If a string it will try to attach the commands to the specified cli scope.