Merge pull request #5 from keithamus/upgrade-to-sea-orm-0-12-and-fix-code
upgrade to sea-orm 0.12 and fix code
This commit is contained in:
commit
defe9cdd90
@ -28,19 +28,19 @@ chrono = "0.4.26"
|
||||
tera = "^1.19.0"
|
||||
async-trait = "^0.1.68"
|
||||
lazy_static = "^1.4.0"
|
||||
itertools = "^0.10.5"
|
||||
itertools = "^0.11.0"
|
||||
serde = "^1.0.164"
|
||||
serde_derive = "^1.0.164"
|
||||
sea-orm = { version = "^0.11.3", features = [], default-features = false }
|
||||
sea-orm = { version = "^0.12.2", features = [], default-features = false }
|
||||
actix-admin-macros = { version = "0.5.0", path = "actix_admin_macros" }
|
||||
derive_more = "0.99.17"
|
||||
regex = "1.8.4"
|
||||
urlencoding = "2.1.2"
|
||||
|
||||
[dev-dependencies]
|
||||
sea-orm = { version = "^0.11.3", features = [ "sqlx-sqlite", "runtime-actix-native-tls", "macros" ], default-features = true }
|
||||
sea-orm = { version = "^0.12.2", features = [ "sqlx-sqlite", "runtime-actix-native-tls", "macros" ], default-features = true }
|
||||
actix-rt = "2.8.0"
|
||||
azure_auth = { path = "./examples/azure_auth/azure_auth" }
|
||||
oauth2 = "4.4.1"
|
||||
dotenv = "0.15"
|
||||
actix-session = { version = "0.7.2", features = ["cookie-session"] }
|
||||
actix-session = { version = "0.7.2", features = ["cookie-session"] }
|
||||
|
@ -187,7 +187,7 @@ pub fn get_actix_admin_fields_searchable(fields: &Vec<ModelField>) -> Vec<TokenS
|
||||
let column_name = capitalize_first_letter(&model_field.ident.to_string());
|
||||
let column_ident = Ident::new(&column_name, Span::call_site());
|
||||
quote! {
|
||||
.add(Column::#column_ident.contains(&search))
|
||||
.add(Column::#column_ident.contains(search))
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
@ -46,7 +46,7 @@ impl Related<super::comment::Entity> for Entity {
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Deserialize, Serialize, DeriveActixAdminEnumSelectList)]
|
||||
#[derive(Debug, Clone, PartialEq, EnumIter, DeriveDisplay, DeriveActiveEnum, Deserialize, Serialize, DeriveActixAdminEnumSelectList)]
|
||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "tea")]
|
||||
pub enum Tea {
|
||||
#[sea_orm(string_value = "EverydayTea")]
|
||||
@ -69,4 +69,4 @@ impl FromStr for Tea {
|
||||
|
||||
impl ActixAdminModelValidationTrait<ActiveModel> for Entity {}
|
||||
|
||||
impl ActixAdminModelFilterTrait<Entity> for Entity {}
|
||||
impl ActixAdminModelFilterTrait<Entity> for Entity {}
|
||||
|
@ -51,7 +51,7 @@ impl Related<super::comment::Entity> for Entity {
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Deserialize, Serialize, DeriveActixAdminEnumSelectList)]
|
||||
#[derive(Debug, Clone, PartialEq, EnumIter, DeriveDisplay, DeriveActiveEnum, Deserialize, Serialize, DeriveActixAdminEnumSelectList)]
|
||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "tea")]
|
||||
pub enum Tea {
|
||||
#[sea_orm(string_value = "EverydayTea")]
|
||||
@ -74,4 +74,4 @@ impl FromStr for Tea {
|
||||
|
||||
impl ActixAdminModelValidationTrait<ActiveModel> for Entity {}
|
||||
|
||||
impl ActixAdminModelFilterTrait<Entity> for Entity {}
|
||||
impl ActixAdminModelFilterTrait<Entity> for Entity {}
|
||||
|
@ -398,4 +398,4 @@ impl ActixAdminBuilderTrait for ActixAdminBuilder {
|
||||
fn get_actix_admin(&self) -> ActixAdmin {
|
||||
self.actix_admin.clone()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ impl Related<super::comment::Entity> for Entity {
|
||||
|
||||
impl ActiveModelBehavior for ActiveModel {}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, EnumIter, DeriveActiveEnum, Deserialize, Serialize, DeriveActixAdminEnumSelectList)]
|
||||
#[derive(Debug, Clone, PartialEq, EnumIter, DeriveDisplay, DeriveActiveEnum, Deserialize, Serialize, DeriveActixAdminEnumSelectList)]
|
||||
#[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "tea")]
|
||||
pub enum Tea {
|
||||
#[sea_orm(string_value = "EverydayTea")]
|
||||
@ -69,4 +69,4 @@ impl FromStr for Tea {
|
||||
|
||||
impl ActixAdminModelValidationTrait<ActiveModel> for Entity {}
|
||||
|
||||
impl ActixAdminModelFilterTrait<Entity> for Entity {}
|
||||
impl ActixAdminModelFilterTrait<Entity> for Entity {}
|
||||
|
Loading…
Reference in New Issue
Block a user