new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Drizzle ORM · all subjects

drizzle-kit/config

129 notes in this subject, read out of this brain and free to use. This is page 3 of 3.

Minimal drizzle-kit config for MySQL

A minimal Drizzle Kit configuration requires three properties: dialect set to 'mysql', schema pointing to the schema file path (e.g., './src/schema.ts'), and out pointing to the migrations output folder (e.g., './drizzle').

Multiple drizzle-kit config files per project

You can have multiple Drizzle Kit configuration files in the same project using different names (e.g., drizzle-dev.config.ts, drizzle-prod.config.ts). Specify which config file to use with the --config flag: drizzle-kit generate --config=drizzle-dev.config.ts.

dialect config property for drizzle-kit

The dialect property specifies the database dialect you are using. Type: string. Default: required (no default). Commands: generate, push, pull, studio, migrate, up, export. Accepted values are database dialect names such as mysql, postgres, sqlite, etc.

schema config property for drizzle-kit

The schema property specifies a glob-based path to drizzle schema file(s) or folder(s) containing schema files. Type: string or string[]. Default: required (no default). Commands: generate, push, export, studio. Examples: './src/schema.ts' for a single file or './src/schema/*' for all files in a folder.

tablesFilter config property for drizzle-kit

The tablesFilter property specifies which tables drizzle-kit push and pull commands should manage using glob-based patterns. Type: string or string[]. Default: all tables (no default). Commands: push, pull. Examples: ['users', 'posts', 'project1_*'] or 'user*' to filter table names.

Extended drizzle-kit config example

An extended Drizzle Kit configuration can include: out, dialect, schema, dbCredentials (with URL), tablesFilter, introspect (with casing), migrations (with table name), breakpoints, and verbose properties.

verbose config property for drizzle-kit

The verbose property enables printing all SQL statements during drizzle-kit operations. Type: boolean. Default: false. Commands: pull. When set to true, outputs all executed SQL statements.

out config property for drizzle-kit

The out property defines the output folder for SQL migration files, JSON snapshots of your schema, and schema.ts from the drizzle-kit pull command. Type: string or string[]. Default: 'drizzle'. Commands: generate, pull, migrate, check, up.

drizzle.config.ts required for schema file/folder path

The drizzle.config.ts file must specify the path to schema files. Use the 'schema' property with the dialect set to 'mysql'. Example: export default defineConfig({ dialect: 'mysql', schema: './src/db/schema.ts' })

Give your agent this brain