fix: default values not being converted to SQL

This commit is contained in:
Levy A. 2025-05-22 12:45:14 -03:00
parent 6945c0c09e
commit 326a8b39db
2 changed files with 8 additions and 5 deletions

View file

@ -249,6 +249,10 @@ impl BTreeTable {
sql.push_str(column.name.as_ref().expect("column name is None"));
sql.push(' ');
sql.push_str(&column.ty.to_string());
if let Some(default) = &column.default {
sql.push_str(" DEFAULT ");
sql.push_str(&default.to_string());
}
}
sql.push_str(");\n");
sql