Skip to main content

Module new

Module new 

Source
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 --json reads a JSON schema definition from stdin
  • drizzle new --json --from file.json reads from a file
  • drizzle new --export-json out.json exports the schema as JSON
  • drizzle new --schema-help prints the expected JSON shape

Structs§

ColumnDef
EnumDef
ForeignKeyDef
IndexDef
NewOptions
SchemaDefinition
TableDef

Enums§

AutoGenKind
Auto-generation strategy for a column value.
FieldCasing

Functions§

run
Run the new command to scaffold a schema definition.