Expand description
Interactive schema builder (drizzle new)
Walks the user through an interactive wizard to define tables, columns,
indexes, and foreign keys, then generates Rust schema code using the
existing codegen pipeline (the same one drizzle introspect uses).
Supports JSON import/export for CI-friendly, reproducible schema generation:
drizzle new --jsonreads a JSON schema definition from stdindrizzle new --json --from file.jsonreads from a filedrizzle new --export-json out.jsonexports the schema as JSONdrizzle new --schema-helpprints the expected JSON shape
Structs§
- Column
Def - A column definition.
- EnumDef
- An enum type: name and labels.
- Foreign
KeyDef - A foreign-key definition.
- Index
Def - An index definition.
- NewOptions
- Schema
Definition - The JSON document
drizzle new --jsonreads and--export-jsonwrites. - Table
Def - A table definition.
Enums§
- Auto
GenKind - Auto-generation strategy for a column value.
- Field
Casing - Casing of generated Rust field names.
Functions§
- run
- Runs
drizzle new: builds aSchemaDefinitionfrom prompts or JSON, validates it, and writes the generated Rust schema file (--schema, else the definition’soutput_path).