diff --git a/src/entity/column.rs b/src/entity/column.rs index 599d87d70..491c6b154 100644 --- a/src/entity/column.rs +++ b/src/entity/column.rs @@ -403,6 +403,11 @@ impl ColumnDef { pub fn is_null(&self) -> bool { self.null } + + /// Returns true if the column is unique + pub fn is_unique(&self) -> bool { + self.unique + } } struct Text;