From b83b9d3e3e20885cb49afd2ce625e9afe81bdb0d Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Sun, 10 Sep 2023 10:48:31 +0100 Subject: [PATCH] Ensure `DEFAULT` clause is displayed on `DEFINE FIELD` statements (#2662) --- lib/src/sql/statements/define/field.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/src/sql/statements/define/field.rs b/lib/src/sql/statements/define/field.rs index e9014aaf..3f3e1684 100644 --- a/lib/src/sql/statements/define/field.rs +++ b/lib/src/sql/statements/define/field.rs @@ -84,6 +84,9 @@ impl Display for DefineFieldStatement { if let Some(ref v) = self.kind { write!(f, " TYPE {v}")? } + if let Some(ref v) = self.default { + write!(f, " DEFAULT {v}")? + } if let Some(ref v) = self.value { write!(f, " VALUE {v}")? }