Skip to main content

translate_ddl

Function translate_ddl 

Source
pub fn translate_ddl(
    table: &str,
    cols: &[ColumnInfo],
    dst: Backend,
    pk: &[String],
) -> String
Expand description

Translate source column metadata into a CREATE TABLE IF NOT EXISTS statement for the destination backend.

When pk is non-empty, a PRIMARY KEY (...) clause is appended after the column list — this is what --preserve-pk wires up. Pass &[] for the v1 column-only DDL.