Expand description
drizzle import: ports a TypeScript drizzle-orm project by writing the
Rust schema from its drizzle-kit migration snapshots.
drizzle-kit already serializes the TypeScript schema into each migration’s
snapshot, so no TypeScript is read. The newest snapshot is upgraded in
memory to the current format (the same chain drizzle up runs) and
written as Rust with the codegen behind drizzle introspect.
Accepted inputs:
- a drizzle-kit
outfolder in the folder layout (<tag>/migration.sql+<tag>/snapshot.json): the last folder wins; - a folder in the older journal layout (
NNNN_tag.sql+meta/_journal.json+meta/NNNN_snapshot.json): the last journal entry’s snapshot wins; - a single
snapshot.jsonfile.
The migration files are left where they are unless --upgrade is given.
Structs§
Functions§
- run
- Runs
drizzle import(see the module docs).