diff --git a/CHANGELOG.md b/CHANGELOG.md index 6514d13df..9bb034498 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### House keeping * Fix typos https://github.com/SeaQL/sea-orm/pull/2360 +* Update documentations https://github.com/SeaQL/sea-orm/pull/2345 ## 1.0.1 - 2024-08-26 diff --git a/sea-orm-macros/src/derives/entity_model.rs b/sea-orm-macros/src/derives/entity_model.rs index 7fa03c76c..7070ac9d4 100644 --- a/sea-orm-macros/src/derives/entity_model.rs +++ b/sea-orm-macros/src/derives/entity_model.rs @@ -125,7 +125,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> syn::Res let mut enum_name = None; let mut is_primary_key = false; - // search for #[sea_orm(primary_key, auto_increment = false, column_type = "String(Some(255))", default_value = "new user", default_expr = "gen_random_uuid()", column_name = "name", enum_name = "Name", nullable, indexed, unique)] + // search for #[sea_orm(primary_key, auto_increment = false, column_type = "String(StringLen::N(255))", default_value = "new user", default_expr = "gen_random_uuid()", column_name = "name", enum_name = "Name", nullable, indexed, unique)] for attr in field.attrs.iter() { if !attr.path().is_ident("sea_orm") { continue; diff --git a/sea-orm-macros/src/lib.rs b/sea-orm-macros/src/lib.rs index 0c9d11a00..708958495 100644 --- a/sea-orm-macros/src/lib.rs +++ b/sea-orm-macros/src/lib.rs @@ -540,11 +540,11 @@ pub fn derive_active_model_behavior(input: TokenStream) -> TokenStream { /// - Possible values: `String`, `i8`, `i16`, `i32`, `i64`, `u8`, `u16`, `u32`, `u64` /// - Note that value has to be passed as string, i.e. `rs_type = "i8"` /// - `db_type`: Define `ColumnType` returned by `ActiveEnum::db_type()` -/// - Possible values: all available enum variants of `ColumnType`, e.g. `String(None)`, `String(Some(1))`, `Integer` +/// - Possible values: all available enum variants of `ColumnType`, e.g. `String(StringLen::None)`, `String(StringLen::N(1))`, `Integer` /// - Note that value has to be passed as string, i.e. `db_type = "Integer"` /// - `enum_name`: Define `String` returned by `ActiveEnum::name()` /// - This attribute is optional with default value being the name of enum in camel-case -/// - Note that value has to be passed as string, i.e. `db_type = "Integer"` +/// - Note that value has to be passed as string, i.e. `enum_name = "MyEnum"` /// /// - For enum variant /// - `string_value` or `num_value`: