Skip to main content

Module config

Module config 

Source
Expand description

Loading and validating drizzle.config.toml.

A config holds either one database (top-level dialect, schema, …) or several under [databases.<name>]. Field names follow drizzle-kit, so a drizzle-kit config translates directly.

Structs§

Config
A loaded drizzle.config.toml.
DatabaseConfig
Settings for one database: the top level of a single-database config, or one [databases.<name>] table.
EntitiesFilter
The entities filter: which database entities push and pull touch.
IntrospectConfig
The [introspect] config section.
MigrationsOpts
The [migrations] config section.

Enums§

Casing
Identifier casing strategy for inferred names.
ConfigValue
A config value written inline or read from an environment variable.
ConfigValueError
Failure resolving a ConfigValue::Env reference.
Credentials
Resolved dbCredentials, with env vars read and values validated.
Dialect
The dialect config value.
Driver
The driver config value: which Rust driver the CLI connects with.
Error
Errors from loading or using a config file.
Extension
A PostgreSQL extension for extensionsFilters; its objects are skipped.
Filter
A tablesFilter / schemaFilter value: one pattern or a list.
IntrospectCasing
Casing for Rust identifiers written by introspect / pull.
MigrationPrefix
The [migrations] prefix value: how migration folder names start.
MySQLCreds
MySQL credentials. Both Rust adapters consume the same resolved shape; Driver selects the concrete connection effect later.
MySQLSslMode
MySQL TLS policy: the ssl value of host-style dbCredentials (default Disable).
PostgresCreds
PostgreSQL credentials: a URL or host fields.
PostgresSslMode
PostgreSQL TLS policy: the ssl value of host-style dbCredentials (default Disable), or the sslmode of a URL.
RolesFilter
The entities.roles filter (PostgreSQL).
Schema
The schema config value: one path/glob or a list (default src/schema.rs).

Constants§

CONFIG_FILE
Default config file name, looked up in the current directory.
DEFAULT_DB
Name given to the database of a single-database config.

Functions§

resolve_schema_patterns
Resolves schema paths and glob patterns to the files they name.