You've already forked lldap
mirror of
https://github.com/lldap/lldap.git
synced 2026-04-05 12:32:57 +01:00
dependencies: Upgrade sea-orm to 1.1.8
This commit is contained in:
committed by
nitnelave
parent
26b25e7776
commit
e4044b7415
@@ -39,8 +39,7 @@ version = "*"
|
||||
features = ["serde"]
|
||||
|
||||
[dependencies.sea-orm]
|
||||
version = "0.12"
|
||||
default-features = false
|
||||
workspace = true
|
||||
features = ["macros"]
|
||||
optional = true
|
||||
|
||||
|
||||
@@ -35,8 +35,7 @@ features = ["opaque_server", "opaque_client", "sea_orm"]
|
||||
path = "../domain"
|
||||
|
||||
[dependencies.sea-orm]
|
||||
version = "0.12"
|
||||
default-features = false
|
||||
workspace = true
|
||||
features = [
|
||||
"macros",
|
||||
"with-chrono",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! `SeaORM` Entity. Generated by sea-orm-codegen 0.10.3
|
||||
|
||||
use sea_orm::{entity::prelude::*, sea_query::BlobSize};
|
||||
use sea_orm::entity::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use lldap_domain::types::{Email, UserId, Uuid};
|
||||
@@ -47,15 +47,15 @@ impl ColumnTrait for Column {
|
||||
|
||||
fn def(&self) -> ColumnDef {
|
||||
match self {
|
||||
Column::UserId => ColumnType::String(Some(255)),
|
||||
Column::Email => ColumnType::String(Some(255)),
|
||||
Column::LowercaseEmail => ColumnType::String(Some(255)),
|
||||
Column::DisplayName => ColumnType::String(Some(255)),
|
||||
Column::UserId => ColumnType::String(StringLen::N(255)),
|
||||
Column::Email => ColumnType::String(StringLen::N(255)),
|
||||
Column::LowercaseEmail => ColumnType::String(StringLen::N(255)),
|
||||
Column::DisplayName => ColumnType::String(StringLen::N(255)),
|
||||
Column::CreationDate => ColumnType::DateTime,
|
||||
Column::PasswordHash => ColumnType::Binary(BlobSize::Medium),
|
||||
Column::TotpSecret => ColumnType::String(Some(64)),
|
||||
Column::MfaType => ColumnType::String(Some(64)),
|
||||
Column::Uuid => ColumnType::String(Some(36)),
|
||||
Column::PasswordHash => ColumnType::Blob,
|
||||
Column::TotpSecret => ColumnType::String(StringLen::N(64)),
|
||||
Column::MfaType => ColumnType::String(StringLen::N(64)),
|
||||
Column::Uuid => ColumnType::String(StringLen::N(36)),
|
||||
}
|
||||
.def()
|
||||
}
|
||||
|
||||
@@ -40,8 +40,7 @@ path = "../auth"
|
||||
features = ["opaque_server", "opaque_client", "sea_orm"]
|
||||
|
||||
[dependencies.sea-orm]
|
||||
version = "0.12"
|
||||
default-features = false
|
||||
workspace = true
|
||||
features = [
|
||||
"macros",
|
||||
"with-chrono",
|
||||
|
||||
@@ -5,7 +5,10 @@ use chrono::{NaiveDateTime, TimeZone};
|
||||
use lldap_auth::types::CaseInsensitiveString;
|
||||
use sea_orm::{
|
||||
entity::IntoActiveValue,
|
||||
sea_query::{value::ValueType, ArrayType, BlobSize, ColumnType, Nullable, ValueTypeErr},
|
||||
sea_query::{
|
||||
extension::mysql::MySqlType, value::ValueType, ArrayType, ColumnType, Nullable, SeaRc,
|
||||
StringLen, ValueTypeErr,
|
||||
},
|
||||
DbErr, DeriveValueType, QueryResult, TryFromU64, TryGetError, TryGetable, Value,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -26,7 +29,7 @@ pub use lldap_auth::types::UserId;
|
||||
derive_more::Display,
|
||||
)]
|
||||
#[serde(try_from = "&str")]
|
||||
#[sea_orm(column_type = "String(Some(36))")]
|
||||
#[sea_orm(column_type = "String(StringLen::N(36))")]
|
||||
#[debug(r#""{_0}""#)]
|
||||
#[display("{_0}")]
|
||||
pub struct Uuid(String);
|
||||
@@ -74,7 +77,10 @@ macro_rules! uuid {
|
||||
}
|
||||
|
||||
#[derive(Clone, PartialEq, Eq, Hash, Serialize, Deserialize, DeriveValueType)]
|
||||
#[sea_orm(column_type = "Binary(BlobSize::Long)", array_type = "Bytes")]
|
||||
#[sea_orm(
|
||||
column_type = "Custom(SeaRc::new(MySqlType::LongBlob))",
|
||||
array_type = "Bytes"
|
||||
)]
|
||||
pub struct Serialized(Vec<u8>);
|
||||
|
||||
const SERIALIZED_I64_LEN: usize = 8;
|
||||
@@ -308,7 +314,10 @@ impl AsRef<GroupName> for GroupName {
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Clone, Serialize, Deserialize, DeriveValueType, Hash)]
|
||||
#[sea_orm(column_type = "Binary(BlobSize::Long)", array_type = "Bytes")]
|
||||
#[sea_orm(
|
||||
column_type = "Custom(SeaRc::new(MySqlType::LongBlob))",
|
||||
array_type = "Bytes"
|
||||
)]
|
||||
pub struct JpegPhoto(#[serde(with = "serde_bytes")] Vec<u8>);
|
||||
|
||||
impl From<&JpegPhoto> for Value {
|
||||
@@ -633,7 +642,7 @@ impl ValueType for AttributeType {
|
||||
}
|
||||
|
||||
fn column_type() -> ColumnType {
|
||||
ColumnType::String(Some(64))
|
||||
ColumnType::String(StringLen::N(64))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user