diff --git a/sea-orm-codegen/src/entity/base_entity.rs b/sea-orm-codegen/src/entity/base_entity.rs index c6d24c4f9..f261f22e4 100644 --- a/sea-orm-codegen/src/entity/base_entity.rs +++ b/sea-orm-codegen/src/entity/base_entity.rs @@ -15,14 +15,9 @@ pub struct Entity { pub(crate) relations: Vec, pub(crate) conjunct_relations: Vec, pub(crate) primary_keys: Vec, - pub(crate) comment: Option, } impl Entity { - pub fn get_table_comment(&self) -> Option<&String> { - self.comment.as_ref() - } - pub fn get_table_name_snake_case(&self) -> String { self.table_name.to_snake_case() } @@ -323,7 +318,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, } } diff --git a/sea-orm-codegen/src/entity/transformer.rs b/sea-orm-codegen/src/entity/transformer.rs index 40401611f..20f8047cb 100644 --- a/sea-orm-codegen/src/entity/transformer.rs +++ b/sea-orm-codegen/src/entity/transformer.rs @@ -117,14 +117,12 @@ impl EntityTransformer { .collect::>() }), ); - let comment = table_create.get_comment().cloned(); let entity = Entity { table_name: table_name.clone(), columns, relations: relations.clone(), conjunct_relations: vec![], primary_keys, - comment, }; entities.insert(table_name.clone(), entity.clone()); for mut rel in relations.into_iter() { diff --git a/sea-orm-codegen/src/entity/writer.rs b/sea-orm-codegen/src/entity/writer.rs index 678964f0a..099a96797 100644 --- a/sea-orm-codegen/src/entity/writer.rs +++ b/sea-orm-codegen/src/entity/writer.rs @@ -785,7 +785,6 @@ impl EntityWriter { }, None => quote! {}, }; - let extra_derive = with_serde.extra_derive(); quote! { @@ -883,11 +882,9 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "_cake_filling_".to_owned(), - comment: None, columns: vec![ Column { name: "cake_id".to_owned(), @@ -983,7 +980,6 @@ mod tests { name: "filling_id".to_owned(), }, ], - comment: None, }, Entity { table_name: "filling".to_owned(), @@ -1011,7 +1007,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "fruit".to_owned(), @@ -1066,7 +1061,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "vendor".to_owned(), @@ -1108,7 +1102,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "rust_keyword".to_owned(), @@ -1266,7 +1259,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "cake_with_float".to_owned(), @@ -1311,7 +1303,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "cake_with_double".to_owned(), @@ -1356,7 +1347,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "collection".to_owned(), @@ -1388,7 +1378,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, Entity { table_name: "collection_float".to_owned(), @@ -1420,7 +1409,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, ] } @@ -1782,7 +1770,6 @@ mod tests { fn test_gen_with_seaography() -> io::Result<()> { let cake_entity = Entity { table_name: "cake".to_owned(), - comment: None, columns: vec![ Column { name: "id".to_owned(), @@ -2238,7 +2225,6 @@ mod tests { primary_keys: vec![PrimaryKey { name: "id".to_owned(), }], - comment: None, }, ]; const ENTITY_FILES: [&str; 1] = [include_str!("../../tests/postgres/binary_json.rs")]; @@ -2322,7 +2308,6 @@ mod tests { let entities = vec![ Entity { table_name: "tea_pairing".to_owned(), - comment: None, columns: vec![ Column { name: "id".to_owned(), @@ -2366,7 +2351,6 @@ mod tests { }, Entity { table_name: "tea_pairing_with_size".to_owned(), - comment: None, columns: vec![ Column { name: "id".to_owned(),