From 47591ce31cafe7dd7ed843e4889c9ad68a1ffc41 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Fri, 2 Feb 2024 19:57:14 +0800 Subject: [PATCH 1/9] Adapted loco-rs/schema.rs --- sea-orm-migration/src/lib.rs | 1 + sea-orm-migration/src/schema.rs | 426 ++++++++++++++++++++++++++++++++ 2 files changed, 427 insertions(+) create mode 100644 sea-orm-migration/src/schema.rs diff --git a/sea-orm-migration/src/lib.rs b/sea-orm-migration/src/lib.rs index 2118a20d4..45e8e651c 100644 --- a/sea-orm-migration/src/lib.rs +++ b/sea-orm-migration/src/lib.rs @@ -4,6 +4,7 @@ pub mod connection; pub mod manager; pub mod migrator; pub mod prelude; +pub mod schema; pub mod seaql_migrations; pub mod util; diff --git a/sea-orm-migration/src/schema.rs b/sea-orm-migration/src/schema.rs new file mode 100644 index 000000000..8f7cab501 --- /dev/null +++ b/sea-orm-migration/src/schema.rs @@ -0,0 +1,426 @@ +//! > Adapted from https://github.com/loco-rs/loco/blob/master/src/schema.rs +//! +//! # Database Table Schema Helpers +//! +//! This module defines functions and helpers for creating database table +//! schemas using the `sea-orm` and `sea-query` libraries. +//! +//! # Example +//! +//! The following example shows how the user migration file should be and using +//! the schema helpers to create the Db fields. +//! +//! ```rust +//! use sea_orm_migration::{prelude::*, schema::*}; +//! +//! #[derive(DeriveMigrationName)] +//! pub struct Migration; +//! +//! #[async_trait::async_trait] +//! impl MigrationTrait for Migration { +//! async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { +//! let table = table_auto(Users::Table) +//! .col(&mut pk_auto(Users::Id)) // TODO: remove `&mut` after upgraded to sea-query 0.31.0 +//! .col(&mut uuid(Users::Pid)) +//! .col(&mut string_uniq(Users::Email)) +//! .col(&mut string(Users::Password)) +//! .col(&mut string(Users::Name)) +//! .col(&mut string_null(Users::ResetToken)) +//! .col(&mut timestamp_null(Users::ResetSentAt)) +//! .to_owned(); +//! manager.create_table(table).await?; +//! Ok(()) +//! } +//! +//! async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { +//! manager +//! .drop_table(Table::drop().table(Users::Table).to_owned()) +//! .await +//! } +//! } +//! +//! #[derive(Iden)] +//! pub enum Users { +//! Table, +//! Id, +//! Pid, +//! Email, +//! Name, +//! Password, +//! ResetToken, +//! ResetSentAt, +//! } +//! ``` + +use crate::{prelude::Iden, sea_query}; +use sea_orm::sea_query::{ColumnDef, Expr, IntoIden, Table, TableCreateStatement}; + +#[derive(Iden)] +enum GeneralIds { + CreatedAt, + UpdatedAt, +} + +/// Wrapping table schema creation. +pub fn table_auto(name: T) -> TableCreateStatement +where + T: IntoIden + 'static, +{ + timestamps(Table::create().table(name).if_not_exists().take()) +} + +/// Create a primary key column with auto-increment feature. +pub fn pk_auto(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name) + .integer() + .not_null() + .auto_increment() + .primary_key() + .take() +} + +/// Add timestamp columns (`CreatedAt` and `UpdatedAt`) to an existing table. +#[must_use] +pub fn timestamps(t: TableCreateStatement) -> TableCreateStatement { + let mut t = t; + t.col( + ColumnDef::new(GeneralIds::CreatedAt) + .date_time() + .not_null() + .take() + .default(Expr::current_timestamp()), + ) + .col(timestamp(GeneralIds::UpdatedAt).default(Expr::current_timestamp())); + t.take() +} + +/// Create a UUID column definition with a unique constraint. +pub fn uuid(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).unique_key().uuid().not_null().take() +} + +/// Create a UUID type column definition. +pub fn uuid_col(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).uuid().not_null().take() +} + +/// Create a nullable UUID type column definition. +pub fn uuid_col_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).uuid().take() +} + +/// Create a nullable string column definition. +pub fn string_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).string().take() +} + +/// Create a nullable timestamptz column definition. +pub fn timestamptz_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).timestamp_with_time_zone().take() +} + +/// Create a non-nullable timestamptz column definition. +pub fn timestamptz(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name) + .timestamp_with_time_zone() + .not_null() + .take() +} + +/// Create a non-nullable string column definition. +pub fn string(name: T) -> ColumnDef +where + T: IntoIden, +{ + string_null(name).not_null().take() +} + +/// Create a unique string column definition. +pub fn string_uniq(name: T) -> ColumnDef +where + T: IntoIden, +{ + string(name).unique_key().take() +} + +/// Create a nullable text column definition. +pub fn text_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).text().take() +} + +/// Create a nullable text column definition. +pub fn text(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).text().take() +} + +/// Create a nullable tiny integer column definition. +pub fn tiny_integer_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).tiny_integer().take() +} + +/// Create a non-nullable tiny integer column definition. +pub fn tiny_integer(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).tiny_integer().not_null().take() +} + +/// Create a unique tiny integer column definition. +pub fn tiny_integer_uniq(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).tiny_integer().unique_key().take() +} + +/// Create a nullable small integer column definition. +pub fn small_integer_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).small_integer().take() +} + +/// Create a non-nullable small integer column definition. +pub fn small_integer(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).small_integer().not_null().take() +} + +/// Create a unique small integer column definition. +pub fn small_integer_uniq(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).small_integer().unique_key().take() +} + +/// Create a nullable integer column definition. +pub fn integer_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).integer().take() +} + +/// Create a non-nullable integer column definition. +pub fn integer(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).integer().not_null().take() +} + +/// Create a unique integer column definition. +pub fn integer_uniq(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).integer().unique_key().take() +} + +/// Create a nullable big integer column definition. +pub fn big_integer_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).big_integer().take() +} + +/// Create a non-nullable big integer column definition. +pub fn big_integer(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).big_integer().not_null().take() +} + +/// Create a unique big integer column definition. +pub fn big_integer_uniq(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).big_integer().unique_key().take() +} + +/// Create a nullable float column definition. +pub fn float_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).float().take() +} + +/// Create a non-nullable float column definition. +pub fn float(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).float().not_null().take() +} + +/// Create a nullable double column definition. +pub fn double_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).double().take() +} + +/// Create a non-nullable double column definition. +pub fn double(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).double().not_null().take() +} + +/// Create a nullable decimal column definition. +pub fn decimal_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).decimal().take() +} + +/// Create a non-nullable decimal column definition. +pub fn decimal(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).decimal().not_null().take() +} + +/// Create a nullable decimal length column definition with custom precision and +/// scale. +pub fn decimal_len_null(name: T, precision: u32, scale: u32) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).decimal_len(precision, scale).take() +} + +/// Create a non-nullable decimal length column definition with custom precision +/// and scale. +pub fn decimal_len(name: T, precision: u32, scale: u32) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name) + .decimal_len(precision, scale) + .not_null() + .take() +} + +/// Create a nullable boolean column definition. +pub fn bool_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).boolean().take() +} + +/// Create a non-nullable boolean column definition. +pub fn bool(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).boolean().not_null().take() +} + +/// Create a nullable date column definition. +pub fn date_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).date().take() +} + +/// Create a non-nullable date column definition. +pub fn date(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).date().not_null().take() +} + +/// Create a nullable timestamp column definition. +pub fn timestamp_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).date_time().take() +} + +/// Create a non-nullable timestamp column definition. +pub fn timestamp(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).date_time().not_null().take() +} + +/// Create a non-nullable json column definition. +pub fn json(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).json().not_null().take() +} + +/// Create a nullable json column definition. +pub fn json_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).json().take() +} + +/// Create a non-nullable json binary column definition. +pub fn jsonb(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).json_binary().not_null().take() +} + +/// Create a nullable json binary column definition. +pub fn jsonb_null(name: T) -> ColumnDef +where + T: IntoIden, +{ + ColumnDef::new(name).json_binary().take() +} From f5d8535eeb6e43b989aecefe5190601e085c2e47 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 14:46:19 +0800 Subject: [PATCH 2/9] avoid `&mut ColumnDef` after upgraded to sea-query 0.31.0 --- sea-orm-migration/src/schema.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sea-orm-migration/src/schema.rs b/sea-orm-migration/src/schema.rs index 8f7cab501..5a7347c00 100644 --- a/sea-orm-migration/src/schema.rs +++ b/sea-orm-migration/src/schema.rs @@ -20,13 +20,13 @@ //! impl MigrationTrait for Migration { //! async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> { //! let table = table_auto(Users::Table) -//! .col(&mut pk_auto(Users::Id)) // TODO: remove `&mut` after upgraded to sea-query 0.31.0 -//! .col(&mut uuid(Users::Pid)) -//! .col(&mut string_uniq(Users::Email)) -//! .col(&mut string(Users::Password)) -//! .col(&mut string(Users::Name)) -//! .col(&mut string_null(Users::ResetToken)) -//! .col(&mut timestamp_null(Users::ResetSentAt)) +//! .col(pk_auto(Users::Id)) +//! .col(uuid(Users::Pid)) +//! .col(string_uniq(Users::Email)) +//! .col(string(Users::Password)) +//! .col(string(Users::Name)) +//! .col(string_null(Users::ResetToken)) +//! .col(timestamp_null(Users::ResetSentAt)) //! .to_owned(); //! manager.create_table(table).await?; //! Ok(()) From b23c39afeea116bf5c223364b46c4237c2f83452 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 16:11:28 +0800 Subject: [PATCH 3/9] refactoring --- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220101_000001_create_table.rs | 20 +++++++------------ .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../m20230101_000001_create_bakery_table.rs | 14 ++++--------- .../m20230101_000002_create_baker_table.rs | 16 +++++---------- .../src/m20230101_000003_create_cake_table.rs | 18 ++++++----------- ...20230101_000004_create_cake_baker_table.rs | 6 +++--- .../src/m20220120_000001_create_post_table.rs | 14 ++++--------- .../src/m20220101_000001_create_table.rs | 14 ++++--------- .../m20220118_000001_create_cake_table.rs | 12 +++-------- .../m20220118_000002_create_fruit_table.rs | 12 +++-------- 17 files changed, 71 insertions(+), 167 deletions(-) diff --git a/examples/actix3_example/migration/src/m20220120_000001_create_post_table.rs b/examples/actix3_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/actix3_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/actix3_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/actix_example/migration/src/m20220120_000001_create_post_table.rs b/examples/actix_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/actix_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/actix_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/axum_example/migration/src/m20220120_000001_create_post_table.rs b/examples/axum_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/axum_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/axum_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/graphql_example/migration/src/m20220101_000001_create_table.rs b/examples/graphql_example/migration/src/m20220101_000001_create_table.rs index 22d0f82d0..c42a347bc 100644 --- a/examples/graphql_example/migration/src/m20220101_000001_create_table.rs +++ b/examples/graphql_example/migration/src/m20220101_000001_create_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -9,17 +9,11 @@ impl MigrationTrait for Migration { manager .create_table( Table::create() - .table(Notes::Table) + .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Notes::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Notes::Title).string().not_null()) - .col(ColumnDef::new(Notes::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await @@ -27,13 +21,13 @@ impl MigrationTrait for Migration { async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> { manager - .drop_table(Table::drop().table(Notes::Table).to_owned()) + .drop_table(Table::drop().table(Posts::Table).to_owned()) .await } } #[derive(DeriveIden)] -enum Notes { +enum Posts { Table, Id, Title, diff --git a/examples/jsonrpsee_example/migration/src/m20220120_000001_create_post_table.rs b/examples/jsonrpsee_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/jsonrpsee_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/jsonrpsee_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/poem_example/migration/src/m20220120_000001_create_post_table.rs b/examples/poem_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/poem_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/poem_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/rocket_example/migration/src/m20220120_000001_create_post_table.rs b/examples/rocket_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/rocket_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/rocket_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/rocket_okapi_example/migration/src/m20220120_000001_create_post_table.rs b/examples/rocket_okapi_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/rocket_okapi_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/rocket_okapi_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/salvo_example/migration/src/m20220120_000001_create_post_table.rs b/examples/salvo_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/salvo_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/salvo_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/examples/seaography_example/migration/src/m20230101_000001_create_bakery_table.rs b/examples/seaography_example/migration/src/m20230101_000001_create_bakery_table.rs index efcb681aa..b6344e8a6 100644 --- a/examples/seaography_example/migration/src/m20230101_000001_create_bakery_table.rs +++ b/examples/seaography_example/migration/src/m20230101_000001_create_bakery_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -10,15 +10,9 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Bakery::Table) - .col( - ColumnDef::new(Bakery::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Bakery::Name).string().not_null()) - .col(ColumnDef::new(Bakery::ProfitMargin).double().not_null()) + .col(pk_auto(Bakery::Id)) + .col(string(Bakery::Name)) + .col(double(Bakery::ProfitMargin)) .to_owned(), ) .await diff --git a/examples/seaography_example/migration/src/m20230101_000002_create_baker_table.rs b/examples/seaography_example/migration/src/m20230101_000002_create_baker_table.rs index 44f0a88d3..8fb09530f 100644 --- a/examples/seaography_example/migration/src/m20230101_000002_create_baker_table.rs +++ b/examples/seaography_example/migration/src/m20230101_000002_create_baker_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -10,16 +10,10 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Baker::Table) - .col( - ColumnDef::new(Baker::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Baker::Name).string().not_null()) - .col(ColumnDef::new(Baker::Contact).string().not_null()) - .col(ColumnDef::new(Baker::BakeryId).integer()) + .col(pk_auto(Baker::Id)) + .col(string(Baker::Name)) + .col(string(Baker::Contact)) + .col(integer_null(Baker::BakeryId)) .foreign_key( ForeignKey::create() .name("fk-baker-bakery_id") diff --git a/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs b/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs index 33f86096a..bcd2bdf50 100644 --- a/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs +++ b/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -10,16 +10,10 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Cake::Table) - .col( - ColumnDef::new(Cake::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Cake::Name).string().not_null()) - .col(ColumnDef::new(Cake::Price).decimal_len(16, 4).not_null()) - .col(ColumnDef::new(Cake::BakeryId).integer()) + .col(pk_auto(Cake::Id)) + .col(string(Cake::Name)) + .col(decimal_len(Cake::Price, 16, 4)) + .col(integer(Cake::BakeryId)) .foreign_key( ForeignKey::create() .name("fk-cake-bakery_id") @@ -28,7 +22,7 @@ impl MigrationTrait for Migration { .on_delete(ForeignKeyAction::Cascade) .on_update(ForeignKeyAction::Cascade), ) - .col(ColumnDef::new(Cake::GlutenFree).boolean().not_null()) + .col(bool(Cake::GlutenFree)) .to_owned(), ) .await diff --git a/examples/seaography_example/migration/src/m20230101_000004_create_cake_baker_table.rs b/examples/seaography_example/migration/src/m20230101_000004_create_cake_baker_table.rs index b20926f06..27117c216 100644 --- a/examples/seaography_example/migration/src/m20230101_000004_create_cake_baker_table.rs +++ b/examples/seaography_example/migration/src/m20230101_000004_create_cake_baker_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -10,8 +10,8 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(CakeBaker::Table) - .col(ColumnDef::new(CakeBaker::CakeId).integer().not_null()) - .col(ColumnDef::new(CakeBaker::BakerId).integer().not_null()) + .col(integer(CakeBaker::CakeId)) + .col(integer(CakeBaker::BakerId)) .primary_key( Index::create() .name("pk-cake_baker") diff --git a/examples/tonic_example/migration/src/m20220120_000001_create_post_table.rs b/examples/tonic_example/migration/src/m20220120_000001_create_post_table.rs index 12c9fd7d2..c42a347bc 100644 --- a/examples/tonic_example/migration/src/m20220120_000001_create_post_table.rs +++ b/examples/tonic_example/migration/src/m20220120_000001_create_post_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -11,15 +11,9 @@ impl MigrationTrait for Migration { Table::create() .table(Posts::Table) .if_not_exists() - .col( - ColumnDef::new(Posts::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Posts::Title).string().not_null()) - .col(ColumnDef::new(Posts::Text).string().not_null()) + .col(pk_auto(Posts::Id)) + .col(string(Posts::Title)) + .col(string(Posts::Text)) .to_owned(), ) .await diff --git a/sea-orm-cli/template/migration/src/m20220101_000001_create_table.rs b/sea-orm-cli/template/migration/src/m20220101_000001_create_table.rs index c8f2a5d16..1863d6d3c 100644 --- a/sea-orm-cli/template/migration/src/m20220101_000001_create_table.rs +++ b/sea-orm-cli/template/migration/src/m20220101_000001_create_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -14,15 +14,9 @@ impl MigrationTrait for Migration { Table::create() .table(Post::Table) .if_not_exists() - .col( - ColumnDef::new(Post::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Post::Title).string().not_null()) - .col(ColumnDef::new(Post::Text).string().not_null()) + .col(pk_auto(Post::Id)) + .col(string(Post::Title)) + .col(string(Post::Text)) .to_owned(), ) .await diff --git a/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs b/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs index ea733f8c2..4aab3645f 100644 --- a/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs +++ b/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -10,14 +10,8 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Cake::Table) - .col( - ColumnDef::new(Cake::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Cake::Name).string().not_null()) + .col(pk_auto(Cake::Id)) + .col(string(Cake::Name)) .to_owned(), ) .await?; diff --git a/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs b/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs index 4b9ceb458..a2d8d4c60 100644 --- a/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs +++ b/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs @@ -12,15 +12,9 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Fruit::Table) - .col( - ColumnDef::new(Fruit::Id) - .integer() - .not_null() - .auto_increment() - .primary_key(), - ) - .col(ColumnDef::new(Fruit::Name).string().not_null()) - .col(ColumnDef::new(Fruit::CakeId).integer().not_null()) + .col(pk_auto(Fruit::Id)) + .col(string(Fruit::Name)) + .col(integer(Fruit::CakeId)) .foreign_key( ForeignKey::create() .name("fk-fruit-cake_id") From 38cf696810301f9e8e962890c813cb051e42031a Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 16:11:36 +0800 Subject: [PATCH 4/9] rewrite schema.rs --- sea-orm-migration/src/schema.rs | 684 +++++++++++++++++++------------- 1 file changed, 414 insertions(+), 270 deletions(-) diff --git a/sea-orm-migration/src/schema.rs b/sea-orm-migration/src/schema.rs index 5a7347c00..d9a1011fc 100644 --- a/sea-orm-migration/src/schema.rs +++ b/sea-orm-migration/src/schema.rs @@ -53,7 +53,7 @@ //! ``` use crate::{prelude::Iden, sea_query}; -use sea_orm::sea_query::{ColumnDef, Expr, IntoIden, Table, TableCreateStatement}; +use sea_orm::sea_query::{Alias, ColumnDef, Expr, IntoIden, Table, TableCreateStatement, PgInterval, ColumnType}; #[derive(Iden)] enum GeneralIds { @@ -61,366 +61,510 @@ enum GeneralIds { UpdatedAt, } -/// Wrapping table schema creation. -pub fn table_auto(name: T) -> TableCreateStatement -where - T: IntoIden + 'static, -{ +/// Wrapping table schema creation. +pub fn table_auto(name: T) -> TableCreateStatement { timestamps(Table::create().table(name).if_not_exists().take()) } /// Create a primary key column with auto-increment feature. -pub fn pk_auto(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name) - .integer() - .not_null() +pub fn pk_auto(name: T) -> ColumnDef { + integer(name) .auto_increment() .primary_key() .take() } -/// Add timestamp columns (`CreatedAt` and `UpdatedAt`) to an existing table. -#[must_use] -pub fn timestamps(t: TableCreateStatement) -> TableCreateStatement { - let mut t = t; - t.col( - ColumnDef::new(GeneralIds::CreatedAt) - .date_time() - .not_null() - .take() - .default(Expr::current_timestamp()), - ) - .col(timestamp(GeneralIds::UpdatedAt).default(Expr::current_timestamp())); - t.take() -} - -/// Create a UUID column definition with a unique constraint. -pub fn uuid(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).unique_key().uuid().not_null().take() +pub fn char_len(col: T, length: u32) -> ColumnDef { + char_len_null(col, length).not_null().take() } -/// Create a UUID type column definition. -pub fn uuid_col(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).uuid().not_null().take() +pub fn char_len_null(col: T, length: u32) -> ColumnDef { + ColumnDef::new(col).char_len(length).take() } -/// Create a nullable UUID type column definition. -pub fn uuid_col_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).uuid().take() +pub fn char_len_uniq(col: T, length: u32) -> ColumnDef { + char_len(col, length).unique_key().take() } -/// Create a nullable string column definition. -pub fn string_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).string().take() +pub fn char(col: T) -> ColumnDef { + char_null(col).not_null().take() } -/// Create a nullable timestamptz column definition. -pub fn timestamptz_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).timestamp_with_time_zone().take() +pub fn char_null(col: T) -> ColumnDef { + ColumnDef::new(col).char().take() } -/// Create a non-nullable timestamptz column definition. -pub fn timestamptz(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name) - .timestamp_with_time_zone() - .not_null() - .take() +pub fn char_uniq(col: T) -> ColumnDef { + char(col).unique_key().take() } -/// Create a non-nullable string column definition. -pub fn string(name: T) -> ColumnDef -where - T: IntoIden, -{ - string_null(name).not_null().take() +pub fn string_len(col: T, length: u32) -> ColumnDef { + string_len_null(col, length).not_null().take() } -/// Create a unique string column definition. -pub fn string_uniq(name: T) -> ColumnDef -where - T: IntoIden, -{ - string(name).unique_key().take() +pub fn string_len_null(col: T, length: u32) -> ColumnDef { + ColumnDef::new(col).string_len(length).take() } -/// Create a nullable text column definition. -pub fn text_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).text().take() +pub fn string_len_uniq(col: T, length: u32) -> ColumnDef { + string_len(col, length).unique_key().take() } -/// Create a nullable text column definition. -pub fn text(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).text().take() +pub fn string(col: T) -> ColumnDef { + string_null(col).not_null().take() } -/// Create a nullable tiny integer column definition. -pub fn tiny_integer_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).tiny_integer().take() +pub fn string_null(col: T) -> ColumnDef { + ColumnDef::new(col).string().take() } -/// Create a non-nullable tiny integer column definition. -pub fn tiny_integer(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).tiny_integer().not_null().take() +pub fn string_uniq(col: T) -> ColumnDef { + string(col).unique_key().take() } -/// Create a unique tiny integer column definition. -pub fn tiny_integer_uniq(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).tiny_integer().unique_key().take() +pub fn text(col: T) -> ColumnDef { + text_null(col).not_null().take() } -/// Create a nullable small integer column definition. -pub fn small_integer_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).small_integer().take() +pub fn text_null(col: T) -> ColumnDef { + ColumnDef::new(col).text().take() } -/// Create a non-nullable small integer column definition. -pub fn small_integer(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).small_integer().not_null().take() +pub fn text_uniq(col: T) -> ColumnDef { + text(col).unique_key().take() } -/// Create a unique small integer column definition. -pub fn small_integer_uniq(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).small_integer().unique_key().take() +pub fn tiny_integer(col: T) -> ColumnDef { + tiny_integer_null(col).not_null().take() } -/// Create a nullable integer column definition. -pub fn integer_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).integer().take() +pub fn tiny_integer_null(col: T) -> ColumnDef { + ColumnDef::new(col).tiny_integer().take() } -/// Create a non-nullable integer column definition. -pub fn integer(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).integer().not_null().take() +pub fn tiny_integer_uniq(col: T) -> ColumnDef { + tiny_integer(col).unique_key().take() } -/// Create a unique integer column definition. -pub fn integer_uniq(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).integer().unique_key().take() +pub fn small_integer(col: T) -> ColumnDef { + small_integer_null(col).not_null().take() } -/// Create a nullable big integer column definition. -pub fn big_integer_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).big_integer().take() +pub fn small_integer_null(col: T) -> ColumnDef { + ColumnDef::new(col).small_integer().take() } -/// Create a non-nullable big integer column definition. -pub fn big_integer(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).big_integer().not_null().take() +pub fn small_integer_uniq(col: T) -> ColumnDef { + small_integer(col).unique_key().take() } -/// Create a unique big integer column definition. -pub fn big_integer_uniq(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).big_integer().unique_key().take() +pub fn integer(col: T) -> ColumnDef { + integer_null(col).not_null().take() } -/// Create a nullable float column definition. -pub fn float_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).float().take() +pub fn integer_null(col: T) -> ColumnDef { + ColumnDef::new(col).integer().take() } -/// Create a non-nullable float column definition. -pub fn float(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).float().not_null().take() +pub fn integer_uniq(col: T) -> ColumnDef { + integer(col).unique_key().take() } -/// Create a nullable double column definition. -pub fn double_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).double().take() +pub fn big_integer(col: T) -> ColumnDef { + big_integer_null(col).not_null().take() } -/// Create a non-nullable double column definition. -pub fn double(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).double().not_null().take() +pub fn big_integer_null(col: T) -> ColumnDef { + ColumnDef::new(col).big_integer().take() } -/// Create a nullable decimal column definition. -pub fn decimal_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).decimal().take() +pub fn big_integer_uniq(col: T) -> ColumnDef { + big_integer(col).unique_key().take() } -/// Create a non-nullable decimal column definition. -pub fn decimal(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).decimal().not_null().take() +pub fn tiny_unsigned(col: T) -> ColumnDef { + tiny_unsigned_null(col).not_null().take() } -/// Create a nullable decimal length column definition with custom precision and -/// scale. -pub fn decimal_len_null(name: T, precision: u32, scale: u32) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).decimal_len(precision, scale).take() +pub fn tiny_unsigned_null(col: T) -> ColumnDef { + ColumnDef::new(col).tiny_unsigned().take() } -/// Create a non-nullable decimal length column definition with custom precision -/// and scale. -pub fn decimal_len(name: T, precision: u32, scale: u32) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name) - .decimal_len(precision, scale) - .not_null() - .take() +pub fn tiny_unsigned_uniq(col: T) -> ColumnDef { + tiny_unsigned(col).unique_key().take() } -/// Create a nullable boolean column definition. -pub fn bool_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).boolean().take() +pub fn small_unsigned(col: T) -> ColumnDef { + small_unsigned_null(col).not_null().take() } -/// Create a non-nullable boolean column definition. -pub fn bool(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).boolean().not_null().take() +pub fn small_unsigned_null(col: T) -> ColumnDef { + ColumnDef::new(col).small_unsigned().take() } -/// Create a nullable date column definition. -pub fn date_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).date().take() +pub fn small_unsigned_uniq(col: T) -> ColumnDef { + small_unsigned(col).unique_key().take() } -/// Create a non-nullable date column definition. -pub fn date(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).date().not_null().take() +pub fn unsigned(col: T) -> ColumnDef { + unsigned_null(col).not_null().take() } -/// Create a nullable timestamp column definition. -pub fn timestamp_null(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).date_time().take() +pub fn unsigned_null(col: T) -> ColumnDef { + ColumnDef::new(col).unsigned().take() } -/// Create a non-nullable timestamp column definition. -pub fn timestamp(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).date_time().not_null().take() +pub fn unsigned_uniq(col: T) -> ColumnDef { + unsigned(col).unique_key().take() } -/// Create a non-nullable json column definition. -pub fn json(name: T) -> ColumnDef -where - T: IntoIden, -{ - ColumnDef::new(name).json().not_null().take() +pub fn big_unsigned(col: T) -> ColumnDef { + big_unsigned_null(col).not_null().take() +} + +pub fn big_unsigned_null(col: T) -> ColumnDef { + ColumnDef::new(col).big_unsigned().take() +} + +pub fn big_unsigned_uniq(col: T) -> ColumnDef { + big_unsigned(col).unique_key().take() +} + +pub fn float(col: T) -> ColumnDef { + float_null(col).not_null().take() +} + +pub fn float_null(col: T) -> ColumnDef { + ColumnDef::new(col).float().take() +} + +pub fn float_uniq(col: T) -> ColumnDef { + float(col).unique_key().take() +} + +pub fn double(col: T) -> ColumnDef { + double_null(col).not_null().take() +} + +pub fn double_null(col: T) -> ColumnDef { + ColumnDef::new(col).double().take() +} + +pub fn double_uniq(col: T) -> ColumnDef { + double(col).unique_key().take() +} + +pub fn decimal_len(col: T, precision: u32, scale: u32) -> ColumnDef { + decimal_len_null(col, precision, scale).not_null().take() +} + +pub fn decimal_len_null(col: T, precision: u32, scale: u32) -> ColumnDef { + ColumnDef::new(col).decimal_len(precision, scale).take() +} + +pub fn decimal_len_uniq(col: T, precision: u32, scale: u32) -> ColumnDef { + decimal_len(col, precision, scale).unique_key().take() +} + +pub fn decimal(col: T) -> ColumnDef { + decimal_null(col).not_null().take() +} + +pub fn decimal_null(col: T) -> ColumnDef { + ColumnDef::new(col).decimal().take() +} + +pub fn decimal_uniq(col: T) -> ColumnDef { + decimal(col).unique_key().take() +} + +pub fn date_time(col: T) -> ColumnDef { + date_time_null(col).not_null().take() +} + +pub fn date_time_null(col: T) -> ColumnDef { + ColumnDef::new(col).date_time().take() +} + +pub fn date_time_uniq(col: T) -> ColumnDef { + date_time(col).unique_key().take() +} + +pub fn interval(col: T, fields: Option, precision: Option) -> ColumnDef { + interval_null(col, fields, precision).not_null().take() +} + +pub fn interval_null(col: T, fields: Option, precision: Option) -> ColumnDef { + ColumnDef::new(col).interval(fields, precision).take() } -/// Create a nullable json column definition. -pub fn json_null(name: T) -> ColumnDef +pub fn interval_uniq(col: T, fields: Option, precision: Option) -> ColumnDef { + interval(col, fields, precision).unique_key().take() +} + +pub fn timestamp(col: T) -> ColumnDef { + timestamp_null(col).not_null().take() +} + +pub fn timestamp_null(col: T) -> ColumnDef { + ColumnDef::new(col).timestamp().take() +} + +pub fn timestamp_uniq(col: T) -> ColumnDef { + timestamp(col).unique_key().take() +} + +pub fn timestamp_with_time_zone(col: T) -> ColumnDef { + timestamp_with_time_zone_null(col).not_null().take() +} + +pub fn timestamp_with_time_zone_null(col: T) -> ColumnDef { + ColumnDef::new(col).timestamp_with_time_zone().take() +} + +pub fn timestamp_with_time_zone_uniq(col: T) -> ColumnDef { + timestamp_with_time_zone(col).unique_key().take() +} + +pub fn time(col: T) -> ColumnDef { + time_null(col).not_null().take() +} + +pub fn time_null(col: T) -> ColumnDef { + ColumnDef::new(col).time().take() +} + +pub fn time_uniq(col: T) -> ColumnDef { + time(col).unique_key().take() +} + +pub fn date(col: T) -> ColumnDef { + date_null(col).not_null().take() +} + +pub fn date_null(col: T) -> ColumnDef { + ColumnDef::new(col).date().take() +} + +pub fn date_uniq(col: T) -> ColumnDef { + date(col).unique_key().take() +} + +pub fn year(col: T) -> ColumnDef { + year_null(col).not_null().take() +} + +pub fn year_null(col: T) -> ColumnDef { + ColumnDef::new(col).year().take() +} + +pub fn year_uniq(col: T) -> ColumnDef { + year(col).unique_key().take() +} + +pub fn binary_len(col: T, length: u32) -> ColumnDef { + binary_len_null(col, length).not_null().take() +} + +pub fn binary_len_null(col: T, length: u32) -> ColumnDef { + ColumnDef::new(col).binary_len(length).take() +} + +pub fn binary_len_uniq(col: T, length: u32) -> ColumnDef { + binary_len(col, length).unique_key().take() +} + +pub fn binary(col: T) -> ColumnDef { + binary_null(col).not_null().take() +} + +pub fn binary_null(col: T) -> ColumnDef { + ColumnDef::new(col).binary().take() +} + +pub fn binary_uniq(col: T) -> ColumnDef { + binary(col).unique_key().take() +} + +pub fn var_binary(col: T, length: u32) -> ColumnDef { + var_binary_null(col, length).not_null().take() +} + +pub fn var_binary_null(col: T, length: u32) -> ColumnDef { + ColumnDef::new(col).var_binary(length).take() +} + +pub fn var_binary_uniq(col: T, length: u32) -> ColumnDef { + var_binary(col, length).unique_key().take() +} + +pub fn bit(col: T, length: Option) -> ColumnDef { + bit_null(col, length).not_null().take() +} + +pub fn bit_null(col: T, length: Option) -> ColumnDef { + ColumnDef::new(col).bit(length).take() +} + +pub fn bit_uniq(col: T, length: Option) -> ColumnDef { + bit(col, length).unique_key().take() +} + +pub fn varbit(col: T, length: u32) -> ColumnDef { + varbit_null(col, length).not_null().take() +} + +pub fn varbit_null(col: T, length: u32) -> ColumnDef { + ColumnDef::new(col).varbit(length).take() +} + +pub fn varbit_uniq(col: T, length: u32) -> ColumnDef { + varbit(col, length).unique_key().take() +} + +pub fn blob(col: T) -> ColumnDef { + blob_null(col).not_null().take() +} + +pub fn blob_null(col: T) -> ColumnDef { + ColumnDef::new(col).blob().take() +} + +pub fn blob_uniq(col: T) -> ColumnDef { + blob(col).unique_key().take() +} + +pub fn boolean(col: T) -> ColumnDef { + boolean_null(col).not_null().take() +} + +pub fn boolean_null(col: T) -> ColumnDef { + ColumnDef::new(col).boolean().take() +} + +pub fn boolean_uniq(col: T) -> ColumnDef { + boolean(col).unique_key().take() +} + +pub fn money_len(col: T, precision: u32, scale: u32) -> ColumnDef { + money_len_null(col, precision, scale).not_null().take() +} + +pub fn money_len_null(col: T, precision: u32, scale: u32) -> ColumnDef { + ColumnDef::new(col).money_len(precision, scale).take() +} + +pub fn money_len_uniq(col: T, precision: u32, scale: u32) -> ColumnDef { + money_len(col, precision, scale).unique_key().take() +} + +pub fn money(col: T) -> ColumnDef { + money_null(col).not_null().take() +} + +pub fn money_null(col: T) -> ColumnDef { + ColumnDef::new(col).money().take() +} + +pub fn money_uniq(col: T) -> ColumnDef { + money(col).unique_key().take() +} + +pub fn json(col: T) -> ColumnDef { + json_null(col).not_null().take() +} + +pub fn json_null(col: T) -> ColumnDef { + ColumnDef::new(col).json().take() +} + +pub fn json_uniq(col: T) -> ColumnDef { + json(col).unique_key().take() +} + +pub fn json_binary(col: T) -> ColumnDef { + json_binary_null(col).not_null().take() +} + +pub fn json_binary_null(col: T) -> ColumnDef { + ColumnDef::new(col).json_binary().take() +} + +pub fn json_binary_uniq(col: T) -> ColumnDef { + json_binary(col).unique_key().take() +} + +pub fn uuid(col: T) -> ColumnDef { + uuid_null(col).not_null().take() +} + +pub fn uuid_null(col: T) -> ColumnDef { + ColumnDef::new(col).uuid().take() +} + +pub fn uuid_uniq(col: T) -> ColumnDef { + uuid(col).unique_key().take() +} + +pub fn custom(col: T, name: T) -> ColumnDef { + custom_null(col, name).not_null().take() +} + +pub fn custom_null(col: T, name: T) -> ColumnDef { + ColumnDef::new(col).custom(name).take() +} + +pub fn enumeration(col: T, name: N, variants: V) -> ColumnDef where - T: IntoIden, + T: IntoIden, + N: IntoIden, + S: IntoIden, + V: IntoIterator, { - ColumnDef::new(name).json().take() + enumeration_null(col, name, variants).not_null().take() } -/// Create a non-nullable json binary column definition. -pub fn jsonb(name: T) -> ColumnDef +pub fn enumeration_null(col: T, name: N, variants: V) -> ColumnDef where - T: IntoIden, + T: IntoIden, + N: IntoIden, + S: IntoIden, + V: IntoIterator, { - ColumnDef::new(name).json_binary().not_null().take() + ColumnDef::new(col).enumeration(name, variants).take() } -/// Create a nullable json binary column definition. -pub fn jsonb_null(name: T) -> ColumnDef +pub fn enumeration_uniq(col: T, name: N, variants: V) -> ColumnDef where - T: IntoIden, + T: IntoIden, + N: IntoIden, + S: IntoIden, + V: IntoIterator, { - ColumnDef::new(name).json_binary().take() + enumeration(col, name, variants).unique_key().take() +} + +pub fn array(col: T, elem_type: ColumnType) -> ColumnDef { + array_null(col, elem_type).not_null().take() +} + +pub fn array_null(col: T, elem_type: ColumnType) -> ColumnDef { + ColumnDef::new(col).array(elem_type).take() +} + +pub fn array_uniq(col: T, elem_type: ColumnType) -> ColumnDef { + array(col, elem_type).unique_key().take() +} + +/// Add timestamp columns (`CreatedAt` and `UpdatedAt`) to an existing table. +pub fn timestamps(t: TableCreateStatement) -> TableCreateStatement { + let mut t = t; + t.col(timestamp(GeneralIds::CreatedAt).default(Expr::current_timestamp())) + .col(timestamp(GeneralIds::UpdatedAt).default(Expr::current_timestamp())) + .take() +} + +/// Create an Alias. +pub fn name>(name: T) -> Alias { + Alias::new(name) } From a0ce850a7860facece8ad756ea7c27e4e589b59f Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 16:40:09 +0800 Subject: [PATCH 5/9] revert --- .../migration/m20220118_000001_create_cake_table.rs | 12 +++++++++--- .../migration/m20220118_000002_create_fruit_table.rs | 12 +++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs b/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs index 4aab3645f..ea733f8c2 100644 --- a/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs +++ b/sea-orm-migration/tests/common/migration/m20220118_000001_create_cake_table.rs @@ -1,4 +1,4 @@ -use sea_orm_migration::{prelude::*, schema::*}; +use sea_orm_migration::prelude::*; #[derive(DeriveMigrationName)] pub struct Migration; @@ -10,8 +10,14 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Cake::Table) - .col(pk_auto(Cake::Id)) - .col(string(Cake::Name)) + .col( + ColumnDef::new(Cake::Id) + .integer() + .not_null() + .auto_increment() + .primary_key(), + ) + .col(ColumnDef::new(Cake::Name).string().not_null()) .to_owned(), ) .await?; diff --git a/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs b/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs index a2d8d4c60..4b9ceb458 100644 --- a/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs +++ b/sea-orm-migration/tests/common/migration/m20220118_000002_create_fruit_table.rs @@ -12,9 +12,15 @@ impl MigrationTrait for Migration { .create_table( Table::create() .table(Fruit::Table) - .col(pk_auto(Fruit::Id)) - .col(string(Fruit::Name)) - .col(integer(Fruit::CakeId)) + .col( + ColumnDef::new(Fruit::Id) + .integer() + .not_null() + .auto_increment() + .primary_key(), + ) + .col(ColumnDef::new(Fruit::Name).string().not_null()) + .col(ColumnDef::new(Fruit::CakeId).integer().not_null()) .foreign_key( ForeignKey::create() .name("fk-fruit-cake_id") From 6c264721948d8c4e60fe3f88713c11c0e472e3ac Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 16:40:21 +0800 Subject: [PATCH 6/9] fmt --- sea-orm-migration/src/schema.rs | 55 ++++++++++++++++++++------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/sea-orm-migration/src/schema.rs b/sea-orm-migration/src/schema.rs index d9a1011fc..4c1d690ab 100644 --- a/sea-orm-migration/src/schema.rs +++ b/sea-orm-migration/src/schema.rs @@ -53,7 +53,9 @@ //! ``` use crate::{prelude::Iden, sea_query}; -use sea_orm::sea_query::{Alias, ColumnDef, Expr, IntoIden, Table, TableCreateStatement, PgInterval, ColumnType}; +use sea_orm::sea_query::{ + Alias, ColumnDef, ColumnType, Expr, IntoIden, PgInterval, Table, TableCreateStatement, +}; #[derive(Iden)] enum GeneralIds { @@ -68,10 +70,7 @@ pub fn table_auto(name: T) -> TableCreateStatement { /// Create a primary key column with auto-increment feature. pub fn pk_auto(name: T) -> ColumnDef { - integer(name) - .auto_increment() - .primary_key() - .take() + integer(name).auto_increment().primary_key().take() } pub fn char_len(col: T, length: u32) -> ColumnDef { @@ -290,15 +289,27 @@ pub fn date_time_uniq(col: T) -> ColumnDef { date_time(col).unique_key().take() } -pub fn interval(col: T, fields: Option, precision: Option) -> ColumnDef { +pub fn interval( + col: T, + fields: Option, + precision: Option, +) -> ColumnDef { interval_null(col, fields, precision).not_null().take() } -pub fn interval_null(col: T, fields: Option, precision: Option) -> ColumnDef { +pub fn interval_null( + col: T, + fields: Option, + precision: Option, +) -> ColumnDef { ColumnDef::new(col).interval(fields, precision).take() } -pub fn interval_uniq(col: T, fields: Option, precision: Option) -> ColumnDef { +pub fn interval_uniq( + col: T, + fields: Option, + precision: Option, +) -> ColumnDef { interval(col, fields, precision).unique_key().take() } @@ -516,30 +527,30 @@ pub fn custom_null(col: T, name: T) -> ColumnDef { pub fn enumeration(col: T, name: N, variants: V) -> ColumnDef where - T: IntoIden, - N: IntoIden, - S: IntoIden, - V: IntoIterator, + T: IntoIden, + N: IntoIden, + S: IntoIden, + V: IntoIterator, { enumeration_null(col, name, variants).not_null().take() } pub fn enumeration_null(col: T, name: N, variants: V) -> ColumnDef where - T: IntoIden, - N: IntoIden, - S: IntoIden, - V: IntoIterator, + T: IntoIden, + N: IntoIden, + S: IntoIden, + V: IntoIterator, { ColumnDef::new(col).enumeration(name, variants).take() } pub fn enumeration_uniq(col: T, name: N, variants: V) -> ColumnDef where - T: IntoIden, - N: IntoIden, - S: IntoIden, - V: IntoIterator, + T: IntoIden, + N: IntoIden, + S: IntoIden, + V: IntoIterator, { enumeration(col, name, variants).unique_key().take() } @@ -560,8 +571,8 @@ pub fn array_uniq(col: T, elem_type: ColumnType) -> ColumnDef { pub fn timestamps(t: TableCreateStatement) -> TableCreateStatement { let mut t = t; t.col(timestamp(GeneralIds::CreatedAt).default(Expr::current_timestamp())) - .col(timestamp(GeneralIds::UpdatedAt).default(Expr::current_timestamp())) - .take() + .col(timestamp(GeneralIds::UpdatedAt).default(Expr::current_timestamp())) + .take() } /// Create an Alias. From 06ee5ebce382e3f296fd9c4b5ffea54eccc9b16f Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 16:54:39 +0800 Subject: [PATCH 7/9] fix --- .../migration/src/m20230101_000003_create_cake_table.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs b/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs index bcd2bdf50..edab8203d 100644 --- a/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs +++ b/examples/seaography_example/migration/src/m20230101_000003_create_cake_table.rs @@ -22,7 +22,7 @@ impl MigrationTrait for Migration { .on_delete(ForeignKeyAction::Cascade) .on_update(ForeignKeyAction::Cascade), ) - .col(bool(Cake::GlutenFree)) + .col(boolean(Cake::GlutenFree)) .to_owned(), ) .await From a5bf4b5b7107d8acb207b446adc651b85e00b567 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 17:06:54 +0800 Subject: [PATCH 8/9] loco_example: pin loco-rs version --- examples/loco_example/Cargo.lock | 836 ++++++++++----------- examples/loco_example/Cargo.toml | 8 +- examples/loco_example/migration/Cargo.toml | 2 +- 3 files changed, 425 insertions(+), 421 deletions(-) diff --git a/examples/loco_example/Cargo.lock b/examples/loco_example/Cargo.lock index 285c50005..2dc5ff0f9 100644 --- a/examples/loco_example/Cargo.lock +++ b/examples/loco_example/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ "cfg-if", "getrandom", @@ -79,9 +79,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.5" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "2faccea4cc4ab4a667ce676a30e8ec13922a692c99bb8f5b11f1502c72e04220" [[package]] name = "anstyle-parse" @@ -127,15 +127,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "argon2" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ba4cac0a46bc1d2912652a751c47f2a9f3a7fe89bcae2275d418f5270402f9" +checksum = "3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072" dependencies = [ "base64ct", "blake2", @@ -177,7 +177,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ca33f4bc4ed1babef42cad36cc1f51fa88be00420404e5b1e80ab1b18f7678c" dependencies = [ "concurrent-queue", - "event-listener 4.0.0", + "event-listener 4.0.3", "event-listener-strategy", "futures-core", "pin-project-lite", @@ -189,11 +189,11 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "slab", ] @@ -205,10 +205,10 @@ checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ "async-channel 2.1.1", "async-executor", - "async-io 2.2.2", - "async-lock 3.2.0", + "async-io 2.3.1", + "async-lock 3.3.0", "blocking", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "once_cell", "tokio", ] @@ -235,18 +235,18 @@ dependencies = [ [[package]] name = "async-io" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afaa937395a620e33dc6a742c593c01aced20aa376ffb0f628121198578ccc7" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" dependencies = [ - "async-lock 3.2.0", + "async-lock 3.3.0", "cfg-if", "concurrent-queue", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "parking", - "polling 3.3.1", - "rustix 0.38.28", + "polling 3.3.2", + "rustix 0.38.31", "slab", "tracing", "windows-sys 0.52.0", @@ -263,11 +263,11 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7125e42787d53db9dd54261812ef17e937c95a51e4d291373b670342fa44310c" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 4.0.0", + "event-listener 4.0.3", "event-listener-strategy", "pin-project-lite", ] @@ -318,24 +318,24 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "async-task" -version = "4.5.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.74" +version = "0.1.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -388,15 +388,15 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202651474fe73c62d9e0a56c6133f7a0ff1dc1c8cf7a5b03381af2a26553ac9d" +checksum = "1236b4b292f6c4d6dc34604bb5120d85c3fe1d1aa596bd5cc52ca054d13e7b9e" dependencies = [ "async-trait", "axum-core", "bytes", "futures-util", - "http", + "http 1.0.0", "http-body", "http-body-util", "hyper", @@ -417,18 +417,19 @@ dependencies = [ "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-core" -version = "0.4.1" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77cb22c689c44d4c07b0ab44ebc25d69d8ae601a2f28fb8d672d344178fa17aa" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http", + "http 1.0.0", "http-body", "http-body-util", "mime", @@ -437,13 +438,14 @@ dependencies = [ "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-test" -version = "14.0.0" +version = "14.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ac99db40006a1a3fffeb381f2a78cb341dbc99d07b561e8bd119e22a2b1b0f" +checksum = "fc431b62ab307c833af24700936485eb5f9a8ac18a19347fe37dd4f7ae3dffe9" dependencies = [ "anyhow", "async-trait", @@ -451,12 +453,14 @@ dependencies = [ "axum", "bytes", "cookie", - "http", + "http 1.0.0", "http-body-util", "hyper", "hyper-util", + "mime", "pretty_assertions", "reserve-port", + "rust-multipart-rfc7578_2", "serde", "serde_json", "serde_urlencoded", @@ -495,9 +499,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.5" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64ct" @@ -507,9 +511,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bb8" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b4b0f25f18bcdc3ac72bdb486ed0acf7e185221fd4dc985bc15db5800b0ba2" +checksum = "df7c2093d15d6a1d33b1f972e1c5ea3177748742b97a5f392aa83a65262c6780" dependencies = [ "async-trait", "futures-channel", @@ -537,9 +541,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" dependencies = [ "serde", ] @@ -581,20 +585,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ "async-channel 2.1.1", - "async-lock 3.2.0", + "async-lock 3.3.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.1.0", + "futures-lite 2.2.0", "piper", "tracing", ] [[package]] name = "borsh" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9897ef0f1bd2362169de6d7e436ea2237dc1085d7d1e4db75f4be34d86f309d1" +checksum = "f58b559fd6448c6e2fd0adb5720cd98a2506594cafa4737ff98c396f3e82f667" dependencies = [ "borsh-derive", "cfg_aliases", @@ -602,23 +606,23 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.2.1" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478b41ff04256c5c8330f3dfdaaae2a5cc976a8e75088bafa4625b0d0208de8c" +checksum = "7aadb5b6ccbd078890f6d7003694e33816e6b784358f18e15e7e6d9f065a57cd" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", "syn_derive", ] [[package]] name = "bstr" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ "memchr", "serde", @@ -648,9 +652,9 @@ dependencies = [ [[package]] name = "bytecheck" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -659,9 +663,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" dependencies = [ "proc-macro2", "quote", @@ -691,9 +695,9 @@ dependencies = [ [[package]] name = "cargo-platform" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +checksum = "ceed8ef69d8518a5dda55c07425450b58a4e1946f4951eab6d7191ee86c2443d" dependencies = [ "serde", ] @@ -735,9 +739,9 @@ checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "9f13690e35a5e4ace198e7beea2895d29f3a9cc55015fcebe6336bd2010af9eb" dependencies = [ "android-tzdata", "iana-time-zone", @@ -745,14 +749,14 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] name = "chrono-tz" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23185c0e21df6ed832a12e2bda87c7d1def6842881fb634a8511ced741b0d76" +checksum = "91d7b79e99bfaa0d47da0687c43aa3b7381938a62ad3a6498599039321f660b7" dependencies = [ "chrono", "chrono-tz-build", @@ -782,9 +786,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" +checksum = "1e578d6ec4194633722ccf9544794b71b1385c3c027efe0c55db226fc880865c" dependencies = [ "clap_builder", "clap_derive", @@ -792,9 +796,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.11" +version = "4.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" +checksum = "4df4df40ec50c46000231c914968278b1eb05098cf8f1b3a518a95030e71d1c7" dependencies = [ "anstream", "anstyle", @@ -811,7 +815,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -861,21 +865,21 @@ dependencies = [ [[package]] name = "console" -version = "0.15.7" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", "lazy_static", "libc", - "windows-sys 0.45.0", + "windows-sys 0.52.0", ] [[package]] name = "const-oid" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "cookie" @@ -895,9 +899,9 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] @@ -930,45 +934,37 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.16" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset", ] [[package]] name = "crossbeam-queue" -version = "0.3.9" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.17" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" -dependencies = [ - "cfg-if", -] +checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" [[package]] name = "crossterm" @@ -1041,9 +1037,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1113,9 +1109,9 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "duct" -version = "0.13.6" +version = "0.13.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ae3fc31835f74c2a7ceda3aeede378b0ae2e74c8f1c36559fcc9ae2a4e7d3e" +checksum = "e4ab5718d1224b63252cd0c6f74f6480f9ffeb117438a2e0f5cf6d9a4798929c" dependencies = [ "libc", "once_cell", @@ -1189,9 +1185,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "4.0.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770d968249b5d99410d61f5bf89057f3199a077a04d087092f58e7d10692baae" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", @@ -1204,15 +1200,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 4.0.0", + "event-listener 4.0.3", "pin-project-lite", ] [[package]] name = "eyre" -version = "0.6.11" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" dependencies = [ "indenter", "once_cell", @@ -1282,9 +1278,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -1297,9 +1293,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -1307,15 +1303,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -1335,9 +1331,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-lite" @@ -1356,9 +1352,9 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeee267a1883f7ebef3700f262d2d54de95dfaf38189015a74fdc4e0c7ad8143" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ "fastrand 2.0.1", "futures-core", @@ -1369,26 +1365,26 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" @@ -1398,9 +1394,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1436,9 +1432,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -1468,7 +1464,7 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -1497,16 +1493,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d308f63daf4181410c242d34c11f928dcb3aa105852019e043c9d1f4e4368a" +checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", + "http 1.0.0", "indexmap", "slab", "tokio", @@ -1529,7 +1525,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "allocator-api2", ] @@ -1562,9 +1558,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "5d3d0e0f38255e7fa3cf31335b3a56f05febd18025f4db5ef7a0cfb4f8da651f" [[package]] name = "hex" @@ -1592,11 +1588,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1610,6 +1606,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "http" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.0.0" @@ -1628,7 +1635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "http", + "http 1.0.0", ] [[package]] @@ -1639,7 +1646,7 @@ checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" dependencies = [ "bytes", "futures-util", - "http", + "http 1.0.0", "http-body", "pin-project-lite", ] @@ -1673,15 +1680,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "403f9214f3e703236b221f1a9cd88ec8b4adfa5296de01ab96216361f4692f56" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" dependencies = [ "bytes", "futures-channel", "futures-util", "h2", - "http", + "http 1.0.0", "http-body", "httparse", "httpdate", @@ -1693,14 +1700,14 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca339002caeb0d159cc6e023dff48e199f081e42fa039895c7c6f38b37f2e9d" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" dependencies = [ "bytes", "futures-channel", "futures-util", - "http", + "http 1.0.0", "http-body", "hyper", "pin-project-lite", @@ -1713,9 +1720,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1762,15 +1769,15 @@ checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" [[package]] name = "ignore" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "same-file", "walkdir", "winapi-util", @@ -1803,9 +1810,9 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -1813,13 +1820,13 @@ dependencies = [ [[package]] name = "inherent" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce243b1bfa62ffc028f1cc3b6034ec63d649f3031bc8a4fbbb004e1ac17d1f68" +checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -1854,16 +1861,16 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", "windows-sys 0.48.0", ] [[package]] name = "itertools" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -1876,9 +1883,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "9a1d36f1235bc969acba30b7f5990b864423a6068a10f7c90ae8f0112e3a59d1" dependencies = [ "wasm-bindgen", ] @@ -1918,9 +1925,9 @@ dependencies = [ [[package]] name = "lettre" -version = "0.11.2" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a48c2e9831b370bc2d7233c2620298c45f3a158ed6b4b8d7416b2ada5a268fd8" +checksum = "357ff5edb6d8326473a64c82cf41ddf78ab116f89668c50c4fac1b321e5e80f4" dependencies = [ "async-trait", "base64", @@ -1935,22 +1942,22 @@ dependencies = [ "idna 0.5.0", "mime", "nom", - "once_cell", + "percent-encoding", "quoted_printable", - "rustls", - "rustls-pemfile", + "rustls 0.22.2", + "rustls-pemfile 2.0.0", "socket2 0.5.5", "tokio", "tokio-rustls", "url", - "webpki-roots", + "webpki-roots 0.26.1", ] [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -1964,7 +1971,7 @@ version = "0.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "libc", "redox_syscall", ] @@ -1994,9 +2001,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" [[package]] name = "lock_api" @@ -2096,18 +2103,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "migration" @@ -2142,9 +2140,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" dependencies = [ "adler", ] @@ -2167,7 +2165,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "cfg-if", "libc", ] @@ -2220,6 +2218,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.45" @@ -2257,7 +2261,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi 0.3.4", "libc", ] @@ -2272,9 +2276,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ "memchr", ] @@ -2296,12 +2300,12 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae859aa07428ca9a929b936690f8b12dc5f11dd8c6992a18ca93919f28bc177" +checksum = "57119c3b893986491ec9aa85056780d3a0f3cf4da7cc09dd3650dbd6c6738fb9" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2325,7 +2329,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -2416,9 +2420,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9cee2a55a544be8b89dc6848072af97a20f2422603c10865be2a42b580fff5" +checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" dependencies = [ "memchr", "thiserror", @@ -2427,9 +2431,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d78524685f5ef2a3b3bd1cafbc9fcabb036253d9b1463e726a91cd16e2dfc2" +checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" dependencies = [ "pest", "pest_generator", @@ -2437,22 +2441,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" +checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "pest_meta" -version = "2.7.5" +version = "2.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c747191d4ad9e4a4ab9c8798f1e82a39affe7ef9648390b7e5548d18e099de6" +checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" dependencies = [ "once_cell", "pest", @@ -2499,22 +2503,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -2563,9 +2567,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" [[package]] name = "polling" @@ -2585,14 +2589,14 @@ dependencies = [ [[package]] name = "polling" -version = "3.3.1" +version = "3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf63fa624ab313c11656b4cda960bfc46c410187ad493c41f6ba2d8c1e991c9e" +checksum = "545c980a3880efd47b2e262f6a4bb6daad6555cf3367aa9c4e52895f69537a41" dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.28", + "rustix 0.38.31", "tracing", "windows-sys 0.52.0", ] @@ -2621,11 +2625,10 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "toml_datetime", "toml_edit", ] @@ -2655,9 +2658,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.70" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" +checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" dependencies = [ "unicode-ident", ] @@ -2693,9 +2696,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -2784,13 +2787,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.3", + "regex-automata 0.4.5", "regex-syntax 0.8.2", ] @@ -2805,9 +2808,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" dependencies = [ "aho-corasick", "memchr", @@ -2828,15 +2831,15 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "relative-path" -version = "1.9.0" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" +checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" [[package]] name = "rend" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2571463863a6bd50c32f94402933f03457a3fbaf697a707c5be741e459f08fd" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" dependencies = [ "bytecheck", ] @@ -2869,9 +2872,9 @@ dependencies = [ [[package]] name = "reserve-port" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3969e7fe15c6c1532ba1a761628298e870bbd18c252fd41a58445f6091c372a0" +checksum = "9838134a2bfaa8e1f40738fcc972ac799de6e0e06b5157acb95fc2b05a0ea283" dependencies = [ "lazy_static", "thiserror", @@ -2893,12 +2896,13 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "ptr_meta", "rend", @@ -2910,9 +2914,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.42" +version = "0.7.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" +checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" dependencies = [ "proc-macro2", "quote", @@ -2983,15 +2987,31 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.41", + "syn 2.0.48", "unicode-ident", ] +[[package]] +name = "rust-multipart-rfc7578_2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03b748410c0afdef2ebbe3685a6a862e2ee937127cdaae623336a459451c8d57" +dependencies = [ + "bytes", + "futures-core", + "futures-util", + "http 0.2.11", + "mime", + "mime_guess", + "rand", + "thiserror", +] + [[package]] name = "rust_decimal" -version = "1.33.1" +version = "1.34.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" +checksum = "755392e1a2f77afd95580d3f0d0e94ac83eeeb7167552c9b5bca549e61a94d83" dependencies = [ "arrayvec", "borsh", @@ -3034,14 +3054,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "errno", "libc", - "linux-raw-sys 0.4.12", + "linux-raw-sys 0.4.13", "windows-sys 0.52.0", ] @@ -3051,12 +3071,25 @@ version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ - "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -3066,6 +3099,22 @@ dependencies = [ "base64", ] +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -3076,6 +3125,17 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -3149,14 +3209,12 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "sea-orm" -version = "0.12.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5181eedee8ad0d002d2a288600140fe9937581c4668426a4ff1295c14c736cf" +version = "0.12.12" dependencies = [ "async-stream", "async-trait", @@ -3182,9 +3240,7 @@ dependencies = [ [[package]] name = "sea-orm-cli" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507c2b99f83129f4d5d511012ab47c9f40d1c7923fd4698c19fae23f0bf62913" +version = "0.12.12" dependencies = [ "chrono", "clap", @@ -3199,23 +3255,19 @@ dependencies = [ [[package]] name = "sea-orm-macros" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816183a751bf9c22087679b20b6142da0b5c6d8981835ebb7b99bf1bf924640a" +version = "0.12.12" dependencies = [ "heck", "proc-macro2", "quote", "sea-bae", - "syn 2.0.41", + "syn 2.0.48", "unicode-ident", ] [[package]] name = "sea-orm-migration" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d45937e5d4869a0dcf0222bb264df564c077cbe9b312265f3717401d023a633" +version = "0.12.12" dependencies = [ "async-trait", "clap", @@ -3230,9 +3282,9 @@ dependencies = [ [[package]] name = "sea-query" -version = "0.30.4" +version = "0.31.0-rc.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41558fa9bb5f4d73952dac0b9d9c2ce23966493fc9ee0008037b01d709838a68" +checksum = "2a3d4c4e985f331e06266751243c5ebe6f61e961dda605d71ea2e2b016ef478b" dependencies = [ "bigdecimal", "chrono", @@ -3248,9 +3300,9 @@ dependencies = [ [[package]] name = "sea-query-binder" -version = "0.5.0" +version = "0.6.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36bbb68df92e820e4d5aeb17b4acd5cc8b5d18b2c36a4dd6f4626aabfa7ab1b9" +checksum = "ee39a8b40e6b4ee0510ee64c1079284559ee41f97919855b9cd7e43e1fb6ab04" dependencies = [ "bigdecimal", "chrono", @@ -3271,15 +3323,15 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", "thiserror", ] [[package]] name = "sea-schema" -version = "0.14.1" +version = "0.15.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cd9561232bd1b82ea748b581f15909d11de0db6563ddcf28c5d908aee8282f1" +checksum = "4a03b47e6cf73c34d83fff934c169732530f6f3b0dd072725804961959b7d1df" dependencies = [ "futures", "sea-query", @@ -3306,38 +3358,38 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "semver" -version = "1.0.20" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.196" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ "itoa", "ryu", @@ -3346,9 +3398,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" dependencies = [ "itoa", "serde", @@ -3387,9 +3439,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" dependencies = [ "indexmap", "itoa", @@ -3420,7 +3472,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -3524,9 +3576,9 @@ checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" [[package]] name = "similar" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21" [[package]] name = "simple_asn1" @@ -3586,9 +3638,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "smawk" @@ -3671,7 +3723,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" dependencies = [ - "ahash 0.8.6", + "ahash 0.8.7", "atoi", "bigdecimal", "byteorder", @@ -3696,8 +3748,8 @@ dependencies = [ "paste", "percent-encoding", "rust_decimal", - "rustls", - "rustls-pemfile", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", "serde", "serde_json", "sha2", @@ -3710,7 +3762,7 @@ dependencies = [ "tracing", "url", "uuid", - "webpki-roots", + "webpki-roots 0.25.4", ] [[package]] @@ -3762,7 +3814,7 @@ dependencies = [ "atoi", "base64", "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.4.2", "byteorder", "bytes", "chrono", @@ -3809,7 +3861,7 @@ dependencies = [ "atoi", "base64", "bigdecimal", - "bitflags 2.4.1", + "bitflags 2.4.2", "byteorder", "chrono", "crc", @@ -3932,9 +3984,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.41" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -3950,7 +4002,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -3967,15 +4019,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall", - "rustix 0.38.28", - "windows-sys 0.48.0", + "rustix 0.38.31", + "windows-sys 0.52.0", ] [[package]] @@ -4024,22 +4076,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -4054,13 +4106,14 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" dependencies = [ "deranged", "itoa", "libc", + "num-conv", "num_threads", "powerfmt", "serde", @@ -4076,10 +4129,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" dependencies = [ + "num-conv", "time-core", ] @@ -4124,9 +4178,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" dependencies = [ "backtrace", "bytes", @@ -4149,16 +4203,17 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] name = "tokio-rustls" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls", + "rustls 0.22.2", + "rustls-pki-types", "tokio", ] @@ -4189,15 +4244,15 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" [[package]] name = "toml_edit" -version = "0.20.2" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap", "toml_datetime", @@ -4222,14 +4277,14 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09e12e6351354851911bdf8c2b8f2ab15050c567d70a8b9a37ae7b8301a4080d" +checksum = "0da193277a4e2c33e59e09b5861580c33dd0a637c3883d0fa74ba40c0374af2e" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.4.2", "bytes", "futures-util", - "http", + "http 1.0.0", "http-body", "http-body-util", "http-range-header", @@ -4277,7 +4332,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] @@ -4411,9 +4466,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -4456,9 +4511,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "unsafe-libyaml" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" +checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "untrusted" @@ -4497,9 +4552,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" +checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" dependencies = [ "getrandom", "serde", @@ -4555,9 +4610,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" +checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" [[package]] name = "vcpkg" @@ -4604,9 +4659,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "b1223296a201415c7fad14792dbefaace9bd52b62d33453ade1c5b5f07555406" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4614,24 +4669,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "fcdc935b63408d58a32f8cc9738a0bffd8f05cc7c002086c6ef20b7312ad9dcd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "bde2032aeb86bdfaecc8b261eef3cba735cc426c1f3a3416d1e0791be95fc461" dependencies = [ "cfg-if", "js-sys", @@ -4641,9 +4696,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "3e4c238561b2d428924c49815533a8b9121c664599558a5d9ec51f8a1740a999" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4651,28 +4706,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "bae1abb6806dc1ad9e560ed242107c0f6c84335f1749dd4e8ddb012ebd5e25a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "4d91413b1c31d7539ba5ef2451af3f0b833a005eb27a631cec32bc0635a8602b" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "58cd2333b6e0be7a39605f0e255892fd7418a682d8da8fe042fe25128794d2ed" dependencies = [ "js-sys", "wasm-bindgen", @@ -4680,9 +4735,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.3" +version = "0.25.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "webpki-roots" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" +dependencies = [ + "rustls-pki-types", +] [[package]] name = "whoami" @@ -4723,20 +4787,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.42.2", + "windows-targets 0.52.0", ] [[package]] @@ -4757,21 +4812,6 @@ dependencies = [ "windows-targets 0.52.0", ] -[[package]] -name = "windows-targets" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-targets" version = "0.48.5" @@ -4802,12 +4842,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.0", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -4820,12 +4854,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -4838,12 +4866,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -4856,12 +4878,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -4874,12 +4890,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -4892,12 +4902,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -4910,12 +4914,6 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -4930,9 +4928,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.28" +version = "0.5.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" +checksum = "a7cad8365489051ae9f054164e459304af2e7e9bb407c958076c8bf4aef52da5" dependencies = [ "memchr", ] @@ -4969,22 +4967,22 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zerocopy" -version = "0.7.31" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.31" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.41", + "syn 2.0.48", ] [[package]] diff --git a/examples/loco_example/Cargo.toml b/examples/loco_example/Cargo.toml index ba860d783..a0b5d8e0f 100644 --- a/examples/loco_example/Cargo.toml +++ b/examples/loco_example/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" [dependencies] -loco-rs = { version = "0.1.7" } +loco-rs = { version = "=0.1.7" } migration = { path = "migration" } serde = { version = "1", features = ["derive"] } @@ -45,3 +45,9 @@ serial_test = "2.0.0" rstest = "0.18.2" loco-rs = { version = "0.1.7", features = ["testing"] } insta = { version = "1.34.0", features = ["redactions", "yaml", "filters"] } + +# This allows us to develop using a local version of sea-orm +# remove this section in your own project +[patch.crates-io] +sea-orm = { path = "../../" } +sea-orm-migration = { path = "../../sea-orm-migration" } diff --git a/examples/loco_example/migration/Cargo.toml b/examples/loco_example/migration/Cargo.toml index 8d47502bf..19e3160aa 100644 --- a/examples/loco_example/migration/Cargo.toml +++ b/examples/loco_example/migration/Cargo.toml @@ -10,7 +10,7 @@ path = "src/lib.rs" [dependencies] async-std = { version = "1", features = ["attributes", "tokio1"] } -loco-rs = { version = "0.1.6" } +loco-rs = { version = "=0.1.7" } [dependencies.sea-orm-migration] # path = "../../../sea-orm-migration" # remove this line in your own project From 5e9a8187908eeb9ba7fd1255f5db4fe860a3ac78 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 5 Feb 2024 17:07:07 +0800 Subject: [PATCH 9/9] refactor --- .../migration/src/m20231103_114510_notes.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/loco_example/migration/src/m20231103_114510_notes.rs b/examples/loco_example/migration/src/m20231103_114510_notes.rs index 8e8984628..d99a30875 100644 --- a/examples/loco_example/migration/src/m20231103_114510_notes.rs +++ b/examples/loco_example/migration/src/m20231103_114510_notes.rs @@ -1,7 +1,4 @@ -use std::borrow::BorrowMut; - -use loco_rs::schema::*; -use sea_orm_migration::prelude::*; +use sea_orm_migration::{prelude::*, schema::*}; #[derive(DeriveMigrationName)] pub struct Migration; @@ -12,9 +9,9 @@ impl MigrationTrait for Migration { manager .create_table( table_auto(Notes::Table) - .col(pk_auto(Notes::Id).borrow_mut()) - .col(string_null(Notes::Title).borrow_mut()) - .col(string_null(Notes::Content).borrow_mut()) + .col(pk_auto(Notes::Id)) + .col(string_null(Notes::Title)) + .col(string_null(Notes::Content)) .to_owned(), ) .await