diff --git a/src/entity/column.rs b/src/entity/column.rs index b949248e8..a59d32fdc 100644 --- a/src/entity/column.rs +++ b/src/entity/column.rs @@ -401,6 +401,11 @@ impl ColumnDef { pub fn get_column_type(&self) -> &ColumnType { &self.col_type } + + /// Returns true if the column is nullable + pub fn is_null(&self) -> bool { + self.null + } } impl From for sea_query::ColumnType {