From 06c632712f3d167df0cda742dd228661b953ab7f Mon Sep 17 00:00:00 2001 From: Dmitry Miasnenko Date: Fri, 27 Oct 2023 16:39:54 +0300 Subject: [PATCH 01/19] add sero to COMMUNITY.md (#1935) --- COMMUNITY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/COMMUNITY.md b/COMMUNITY.md index 4e15ff71b..37e863515 100644 --- a/COMMUNITY.md +++ b/COMMUNITY.md @@ -25,6 +25,7 @@ If you have built an app using SeaORM and want to showcase it, feel free to open - [OctoBase](https://github.com/toeverything/OctoBase) ![GitHub stars](https://img.shields.io/github/stars/toeverything/OctoBase.svg?style=social) | A light-weight, scalable, offline collaborative data backend written in 🦀 | DB: MySQL, Postgres, SQLite - [Ryot](https://ignisda.github.io/ryot) ([repository](https://github.com/IgnisDa/ryot)) ![GitHub stars](https://img.shields.io/github/stars/ignisda/ryot.svg?style=social) | The only self hosted tracker you will ever need | DB: MySQL, Postgres, SQLite - [Wikijump](https://github.com/scpwiki/wikijump) ([repository](https://github.com/scpwiki/wikijump/tree/develop/deepwell)) ![GitHub stars](https://img.shields.io/github/stars/scpwiki/wikijump.svg?style=social) | API service for Wikijump, a fork of Wikidot | DB: Postgres +- [sero](https://github.com/clowzed/sero): Host static sites with custom subdomains as surge.sh does. But with full control and cool new features. DB: Postgres #### Game - [Ceobe Canteen Serve](https://github.com/Enraged-Dun-Cookie-Development-Team/Ceobe-Canteen-Serve) | A tool based on Arknights mobile game, using axum as web framework | DB: MySQL From 0cffeb62a01b3030c06fc56b9b5792036e7abfc2 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 23 Oct 2023 04:08:11 +0100 Subject: [PATCH 02/19] sea-orm-macros 0.12.5 --- sea-orm-macros/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sea-orm-macros/Cargo.toml b/sea-orm-macros/Cargo.toml index 9c0397a91..db5299109 100644 --- a/sea-orm-macros/Cargo.toml +++ b/sea-orm-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-macros" -version = "0.12.4" +version = "0.12.5" authors = [ "Billy Chan " ] edition = "2021" description = "Derive macros for SeaORM" From 8b8b2ae391b954609aca051e3fbdc7122cfc528e Mon Sep 17 00:00:00 2001 From: Wyatt Herkamp Date: Mon, 6 Nov 2023 06:04:18 -0500 Subject: [PATCH 03/19] Update Rocket (#1959) --- examples/rocket_example/api/Cargo.toml | 8 ++------ examples/rocket_example/entity/Cargo.toml | 4 +--- examples/rocket_example/migration/Cargo.toml | 2 +- examples/rocket_okapi_example/api/Cargo.toml | 16 +++++++--------- examples/rocket_okapi_example/dto/Cargo.toml | 6 ++---- examples/rocket_okapi_example/entity/Cargo.toml | 4 +--- .../rocket_okapi_example/migration/Cargo.toml | 2 +- sea-orm-rocket/codegen/Cargo.toml | 2 +- sea-orm-rocket/codegen/src/database.rs | 2 +- sea-orm-rocket/lib/Cargo.toml | 4 ++-- sea-orm-rocket/lib/src/database.rs | 6 +++--- 11 files changed, 22 insertions(+), 34 deletions(-) diff --git a/examples/rocket_example/api/Cargo.toml b/examples/rocket_example/api/Cargo.toml index 26269bcf2..f80c7d4ba 100644 --- a/examples/rocket_example/api/Cargo.toml +++ b/examples/rocket_example/api/Cargo.toml @@ -11,12 +11,8 @@ async-trait = { version = "0.1" } rocket-example-service = { path = "../service" } futures = { version = "0.3" } futures-util = { version = "0.3" } -rocket = { version = "0.5.0-rc.1", features = [ - "json", -] } -rocket_dyn_templates = { version = "0.1.0-rc.1", features = [ - "tera", -] } +rocket = { version = "0.5.0-rc.4", features = ["json"] } +rocket_dyn_templates = { version = "0.1.0-rc.1", features = ["tera"] } serde_json = { version = "1" } entity = { path = "../entity" } migration = { path = "../migration" } diff --git a/examples/rocket_example/entity/Cargo.toml b/examples/rocket_example/entity/Cargo.toml index 28bd59aef..f5f931816 100644 --- a/examples/rocket_example/entity/Cargo.toml +++ b/examples/rocket_example/entity/Cargo.toml @@ -9,9 +9,7 @@ name = "entity" path = "src/lib.rs" [dependencies] -rocket = { version = "0.5.0-rc.1", features = [ - "json", -] } +rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project diff --git a/examples/rocket_example/migration/Cargo.toml b/examples/rocket_example/migration/Cargo.toml index e2774d565..3bd0ff4f6 100644 --- a/examples/rocket_example/migration/Cargo.toml +++ b/examples/rocket_example/migration/Cargo.toml @@ -9,7 +9,7 @@ name = "migration" path = "src/lib.rs" [dependencies] -rocket = { version = "0.5.0-rc.1" } +rocket = { version = "0.5.0-rc.4" } async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] diff --git a/examples/rocket_okapi_example/api/Cargo.toml b/examples/rocket_okapi_example/api/Cargo.toml index 1698ca436..91fe0e6a1 100644 --- a/examples/rocket_okapi_example/api/Cargo.toml +++ b/examples/rocket_okapi_example/api/Cargo.toml @@ -11,12 +11,8 @@ async-trait = { version = "0.1" } rocket-okapi-example-service = { path = "../service" } futures = { version = "0.3" } futures-util = { version = "0.3" } -rocket = { version = "0.5.0-rc.1", features = [ - "json", -] } -rocket_dyn_templates = { version = "0.1.0-rc.1", features = [ - "tera", -] } +rocket = { version = "0.5.0-rc.4", features = ["json"] } +rocket_dyn_templates = { version = "0.1.0-rc.1", features = ["tera"] } serde_json = { version = "1" } entity = { path = "../entity" } migration = { path = "../migration" } @@ -26,14 +22,16 @@ dto = { path = "../dto" } [dependencies.sea-orm-rocket] path = "../../../sea-orm-rocket/lib" # remove this line in your own project and use the version line -features = ["rocket_okapi"] # enables rocket_okapi so to have open api features enabled +features = [ + "rocket_okapi", +] # enables rocket_okapi so to have open api features enabled # version = "0.5.1" [dependencies.rocket_okapi] version = "0.8.0-rc.2" -features = ["swagger", "rapidoc","rocket_db_pools"] +features = ["swagger", "rapidoc", "rocket_db_pools"] [dependencies.rocket_cors] git = "https://github.com/lawliet89/rocket_cors.git" rev = "54fae070" -default-features = false \ No newline at end of file +default-features = false diff --git a/examples/rocket_okapi_example/dto/Cargo.toml b/examples/rocket_okapi_example/dto/Cargo.toml index a0f208dba..233a3dc8c 100644 --- a/examples/rocket_okapi_example/dto/Cargo.toml +++ b/examples/rocket_okapi_example/dto/Cargo.toml @@ -9,12 +9,10 @@ name = "dto" path = "src/lib.rs" [dependencies] -rocket = { version = "0.5.0-rc.1", features = [ - "json", -] } +rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.entity] path = "../entity" [dependencies.rocket_okapi] -version = "0.8.0-rc.2" \ No newline at end of file +version = "0.8.0-rc.2" diff --git a/examples/rocket_okapi_example/entity/Cargo.toml b/examples/rocket_okapi_example/entity/Cargo.toml index 10cbf52a6..5cc820a06 100644 --- a/examples/rocket_okapi_example/entity/Cargo.toml +++ b/examples/rocket_okapi_example/entity/Cargo.toml @@ -9,9 +9,7 @@ name = "entity" path = "src/lib.rs" [dependencies] -rocket = { version = "0.5.0-rc.1", features = [ - "json", -] } +rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project diff --git a/examples/rocket_okapi_example/migration/Cargo.toml b/examples/rocket_okapi_example/migration/Cargo.toml index e2774d565..3bd0ff4f6 100644 --- a/examples/rocket_okapi_example/migration/Cargo.toml +++ b/examples/rocket_okapi_example/migration/Cargo.toml @@ -9,7 +9,7 @@ name = "migration" path = "src/lib.rs" [dependencies] -rocket = { version = "0.5.0-rc.1" } +rocket = { version = "0.5.0-rc.4" } async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] diff --git a/sea-orm-rocket/codegen/Cargo.toml b/sea-orm-rocket/codegen/Cargo.toml index 03e34ab0e..c83b273f1 100644 --- a/sea-orm-rocket/codegen/Cargo.toml +++ b/sea-orm-rocket/codegen/Cargo.toml @@ -17,6 +17,6 @@ devise = "0.3" quote = "1" [dev-dependencies] -rocket = { version = "0.5.0-rc.1", default-features = false } +rocket = { version = "0.5.0-rc.4", default-features = false } trybuild = "1.0" version_check = "0.9" diff --git a/sea-orm-rocket/codegen/src/database.rs b/sea-orm-rocket/codegen/src/database.rs index 360c84742..c1aba5f3f 100644 --- a/sea-orm-rocket/codegen/src/database.rs +++ b/sea-orm-rocket/codegen/src/database.rs @@ -64,7 +64,7 @@ pub fn derive_database(input: TokenStream) -> TokenStream { ) -> rocket::request::Outcome { match #db_ty::fetch(req.rocket()) { Some(db) => rocket::outcome::Outcome::Success(db), - None => rocket::outcome::Outcome::Failure(( + None => rocket::outcome::Outcome::Error(( rocket::http::Status::InternalServerError, ())) } } diff --git a/sea-orm-rocket/lib/Cargo.toml b/sea-orm-rocket/lib/Cargo.toml index 57ad8b6ac..0c882a850 100644 --- a/sea-orm-rocket/lib/Cargo.toml +++ b/sea-orm-rocket/lib/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" all-features = true [dependencies.rocket] -version = "0.5.0-rc.1" +version = "0.5.0-rc.4" default-features = false [dependencies.sea-orm-rocket-codegen] @@ -26,6 +26,6 @@ default-features = false optional = true [dev-dependencies.rocket] -version = "0.5.0-rc.1" +version = "0.5.0-rc.4" default-features = false features = ["json"] \ No newline at end of file diff --git a/sea-orm-rocket/lib/src/database.rs b/sea-orm-rocket/lib/src/database.rs index 54f6da34d..fe275e185 100644 --- a/sea-orm-rocket/lib/src/database.rs +++ b/sea-orm-rocket/lib/src/database.rs @@ -131,10 +131,10 @@ pub trait Database: } let dbtype = std::any::type_name::(); - let fairing = Paint::default(format!("{dbtype}::init()")).bold(); + let fairing = Paint::new(format!("{dbtype}::init()")).bold(); error!( "Attempted to fetch unattached database `{}`.", - Paint::default(dbtype).bold() + Paint::new(dbtype).bold() ); info_!( "`{}` fairing must be attached prior to using this database.", @@ -261,7 +261,7 @@ impl<'r, D: Database> FromRequest<'r> for Connection<'r, D> { async fn from_request(req: &'r Request<'_>) -> Outcome { match D::fetch(req.rocket()) { Some(pool) => Outcome::Success(Connection(pool.borrow())), - None => Outcome::Failure((Status::InternalServerError, None)), + None => Outcome::Error((Status::InternalServerError, None)), } } } From 5bb580936d4d5cc4167b37f2b38c018c6fdb8b8b Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 6 Nov 2023 12:13:40 +0000 Subject: [PATCH 04/19] Bump sea-orm-rocket --- sea-orm-rocket/codegen/Cargo.toml | 2 +- sea-orm-rocket/lib/Cargo.toml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sea-orm-rocket/codegen/Cargo.toml b/sea-orm-rocket/codegen/Cargo.toml index c83b273f1..52600884b 100644 --- a/sea-orm-rocket/codegen/Cargo.toml +++ b/sea-orm-rocket/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-rocket-codegen" -version = "0.5.0" +version = "0.5.1" authors = ["Sergio Benitez ", "Jeb Rosen "] description = "Procedural macros for sea_orm_rocket." repository = "https://github.com/SergioBenitez/Rocket/contrib/db_pools" diff --git a/sea-orm-rocket/lib/Cargo.toml b/sea-orm-rocket/lib/Cargo.toml index 0c882a850..198c57626 100644 --- a/sea-orm-rocket/lib/Cargo.toml +++ b/sea-orm-rocket/lib/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-rocket" -version = "0.5.2" +version = "0.5.3" authors = ["Sergio Benitez ", "Jeb Rosen "] description = "SeaORM Rocket support crate" repository = "https://github.com/SeaQL/sea-orm" @@ -18,10 +18,10 @@ default-features = false [dependencies.sea-orm-rocket-codegen] path = "../codegen" -version = "0.5.0" +version = "0.5.1" [dependencies.rocket_okapi] -version = "0.8.0-rc.2" +version = "0.8.0-rc.3" default-features = false optional = true From c3b725662291b17142a7b5ab4b8ab022f1d0d78e Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 6 Nov 2023 12:29:15 +0000 Subject: [PATCH 05/19] Remove okapi support --- sea-orm-rocket/lib/Cargo.toml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sea-orm-rocket/lib/Cargo.toml b/sea-orm-rocket/lib/Cargo.toml index 198c57626..c9dcaffd6 100644 --- a/sea-orm-rocket/lib/Cargo.toml +++ b/sea-orm-rocket/lib/Cargo.toml @@ -20,12 +20,15 @@ default-features = false path = "../codegen" version = "0.5.1" -[dependencies.rocket_okapi] -version = "0.8.0-rc.3" -default-features = false -optional = true +# [dependencies.rocket_okapi] +# version = "0.8.0-rc.4" +# default-features = false +# optional = true [dev-dependencies.rocket] version = "0.5.0-rc.4" default-features = false -features = ["json"] \ No newline at end of file +features = ["json"] + +[features] +rocket_okapi = [] \ No newline at end of file From 418c18ac0a483ee65923c1697eba7277afa2a85b Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 6 Nov 2023 12:38:01 +0000 Subject: [PATCH 06/19] Update sea-orm-rocket-example --- examples/rocket_example/api/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/rocket_example/api/Cargo.toml b/examples/rocket_example/api/Cargo.toml index f80c7d4ba..cbcc30478 100644 --- a/examples/rocket_example/api/Cargo.toml +++ b/examples/rocket_example/api/Cargo.toml @@ -20,4 +20,4 @@ tokio = "1.29.0" [dependencies.sea-orm-rocket] path = "../../../sea-orm-rocket/lib" # remove this line in your own project and uncomment the following line -# version = "0.5.2" +# version = "0.5.3" From c81f4d37054a632eb9735270bd3bd5fcf8fd64d1 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 6 Nov 2023 21:08:33 +0800 Subject: [PATCH 07/19] CI: ignore `examples/rocket_okapi_example` --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 6e3a523bd..7be8cd0f8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -232,7 +232,7 @@ jobs: steps: - uses: actions/checkout@v3 - id: set-matrix - run: echo "path_matrix=$(find examples -mindepth 1 -maxdepth 1 -type d -printf '%P\0' | jq -Rc '[ split("\u0000") | .[] | "examples/\(.)" ]')" >> $GITHUB_OUTPUT + run: echo "path_matrix=$(find examples -mindepth 1 -maxdepth 1 -type d -not -path 'examples/rocket_okapi_example' -printf '%P\0' | jq -Rc '[ split("\u0000") | .[] | "examples/\(.)" ]')" >> $GITHUB_OUTPUT outputs: path_matrix: ${{ steps.set-matrix.outputs.path_matrix }} From b4010ecb6416b5e3e5e054800d1559945859205c Mon Sep 17 00:00:00 2001 From: Wyatt Herkamp Date: Wed, 8 Nov 2023 10:45:38 -0500 Subject: [PATCH 08/19] Add #[sea_orm(skip)] for FromQueryResult macro (#1954) * Add #[sea_orm(skip)] for FromQueryResult macro * Update sea-orm-rocket * Revert "Update sea-orm-rocket" This reverts commit b7226bb44dbdbab9782524feb0303c4c166d3050. --- .../src/derives/from_query_result.rs | 74 +++++++++++++++---- sea-orm-macros/src/lib.rs | 7 +- tests/derive_tests.rs | 7 ++ 3 files changed, 71 insertions(+), 17 deletions(-) diff --git a/sea-orm-macros/src/derives/from_query_result.rs b/sea-orm-macros/src/derives/from_query_result.rs index 999db62fe..a072827b2 100644 --- a/sea-orm-macros/src/derives/from_query_result.rs +++ b/sea-orm-macros/src/derives/from_query_result.rs @@ -1,6 +1,29 @@ +use self::util::GetMeta; use proc_macro2::{Ident, TokenStream}; -use quote::{format_ident, quote, quote_spanned}; -use syn::{ext::IdentExt, Data, DataStruct, Field, Fields, Generics}; +use quote::{format_ident, quote, quote_spanned, ToTokens}; +use syn::{ + ext::IdentExt, punctuated::Punctuated, token::Comma, Data, DataStruct, Fields, Generics, Meta, +}; + +pub struct FromQueryResultItem { + pub skip: bool, + pub ident: Ident, +} +impl ToTokens for FromQueryResultItem { + fn to_tokens(&self, tokens: &mut TokenStream) { + let Self { ident, skip } = self; + if *skip { + tokens.extend(quote! { + #ident: std::default::Default::default(), + }); + } else { + let name = ident.unraw().to_string(); + tokens.extend(quote! { + #ident: row.try_get(pre, #name)?, + }); + } + } +} /// Method to derive a [QueryResult](sea_orm::QueryResult) pub fn expand_derive_from_query_result( @@ -19,20 +42,23 @@ pub fn expand_derive_from_query_result( }) } }; + let mut field = Vec::with_capacity(fields.len()); - let field: Vec = fields - .into_iter() - .map(|Field { ident, .. }| format_ident!("{}", ident.unwrap().to_string())) - .collect(); - - let name: Vec = field - .iter() - .map(|f| { - let s = f.unraw().to_string(); - quote! { #s } - }) - .collect(); - + for parsed_field in fields.into_iter() { + let mut skip = false; + for attr in parsed_field.attrs.iter() { + if !attr.path().is_ident("sea_orm") { + continue; + } + if let Ok(list) = attr.parse_args_with(Punctuated::::parse_terminated) { + for meta in list.iter() { + skip = meta.exists("skip"); + } + } + } + let ident = format_ident!("{}", parsed_field.ident.unwrap().to_string()); + field.push(FromQueryResultItem { skip, ident }); + } let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); Ok(quote!( @@ -40,9 +66,25 @@ pub fn expand_derive_from_query_result( impl #impl_generics sea_orm::FromQueryResult for #ident #ty_generics #where_clause { fn from_query_result(row: &sea_orm::QueryResult, pre: &str) -> std::result::Result { Ok(Self { - #(#field: row.try_get(pre, #name)?),* + #(#field)* }) } } )) } +mod util { + use syn::Meta; + + pub(super) trait GetMeta { + fn exists(&self, k: &str) -> bool; + } + + impl GetMeta for Meta { + fn exists(&self, k: &str) -> bool { + let Meta::Path(path) = self else { + return false; + }; + path.is_ident(k) + } + } +} diff --git a/sea-orm-macros/src/lib.rs b/sea-orm-macros/src/lib.rs index 85a9fee62..52f2e734a 100644 --- a/sea-orm-macros/src/lib.rs +++ b/sea-orm-macros/src/lib.rs @@ -579,6 +579,9 @@ pub fn derive_active_enum(input: TokenStream) -> TokenStream { /// Convert a query result into the corresponding Model. /// +/// ### Attributes +/// - `skip`: Will not try to pull this field from the query result. And set it to the default value of the type. +/// /// ### Usage /// /// ``` @@ -588,10 +591,12 @@ pub fn derive_active_enum(input: TokenStream) -> TokenStream { /// struct SelectResult { /// name: String, /// num_of_fruits: i32, +/// #[sea_orm(skip)] +/// skip_me: i32, /// } /// ``` #[cfg(feature = "derive")] -#[proc_macro_derive(FromQueryResult)] +#[proc_macro_derive(FromQueryResult, attributes(sea_orm))] pub fn derive_from_query_result(input: TokenStream) -> TokenStream { let DeriveInput { ident, diff --git a/tests/derive_tests.rs b/tests/derive_tests.rs index 20e49d06b..bd99a3b46 100644 --- a/tests/derive_tests.rs +++ b/tests/derive_tests.rs @@ -56,3 +56,10 @@ where { _foo: T::Item, } + +#[derive(FromQueryResult)] +struct FromQueryAttributeTests { + #[sea_orm(skip)] + _foo: i32, + _bar: String, +} From d8bf5abd9aadac71dd5f162de76153784c39444e Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 8 Nov 2023 17:04:55 +0000 Subject: [PATCH 09/19] Changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46d9bec3f..d554f1157 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 0.12.6 - pending + +### New Features + +* Added `#[sea_orm(skip)]` for `FromQueryResult` derive macro + +## 0.12.5 - skipped + ## 0.12.4 - 2023-10-19 ### New Features From 5fe81c58678e214d1d5981b4ec08527b2e559acd Mon Sep 17 00:00:00 2001 From: Zander Milroy Date: Wed, 8 Nov 2023 12:06:33 -0500 Subject: [PATCH 10/19] Fix duplicated active enum `use` statements on generated entities (#1953) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Only generate `use` statements once per enum * Adds gen_import_active_enum tests --------- Co-authored-by: Schlüter Lukas --- sea-orm-codegen/src/entity/writer.rs | 154 +++++++++++++++++++++++++-- 1 file changed, 144 insertions(+), 10 deletions(-) diff --git a/sea-orm-codegen/src/entity/writer.rs b/sea-orm-codegen/src/entity/writer.rs index dc60654fa..6600f4624 100644 --- a/sea-orm-codegen/src/entity/writer.rs +++ b/sea-orm-codegen/src/entity/writer.rs @@ -460,15 +460,23 @@ impl EntityWriter { entity .columns .iter() - .fold(TokenStream::new(), |mut ts, col| { - if let sea_query::ColumnType::Enum { name, .. } = col.get_inner_col_type() { - let enum_name = format_ident!("{}", name.to_string().to_upper_camel_case()); - ts.extend([quote! { - use super::sea_orm_active_enums::#enum_name; - }]); - } - ts - }) + .fold( + (TokenStream::new(), Vec::new()), + |(mut ts, mut enums), col| { + if let sea_query::ColumnType::Enum { name, .. } = col.get_inner_col_type() { + if !enums.contains(&name) { + enums.push(name); + let enum_name = + format_ident!("{}", name.to_string().to_upper_camel_case()); + ts.extend([quote! { + use super::sea_orm_active_enums::#enum_name; + }]); + } + } + (ts, enums) + }, + ) + .0 } pub fn gen_model_struct( @@ -814,7 +822,8 @@ mod tests { }; use pretty_assertions::assert_eq; use proc_macro2::TokenStream; - use sea_query::{ColumnType, ForeignKeyAction, RcOrArc}; + use quote::quote; + use sea_query::{Alias, ColumnType, ForeignKeyAction, RcOrArc, SeaRc}; use std::io::{self, BufRead, BufReader, Read}; fn setup() -> Vec { @@ -2275,4 +2284,129 @@ mod tests { Ok(()) } + + #[test] + fn test_gen_import_active_enum() -> io::Result<()> { + let entities = vec![ + Entity { + table_name: "tea_pairing".to_owned(), + columns: vec![ + Column { + name: "id".to_owned(), + col_type: ColumnType::Integer, + auto_increment: true, + not_null: true, + unique: false, + }, + Column { + name: "first_tea".to_owned(), + col_type: ColumnType::Enum { + name: SeaRc::new(Alias::new("tea_enum")), + variants: vec![ + SeaRc::new(Alias::new("everyday_tea")), + SeaRc::new(Alias::new("breakfast_tea")), + ], + }, + auto_increment: false, + not_null: true, + unique: false, + }, + Column { + name: "second_tea".to_owned(), + col_type: ColumnType::Enum { + name: SeaRc::new(Alias::new("tea_enum")), + variants: vec![ + SeaRc::new(Alias::new("everyday_tea")), + SeaRc::new(Alias::new("breakfast_tea")), + ], + }, + auto_increment: false, + not_null: true, + unique: false, + }, + ], + relations: vec![], + conjunct_relations: vec![], + primary_keys: vec![PrimaryKey { + name: "id".to_owned(), + }], + }, + Entity { + table_name: "tea_pairing_with_size".to_owned(), + columns: vec![ + Column { + name: "id".to_owned(), + col_type: ColumnType::Integer, + auto_increment: true, + not_null: true, + unique: false, + }, + Column { + name: "first_tea".to_owned(), + col_type: ColumnType::Enum { + name: SeaRc::new(Alias::new("tea_enum")), + variants: vec![ + SeaRc::new(Alias::new("everyday_tea")), + SeaRc::new(Alias::new("breakfast_tea")), + ], + }, + auto_increment: false, + not_null: true, + unique: false, + }, + Column { + name: "second_tea".to_owned(), + col_type: ColumnType::Enum { + name: SeaRc::new(Alias::new("tea_enum")), + variants: vec![ + SeaRc::new(Alias::new("everyday_tea")), + SeaRc::new(Alias::new("breakfast_tea")), + ], + }, + auto_increment: false, + not_null: true, + unique: false, + }, + Column { + name: "size".to_owned(), + col_type: ColumnType::Enum { + name: SeaRc::new(Alias::new("tea_size")), + variants: vec![ + SeaRc::new(Alias::new("small")), + SeaRc::new(Alias::new("medium")), + SeaRc::new(Alias::new("huge")), + ], + }, + auto_increment: false, + not_null: true, + unique: false, + }, + ], + relations: vec![], + conjunct_relations: vec![], + primary_keys: vec![PrimaryKey { + name: "id".to_owned(), + }], + }, + ]; + + assert_eq!( + quote!( + use super::sea_orm_active_enums::TeaEnum; + ) + .to_string(), + EntityWriter::gen_import_active_enum(&entities[0]).to_string() + ); + + assert_eq!( + quote!( + use super::sea_orm_active_enums::TeaEnum; + use super::sea_orm_active_enums::TeaSize; + ) + .to_string(), + EntityWriter::gen_import_active_enum(&entities[1]).to_string() + ); + + Ok(()) + } } From d6835b125e42da59ae242882c899c3130e264f50 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 8 Nov 2023 17:09:15 +0000 Subject: [PATCH 11/19] [cli] Changelog --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d554f1157..20f6ee46f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### New Features -* Added `#[sea_orm(skip)]` for `FromQueryResult` derive macro +* Added `#[sea_orm(skip)]` for `FromQueryResult` derive macro https://github.com/SeaQL/sea-orm/pull/1954 + +### Bug Fixes + +* [sea-orm-cli] Fix duplicated active enum use statements on generated entities https://github.com/SeaQL/sea-orm/pull/1953 ## 0.12.5 - skipped From 0dbfb42bb7f0132657607fc5cbd4854d8279ba99 Mon Sep 17 00:00:00 2001 From: Lev Khoroshansky Date: Wed, 8 Nov 2023 20:04:24 +0100 Subject: [PATCH 12/19] Support `--enum-extra-derives` (#1934) * feat: Support `--enum-extra-derives` * test: Enum extra derives * style: Don't format derives * fix: Put `quote!` inside a function with `#[rustfmt::skip]` --- sea-orm-cli/src/cli.rs | 7 ++++ sea-orm-cli/src/commands/generate.rs | 2 + sea-orm-codegen/src/entity/active_enum.rs | 50 +++++++++++++++++++++-- sea-orm-codegen/src/entity/writer.rs | 30 +++++++++----- 4 files changed, 74 insertions(+), 15 deletions(-) diff --git a/sea-orm-cli/src/cli.rs b/sea-orm-cli/src/cli.rs index ff88d30a4..cc92208c6 100644 --- a/sea-orm-cli/src/cli.rs +++ b/sea-orm-cli/src/cli.rs @@ -280,6 +280,13 @@ pub enum GenerateSubcommands { )] model_extra_attributes: Vec, + #[arg( + long, + value_delimiter = ',', + help = "Add extra derive macros to generated enums (comma separated), e.g. `--enum-extra-derives 'ts_rs::Ts','CustomDerive'`" + )] + enum_extra_derives: Vec, + #[arg( long, default_value = "false", diff --git a/sea-orm-cli/src/commands/generate.rs b/sea-orm-cli/src/commands/generate.rs index 7b7a89562..8e8994fc0 100644 --- a/sea-orm-cli/src/commands/generate.rs +++ b/sea-orm-cli/src/commands/generate.rs @@ -31,6 +31,7 @@ pub async fn run_generate_command( lib, model_extra_derives, model_extra_attributes, + enum_extra_derives, seaography, } => { if verbose { @@ -180,6 +181,7 @@ pub async fn run_generate_command( serde_skip_hidden_column, model_extra_derives, model_extra_attributes, + enum_extra_derives, seaography, ); let output = EntityTransformer::transform(table_stmts)?.generate(&writer_context); diff --git a/sea-orm-codegen/src/entity/active_enum.rs b/sea-orm-codegen/src/entity/active_enum.rs index 30c9c5df6..95fd0a03b 100644 --- a/sea-orm-codegen/src/entity/active_enum.rs +++ b/sea-orm-codegen/src/entity/active_enum.rs @@ -12,7 +12,12 @@ pub struct ActiveEnum { } impl ActiveEnum { - pub fn impl_active_enum(&self, with_serde: &WithSerde, with_copy_enums: bool) -> TokenStream { + pub fn impl_active_enum( + &self, + with_serde: &WithSerde, + with_copy_enums: bool, + extra_derives: &TokenStream, + ) -> TokenStream { let enum_name = &self.enum_name.to_string(); let enum_iden = format_ident!("{}", enum_name.to_upper_camel_case()); let values: Vec = self.values.iter().map(|v| v.to_string()).collect(); @@ -24,7 +29,7 @@ impl ActiveEnum { } }); - let extra_derive = with_serde.extra_derive(); + let serde_derive = with_serde.extra_derive(); let copy_derive = if with_copy_enums { quote! { , Copy } } else { @@ -32,7 +37,7 @@ impl ActiveEnum { }; quote! { - #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum #copy_derive #extra_derive)] + #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum #copy_derive #serde_derive #extra_derives)] #[sea_orm(rs_type = "String", db_type = "Enum", enum_name = #enum_name)] pub enum #enum_iden { #( @@ -46,6 +51,8 @@ impl ActiveEnum { #[cfg(test)] mod tests { + use crate::entity::writer::bonus_derive; + use super::*; use pretty_assertions::assert_eq; use sea_query::{Alias, IntoIden}; @@ -72,7 +79,7 @@ mod tests { .map(|variant| Alias::new(variant).into_iden()) .collect(), } - .impl_active_enum(&WithSerde::None, true) + .impl_active_enum(&WithSerde::None, true, "e! {}) .to_string(), quote!( #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)] @@ -105,4 +112,39 @@ mod tests { .to_string() ) } + + #[test] + fn test_enum_extra_derives() { + assert_eq!( + ActiveEnum { + enum_name: Alias::new("media_type").into_iden(), + values: vec!["UNKNOWN", "BITMAP",] + .into_iter() + .map(|variant| Alias::new(variant).into_iden()) + .collect(), + } + .impl_active_enum( + &WithSerde::None, + true, + &bonus_derive(["specta::Type", "ts_rs::TS"]) + ) + .to_string(), + build_generated_enum(), + ); + + #[rustfmt::skip] + fn build_generated_enum() -> String { + quote!( + #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy, specta :: Type, ts_rs :: TS)] + #[sea_orm(rs_type = "String", db_type = "Enum", enum_name = "media_type")] + pub enum MediaType { + #[sea_orm(string_value = "UNKNOWN")] + Unknown, + #[sea_orm(string_value = "BITMAP")] + Bitmap, + } + ) + .to_string() + } + } } diff --git a/sea-orm-codegen/src/entity/writer.rs b/sea-orm-codegen/src/entity/writer.rs index 6600f4624..695a3de08 100644 --- a/sea-orm-codegen/src/entity/writer.rs +++ b/sea-orm-codegen/src/entity/writer.rs @@ -47,6 +47,7 @@ pub struct EntityWriterContext { pub(crate) serde_skip_deserializing_primary_key: bool, pub(crate) model_extra_derives: TokenStream, pub(crate) model_extra_attributes: TokenStream, + pub(crate) enum_extra_derives: TokenStream, pub(crate) seaography: bool, } @@ -79,19 +80,19 @@ impl WithSerde { } } -/// Converts model_extra_derives argument to token stream -fn bonus_derive(model_extra_derives: I) -> TokenStream +/// Converts *_extra_derives argument to token stream +pub(crate) fn bonus_derive(extra_derives: I) -> TokenStream where T: Into, I: IntoIterator, { - model_extra_derives - .into_iter() - .map(Into::::into) - .fold(TokenStream::default(), |acc, derive| { + extra_derives.into_iter().map(Into::::into).fold( + TokenStream::default(), + |acc, derive| { let tokens: TokenStream = derive.parse().unwrap(); quote! { #acc, #tokens } - }) + }, + ) } /// convert attributes argument to token stream @@ -143,6 +144,7 @@ impl EntityWriterContext { serde_skip_hidden_column: bool, model_extra_derives: Vec, model_extra_attributes: Vec, + enum_extra_derives: Vec, seaography: bool, ) -> Self { Self { @@ -156,6 +158,7 @@ impl EntityWriterContext { serde_skip_hidden_column, model_extra_derives: bonus_derive(model_extra_derives), model_extra_attributes: bonus_attributes(model_extra_attributes), + enum_extra_derives: bonus_derive(enum_extra_derives), seaography, } } @@ -168,9 +171,11 @@ impl EntityWriter { files.push(self.write_index_file(context.lib)); files.push(self.write_prelude()); if !self.enums.is_empty() { - files.push( - self.write_sea_orm_active_enums(&context.with_serde, context.with_copy_enums), - ); + files.push(self.write_sea_orm_active_enums( + &context.with_serde, + context.with_copy_enums, + &context.enum_extra_derives, + )); } WriterOutput { files } } @@ -283,6 +288,7 @@ impl EntityWriter { &self, with_serde: &WithSerde, with_copy_enums: bool, + extra_derives: &TokenStream, ) -> OutputFile { let mut lines = Vec::new(); Self::write_doc_comment(&mut lines); @@ -291,7 +297,9 @@ impl EntityWriter { let code_blocks = self .enums .values() - .map(|active_enum| active_enum.impl_active_enum(with_serde, with_copy_enums)) + .map(|active_enum| { + active_enum.impl_active_enum(with_serde, with_copy_enums, extra_derives) + }) .collect(); Self::write(&mut lines, code_blocks); OutputFile { From 8ab24cf884ba2ea61c8be0b917e79e077b441dff Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 8 Nov 2023 19:41:57 +0000 Subject: [PATCH 13/19] Enum extra attributes (#1966) * Feature: Adds sea-orm-cli generate `--enum-extra-attributes` option (#1952) * Adds `--enum-extra-derives` * Adds test_enum_extra_attributes --------- Co-authored-by: Chris Tsang * Fixup --------- Co-authored-by: Zander Milroy --- sea-orm-cli/src/cli.rs | 7 ++ sea-orm-cli/src/commands/generate.rs | 2 + sea-orm-codegen/src/entity/active_enum.rs | 84 +++++++++++++++++++++-- sea-orm-codegen/src/entity/writer.rs | 16 ++++- 4 files changed, 102 insertions(+), 7 deletions(-) diff --git a/sea-orm-cli/src/cli.rs b/sea-orm-cli/src/cli.rs index cc92208c6..e8611373e 100644 --- a/sea-orm-cli/src/cli.rs +++ b/sea-orm-cli/src/cli.rs @@ -287,6 +287,13 @@ pub enum GenerateSubcommands { )] enum_extra_derives: Vec, + #[arg( + long, + value_delimiter = ',', + help = r#"Add extra attributes to generated enums, no need for `#[]` (comma separated), e.g. `--enum-extra-attributes 'serde(rename_all = "camelCase")','ts(export)'`"# + )] + enum_extra_attributes: Vec, + #[arg( long, default_value = "false", diff --git a/sea-orm-cli/src/commands/generate.rs b/sea-orm-cli/src/commands/generate.rs index 8e8994fc0..613a541fb 100644 --- a/sea-orm-cli/src/commands/generate.rs +++ b/sea-orm-cli/src/commands/generate.rs @@ -32,6 +32,7 @@ pub async fn run_generate_command( model_extra_derives, model_extra_attributes, enum_extra_derives, + enum_extra_attributes, seaography, } => { if verbose { @@ -182,6 +183,7 @@ pub async fn run_generate_command( model_extra_derives, model_extra_attributes, enum_extra_derives, + enum_extra_attributes, seaography, ); let output = EntityTransformer::transform(table_stmts)?.generate(&writer_context); diff --git a/sea-orm-codegen/src/entity/active_enum.rs b/sea-orm-codegen/src/entity/active_enum.rs index 95fd0a03b..e7e0480c7 100644 --- a/sea-orm-codegen/src/entity/active_enum.rs +++ b/sea-orm-codegen/src/entity/active_enum.rs @@ -17,6 +17,7 @@ impl ActiveEnum { with_serde: &WithSerde, with_copy_enums: bool, extra_derives: &TokenStream, + extra_attributes: &TokenStream, ) -> TokenStream { let enum_name = &self.enum_name.to_string(); let enum_iden = format_ident!("{}", enum_name.to_upper_camel_case()); @@ -39,6 +40,7 @@ impl ActiveEnum { quote! { #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum #copy_derive #serde_derive #extra_derives)] #[sea_orm(rs_type = "String", db_type = "Enum", enum_name = #enum_name)] + #extra_attributes pub enum #enum_iden { #( #[sea_orm(string_value = #values)] @@ -51,9 +53,8 @@ impl ActiveEnum { #[cfg(test)] mod tests { - use crate::entity::writer::bonus_derive; - use super::*; + use crate::entity::writer::{bonus_attributes, bonus_derive}; use pretty_assertions::assert_eq; use sea_query::{Alias, IntoIden}; @@ -79,7 +80,12 @@ mod tests { .map(|variant| Alias::new(variant).into_iden()) .collect(), } - .impl_active_enum(&WithSerde::None, true, "e! {}) + .impl_active_enum( + &WithSerde::None, + true, + &TokenStream::new(), + &TokenStream::new(), + ) .to_string(), quote!( #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)] @@ -126,7 +132,8 @@ mod tests { .impl_active_enum( &WithSerde::None, true, - &bonus_derive(["specta::Type", "ts_rs::TS"]) + &bonus_derive(["specta::Type", "ts_rs::TS"]), + &TokenStream::new(), ) .to_string(), build_generated_enum(), @@ -147,4 +154,73 @@ mod tests { .to_string() } } + + #[test] + fn test_enum_extra_attributes() { + assert_eq!( + ActiveEnum { + enum_name: Alias::new("coinflip_result_type").into_iden(), + values: vec!["HEADS", "TAILS"] + .into_iter() + .map(|variant| Alias::new(variant).into_iden()) + .collect(), + } + .impl_active_enum( + &WithSerde::None, + true, + &TokenStream::new(), + &bonus_attributes([r#"serde(rename_all = "camelCase")"#]) + ) + .to_string(), + quote!( + #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)] + #[sea_orm( + rs_type = "String", + db_type = "Enum", + enum_name = "coinflip_result_type" + )] + #[serde(rename_all = "camelCase")] + pub enum CoinflipResultType { + #[sea_orm(string_value = "HEADS")] + Heads, + #[sea_orm(string_value = "TAILS")] + Tails, + } + ) + .to_string() + ); + assert_eq!( + ActiveEnum { + enum_name: Alias::new("coinflip_result_type").into_iden(), + values: vec!["HEADS", "TAILS"] + .into_iter() + .map(|variant| Alias::new(variant).into_iden()) + .collect(), + } + .impl_active_enum( + &WithSerde::None, + true, + &TokenStream::new(), + &bonus_attributes([r#"serde(rename_all = "camelCase")"#, "ts(export)"]) + ) + .to_string(), + quote!( + #[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum, Copy)] + #[sea_orm( + rs_type = "String", + db_type = "Enum", + enum_name = "coinflip_result_type" + )] + #[serde(rename_all = "camelCase")] + #[ts(export)] + pub enum CoinflipResultType { + #[sea_orm(string_value = "HEADS")] + Heads, + #[sea_orm(string_value = "TAILS")] + Tails, + } + ) + .to_string() + ) + } } diff --git a/sea-orm-codegen/src/entity/writer.rs b/sea-orm-codegen/src/entity/writer.rs index 695a3de08..099a96797 100644 --- a/sea-orm-codegen/src/entity/writer.rs +++ b/sea-orm-codegen/src/entity/writer.rs @@ -48,6 +48,7 @@ pub struct EntityWriterContext { pub(crate) model_extra_derives: TokenStream, pub(crate) model_extra_attributes: TokenStream, pub(crate) enum_extra_derives: TokenStream, + pub(crate) enum_extra_attributes: TokenStream, pub(crate) seaography: bool, } @@ -95,8 +96,8 @@ where ) } -/// convert attributes argument to token stream -fn bonus_attributes(attributes: I) -> TokenStream +/// convert *_extra_attributes argument to token stream +pub(crate) fn bonus_attributes(attributes: I) -> TokenStream where T: Into, I: IntoIterator, @@ -145,6 +146,7 @@ impl EntityWriterContext { model_extra_derives: Vec, model_extra_attributes: Vec, enum_extra_derives: Vec, + enum_extra_attributes: Vec, seaography: bool, ) -> Self { Self { @@ -159,6 +161,7 @@ impl EntityWriterContext { model_extra_derives: bonus_derive(model_extra_derives), model_extra_attributes: bonus_attributes(model_extra_attributes), enum_extra_derives: bonus_derive(enum_extra_derives), + enum_extra_attributes: bonus_attributes(enum_extra_attributes), seaography, } } @@ -175,6 +178,7 @@ impl EntityWriter { &context.with_serde, context.with_copy_enums, &context.enum_extra_derives, + &context.enum_extra_attributes, )); } WriterOutput { files } @@ -289,6 +293,7 @@ impl EntityWriter { with_serde: &WithSerde, with_copy_enums: bool, extra_derives: &TokenStream, + extra_attributes: &TokenStream, ) -> OutputFile { let mut lines = Vec::new(); Self::write_doc_comment(&mut lines); @@ -298,7 +303,12 @@ impl EntityWriter { .enums .values() .map(|active_enum| { - active_enum.impl_active_enum(with_serde, with_copy_enums, extra_derives) + active_enum.impl_active_enum( + with_serde, + with_copy_enums, + extra_derives, + extra_attributes, + ) }) .collect(); Self::write(&mut lines, code_blocks); From efa508432d0e1c2e98d9f97f8c5bd8befa8bdf6e Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 8 Nov 2023 20:09:21 +0000 Subject: [PATCH 14/19] Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20f6ee46f..50a6d7f34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Bug Fixes * [sea-orm-cli] Fix duplicated active enum use statements on generated entities https://github.com/SeaQL/sea-orm/pull/1953 +* [sea-orm-cli] Added `--enum-extra-attributes` https://github.com/SeaQL/sea-orm/pull/1952 +* [sea-orm-cli] Added `--enum-extra-derives` https://github.com/SeaQL/sea-orm/pull/1934 ## 0.12.5 - skipped From 37b99228b203fc5e4a19979b4a0d5d22248fc3cd Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 8 Nov 2023 20:09:51 +0000 Subject: [PATCH 15/19] Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50a6d7f34..6f6b6c4ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Bug Fixes * [sea-orm-cli] Fix duplicated active enum use statements on generated entities https://github.com/SeaQL/sea-orm/pull/1953 -* [sea-orm-cli] Added `--enum-extra-attributes` https://github.com/SeaQL/sea-orm/pull/1952 * [sea-orm-cli] Added `--enum-extra-derives` https://github.com/SeaQL/sea-orm/pull/1934 +* [sea-orm-cli] Added `--enum-extra-attributes` https://github.com/SeaQL/sea-orm/pull/1952 ## 0.12.5 - skipped From 070a30aab17b1adaf1ab247229f51abcb8d5ec84 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Sun, 12 Nov 2023 20:14:29 +0000 Subject: [PATCH 16/19] 0.12.5 --- CHANGELOG.md | 4 +--- Cargo.toml | 4 ++-- sea-orm-cli/Cargo.toml | 4 ++-- sea-orm-codegen/Cargo.toml | 2 +- sea-orm-migration/Cargo.toml | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f6b6c4ac..377c2c5e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 0.12.6 - pending +## 0.12.5 - 2023-11-12 ### New Features @@ -17,8 +17,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/). * [sea-orm-cli] Added `--enum-extra-derives` https://github.com/SeaQL/sea-orm/pull/1934 * [sea-orm-cli] Added `--enum-extra-attributes` https://github.com/SeaQL/sea-orm/pull/1952 -## 0.12.5 - skipped - ## 0.12.4 - 2023-10-19 ### New Features diff --git a/Cargo.toml b/Cargo.toml index a8d9fb662..ddaa271a0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [".", "sea-orm-macros", "sea-orm-codegen"] [package] name = "sea-orm" -version = "0.12.4" +version = "0.12.5" authors = ["Chris Tsang "] edition = "2021" description = "🐚 An async & dynamic ORM for Rust" @@ -33,7 +33,7 @@ log = { version = "0.4", default-features = false } tracing = { version = "0.1", default-features = false, features = ["attributes", "log"] } rust_decimal = { version = "1", default-features = false, optional = true } bigdecimal = { version = "0.3", default-features = false, optional = true } -sea-orm-macros = { version = "0.12.4", path = "sea-orm-macros", default-features = false, features = ["strum"] } +sea-orm-macros = { version = "0.12.5", path = "sea-orm-macros", default-features = false, features = ["strum"] } sea-query = { version = "0.30.2", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] } sea-query-binder = { version = "0.5.0", default-features = false, optional = true } strum = { version = "0.25", default-features = false } diff --git a/sea-orm-cli/Cargo.toml b/sea-orm-cli/Cargo.toml index 42a18105f..6945155b9 100644 --- a/sea-orm-cli/Cargo.toml +++ b/sea-orm-cli/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "sea-orm-cli" -version = "0.12.4" +version = "0.12.5" authors = [ "Chris Tsang ", "Billy Chan ", @@ -37,7 +37,7 @@ required-features = ["cli", "codegen"] clap = { version = "4.3", features = ["env", "derive"], optional = true } dotenvy = { version = "0.15", default-features = false, optional = true } async-std = { version = "1.9", default-features = false, features = ["attributes", "tokio1"], optional = true } -sea-orm-codegen = { version = "=0.12.4", path = "../sea-orm-codegen", default-features = false, optional = true } +sea-orm-codegen = { version = "=0.12.5", path = "../sea-orm-codegen", default-features = false, optional = true } sea-schema = { version = "0.14.0" } sqlx = { version = "0.7", default-features = false, features = ["mysql", "postgres"], optional = true } tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] } diff --git a/sea-orm-codegen/Cargo.toml b/sea-orm-codegen/Cargo.toml index 61cd07127..2a1b29b44 100644 --- a/sea-orm-codegen/Cargo.toml +++ b/sea-orm-codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-codegen" -version = "0.12.4" +version = "0.12.5" authors = ["Billy Chan "] edition = "2021" description = "Code Generator for SeaORM" diff --git a/sea-orm-migration/Cargo.toml b/sea-orm-migration/Cargo.toml index 6d1f91d61..7785dbf64 100644 --- a/sea-orm-migration/Cargo.toml +++ b/sea-orm-migration/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "sea-orm-migration" -version = "0.12.4" +version = "0.12.5" authors = ["Billy Chan "] edition = "2021" description = "Migration utility for SeaORM" @@ -23,8 +23,8 @@ path = "src/lib.rs" async-trait = { version = "0.1", default-features = false } clap = { version = "4.3", features = ["env", "derive"], optional = true } dotenvy = { version = "0.15", default-features = false, optional = true } -sea-orm = { version = "0.12.4", path = "../", default-features = false, features = ["macros"] } -sea-orm-cli = { version = "0.12.4", path = "../sea-orm-cli", default-features = false, optional = true } +sea-orm = { version = "0.12.5", path = "../", default-features = false, features = ["macros"] } +sea-orm-cli = { version = "0.12.5", path = "../sea-orm-cli", default-features = false, optional = true } sea-schema = { version = "0.14.1" } tracing = { version = "0.1", default-features = false, features = ["log"] } tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] } From 5d677a401b734cd163394b1ab649d81cf170d698 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Sun, 12 Nov 2023 20:14:30 +0000 Subject: [PATCH 17/19] update examples --- examples/actix3_example/entity/Cargo.toml | 2 +- examples/actix3_example/migration/Cargo.toml | 2 +- examples/actix3_example/service/Cargo.toml | 2 +- examples/actix_example/entity/Cargo.toml | 2 +- examples/actix_example/migration/Cargo.toml | 2 +- examples/actix_example/service/Cargo.toml | 2 +- examples/axum_example/entity/Cargo.toml | 2 +- examples/axum_example/migration/Cargo.toml | 2 +- examples/axum_example/service/Cargo.toml | 2 +- examples/graphql_example/entity/Cargo.toml | 2 +- examples/graphql_example/migration/Cargo.toml | 2 +- examples/graphql_example/service/Cargo.toml | 2 +- examples/jsonrpsee_example/entity/Cargo.toml | 2 +- examples/jsonrpsee_example/migration/Cargo.toml | 2 +- examples/jsonrpsee_example/service/Cargo.toml | 2 +- examples/poem_example/entity/Cargo.toml | 2 +- examples/poem_example/migration/Cargo.toml | 2 +- examples/poem_example/service/Cargo.toml | 2 +- examples/rocket_example/entity/Cargo.toml | 2 +- examples/rocket_example/migration/Cargo.toml | 2 +- examples/rocket_example/service/Cargo.toml | 2 +- examples/rocket_okapi_example/entity/Cargo.toml | 2 +- examples/rocket_okapi_example/migration/Cargo.toml | 2 +- examples/rocket_okapi_example/service/Cargo.toml | 2 +- examples/salvo_example/entity/Cargo.toml | 2 +- examples/salvo_example/migration/Cargo.toml | 2 +- examples/salvo_example/service/Cargo.toml | 2 +- examples/seaography_example/migration/Cargo.toml | 4 ++-- examples/tonic_example/entity/Cargo.toml | 2 +- examples/tonic_example/migration/Cargo.toml | 2 +- examples/tonic_example/service/Cargo.toml | 2 +- 31 files changed, 32 insertions(+), 32 deletions(-) diff --git a/examples/actix3_example/entity/Cargo.toml b/examples/actix3_example/entity/Cargo.toml index 423712d5e..0bdda2b18 100644 --- a/examples/actix3_example/entity/Cargo.toml +++ b/examples/actix3_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/actix3_example/migration/Cargo.toml b/examples/actix3_example/migration/Cargo.toml index cab780f35..fde1eb681 100644 --- a/examples/actix3_example/migration/Cargo.toml +++ b/examples/actix3_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-async-std-native-tls", diff --git a/examples/actix3_example/service/Cargo.toml b/examples/actix3_example/service/Cargo.toml index 9c7944fab..64dd92bf7 100644 --- a/examples/actix3_example/service/Cargo.toml +++ b/examples/actix3_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/actix_example/entity/Cargo.toml b/examples/actix_example/entity/Cargo.toml index 423712d5e..0bdda2b18 100644 --- a/examples/actix_example/entity/Cargo.toml +++ b/examples/actix_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/actix_example/migration/Cargo.toml b/examples/actix_example/migration/Cargo.toml index 415f600ac..c3c678c86 100644 --- a/examples/actix_example/migration/Cargo.toml +++ b/examples/actix_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-actix-native-tls", diff --git a/examples/actix_example/service/Cargo.toml b/examples/actix_example/service/Cargo.toml index 2a2a6bbe3..cf0380589 100644 --- a/examples/actix_example/service/Cargo.toml +++ b/examples/actix_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/axum_example/entity/Cargo.toml b/examples/axum_example/entity/Cargo.toml index 423712d5e..0bdda2b18 100644 --- a/examples/axum_example/entity/Cargo.toml +++ b/examples/axum_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/axum_example/migration/Cargo.toml b/examples/axum_example/migration/Cargo.toml index 2d06edb27..6d2a9e23c 100644 --- a/examples/axum_example/migration/Cargo.toml +++ b/examples/axum_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/axum_example/service/Cargo.toml b/examples/axum_example/service/Cargo.toml index f2b37512d..087e65e07 100644 --- a/examples/axum_example/service/Cargo.toml +++ b/examples/axum_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/graphql_example/entity/Cargo.toml b/examples/graphql_example/entity/Cargo.toml index 4dca0e412..cf43f673e 100644 --- a/examples/graphql_example/entity/Cargo.toml +++ b/examples/graphql_example/entity/Cargo.toml @@ -16,4 +16,4 @@ version = "5.0.10" [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/graphql_example/migration/Cargo.toml b/examples/graphql_example/migration/Cargo.toml index 85cfe4476..df9b5b8b6 100644 --- a/examples/graphql_example/migration/Cargo.toml +++ b/examples/graphql_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/graphql_example/service/Cargo.toml b/examples/graphql_example/service/Cargo.toml index 37f761ac0..5b9d34681 100644 --- a/examples/graphql_example/service/Cargo.toml +++ b/examples/graphql_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/jsonrpsee_example/entity/Cargo.toml b/examples/jsonrpsee_example/entity/Cargo.toml index 423712d5e..0bdda2b18 100644 --- a/examples/jsonrpsee_example/entity/Cargo.toml +++ b/examples/jsonrpsee_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/jsonrpsee_example/migration/Cargo.toml b/examples/jsonrpsee_example/migration/Cargo.toml index d9727521a..aa7a72827 100644 --- a/examples/jsonrpsee_example/migration/Cargo.toml +++ b/examples/jsonrpsee_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/jsonrpsee_example/service/Cargo.toml b/examples/jsonrpsee_example/service/Cargo.toml index 6cf8531d4..4ceff63ba 100644 --- a/examples/jsonrpsee_example/service/Cargo.toml +++ b/examples/jsonrpsee_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/poem_example/entity/Cargo.toml b/examples/poem_example/entity/Cargo.toml index 423712d5e..0bdda2b18 100644 --- a/examples/poem_example/entity/Cargo.toml +++ b/examples/poem_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/poem_example/migration/Cargo.toml b/examples/poem_example/migration/Cargo.toml index d9727521a..aa7a72827 100644 --- a/examples/poem_example/migration/Cargo.toml +++ b/examples/poem_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/poem_example/service/Cargo.toml b/examples/poem_example/service/Cargo.toml index 77e4f056d..f57bf1219 100644 --- a/examples/poem_example/service/Cargo.toml +++ b/examples/poem_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/rocket_example/entity/Cargo.toml b/examples/rocket_example/entity/Cargo.toml index f5f931816..c17888958 100644 --- a/examples/rocket_example/entity/Cargo.toml +++ b/examples/rocket_example/entity/Cargo.toml @@ -13,4 +13,4 @@ rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/rocket_example/migration/Cargo.toml b/examples/rocket_example/migration/Cargo.toml index 3bd0ff4f6..75ec098fc 100644 --- a/examples/rocket_example/migration/Cargo.toml +++ b/examples/rocket_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/rocket_example/service/Cargo.toml b/examples/rocket_example/service/Cargo.toml index 668512eb3..0a86e2141 100644 --- a/examples/rocket_example/service/Cargo.toml +++ b/examples/rocket_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "runtime-tokio-native-tls", "sqlx-postgres", diff --git a/examples/rocket_okapi_example/entity/Cargo.toml b/examples/rocket_okapi_example/entity/Cargo.toml index 5cc820a06..96196ddba 100644 --- a/examples/rocket_okapi_example/entity/Cargo.toml +++ b/examples/rocket_okapi_example/entity/Cargo.toml @@ -13,7 +13,7 @@ rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version [dependencies.rocket_okapi] version = "0.8.0-rc.2" diff --git a/examples/rocket_okapi_example/migration/Cargo.toml b/examples/rocket_okapi_example/migration/Cargo.toml index 3bd0ff4f6..75ec098fc 100644 --- a/examples/rocket_okapi_example/migration/Cargo.toml +++ b/examples/rocket_okapi_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/rocket_okapi_example/service/Cargo.toml b/examples/rocket_okapi_example/service/Cargo.toml index caab7631e..0525cbcff 100644 --- a/examples/rocket_okapi_example/service/Cargo.toml +++ b/examples/rocket_okapi_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "runtime-tokio-native-tls", "sqlx-postgres", diff --git a/examples/salvo_example/entity/Cargo.toml b/examples/salvo_example/entity/Cargo.toml index a9faf0dbe..bcd2a2074 100644 --- a/examples/salvo_example/entity/Cargo.toml +++ b/examples/salvo_example/entity/Cargo.toml @@ -14,4 +14,4 @@ salvo = { version = "0.50" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/salvo_example/migration/Cargo.toml b/examples/salvo_example/migration/Cargo.toml index d9727521a..aa7a72827 100644 --- a/examples/salvo_example/migration/Cargo.toml +++ b/examples/salvo_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/salvo_example/service/Cargo.toml b/examples/salvo_example/service/Cargo.toml index 890b87110..ee8da382d 100644 --- a/examples/salvo_example/service/Cargo.toml +++ b/examples/salvo_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/seaography_example/migration/Cargo.toml b/examples/seaography_example/migration/Cargo.toml index 9abea8773..790dc31be 100644 --- a/examples/seaography_example/migration/Cargo.toml +++ b/examples/seaography_example/migration/Cargo.toml @@ -15,11 +15,11 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm] path = "../../.." # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ "runtime-async-std-native-tls", "sqlx-mysql", diff --git a/examples/tonic_example/entity/Cargo.toml b/examples/tonic_example/entity/Cargo.toml index 423712d5e..0bdda2b18 100644 --- a/examples/tonic_example/entity/Cargo.toml +++ b/examples/tonic_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version diff --git a/examples/tonic_example/migration/Cargo.toml b/examples/tonic_example/migration/Cargo.toml index 55bc37adf..a5cb04f1f 100644 --- a/examples/tonic_example/migration/Cargo.toml +++ b/examples/tonic_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.4" # sea-orm-migration version +version = "0.12.5" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-rustls", diff --git a/examples/tonic_example/service/Cargo.toml b/examples/tonic_example/service/Cargo.toml index 2182262b2..beee6ad09 100644 --- a/examples/tonic_example/service/Cargo.toml +++ b/examples/tonic_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.4" # sea-orm version +version = "0.12.5" # sea-orm version features = [ "debug-print", "runtime-tokio-rustls", From 1ce3778c619d8ee4717fe1a33504f1aeb8bf2310 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 13 Nov 2023 09:03:26 +0000 Subject: [PATCH 18/19] 0.12.6 --- CHANGELOG.md | 4 +++- Cargo.toml | 4 ++-- sea-orm-cli/Cargo.toml | 4 ++-- sea-orm-codegen/Cargo.toml | 2 +- sea-orm-macros/Cargo.toml | 2 +- sea-orm-migration/Cargo.toml | 6 +++--- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 377c2c5e5..9bd6166cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 0.12.5 - 2023-11-12 +## 0.12.6 - 2023-11-13 ### New Features * Added `#[sea_orm(skip)]` for `FromQueryResult` derive macro https://github.com/SeaQL/sea-orm/pull/1954 +## 0.12.5 - 2023-11-12 + ### Bug Fixes * [sea-orm-cli] Fix duplicated active enum use statements on generated entities https://github.com/SeaQL/sea-orm/pull/1953 diff --git a/Cargo.toml b/Cargo.toml index ddaa271a0..c6b1ad9a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [".", "sea-orm-macros", "sea-orm-codegen"] [package] name = "sea-orm" -version = "0.12.5" +version = "0.12.6" authors = ["Chris Tsang "] edition = "2021" description = "🐚 An async & dynamic ORM for Rust" @@ -33,7 +33,7 @@ log = { version = "0.4", default-features = false } tracing = { version = "0.1", default-features = false, features = ["attributes", "log"] } rust_decimal = { version = "1", default-features = false, optional = true } bigdecimal = { version = "0.3", default-features = false, optional = true } -sea-orm-macros = { version = "0.12.5", path = "sea-orm-macros", default-features = false, features = ["strum"] } +sea-orm-macros = { version = "0.12.6", path = "sea-orm-macros", default-features = false, features = ["strum"] } sea-query = { version = "0.30.2", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] } sea-query-binder = { version = "0.5.0", default-features = false, optional = true } strum = { version = "0.25", default-features = false } diff --git a/sea-orm-cli/Cargo.toml b/sea-orm-cli/Cargo.toml index 6945155b9..5db16904a 100644 --- a/sea-orm-cli/Cargo.toml +++ b/sea-orm-cli/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "sea-orm-cli" -version = "0.12.5" +version = "0.12.6" authors = [ "Chris Tsang ", "Billy Chan ", @@ -37,7 +37,7 @@ required-features = ["cli", "codegen"] clap = { version = "4.3", features = ["env", "derive"], optional = true } dotenvy = { version = "0.15", default-features = false, optional = true } async-std = { version = "1.9", default-features = false, features = ["attributes", "tokio1"], optional = true } -sea-orm-codegen = { version = "=0.12.5", path = "../sea-orm-codegen", default-features = false, optional = true } +sea-orm-codegen = { version = "=0.12.6", path = "../sea-orm-codegen", default-features = false, optional = true } sea-schema = { version = "0.14.0" } sqlx = { version = "0.7", default-features = false, features = ["mysql", "postgres"], optional = true } tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] } diff --git a/sea-orm-codegen/Cargo.toml b/sea-orm-codegen/Cargo.toml index 2a1b29b44..e7f6ffd1a 100644 --- a/sea-orm-codegen/Cargo.toml +++ b/sea-orm-codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-codegen" -version = "0.12.5" +version = "0.12.6" authors = ["Billy Chan "] edition = "2021" description = "Code Generator for SeaORM" diff --git a/sea-orm-macros/Cargo.toml b/sea-orm-macros/Cargo.toml index db5299109..49b1653aa 100644 --- a/sea-orm-macros/Cargo.toml +++ b/sea-orm-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-macros" -version = "0.12.5" +version = "0.12.6" authors = [ "Billy Chan " ] edition = "2021" description = "Derive macros for SeaORM" diff --git a/sea-orm-migration/Cargo.toml b/sea-orm-migration/Cargo.toml index 7785dbf64..dcb5f83a6 100644 --- a/sea-orm-migration/Cargo.toml +++ b/sea-orm-migration/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "sea-orm-migration" -version = "0.12.5" +version = "0.12.6" authors = ["Billy Chan "] edition = "2021" description = "Migration utility for SeaORM" @@ -23,8 +23,8 @@ path = "src/lib.rs" async-trait = { version = "0.1", default-features = false } clap = { version = "4.3", features = ["env", "derive"], optional = true } dotenvy = { version = "0.15", default-features = false, optional = true } -sea-orm = { version = "0.12.5", path = "../", default-features = false, features = ["macros"] } -sea-orm-cli = { version = "0.12.5", path = "../sea-orm-cli", default-features = false, optional = true } +sea-orm = { version = "0.12.6", path = "../", default-features = false, features = ["macros"] } +sea-orm-cli = { version = "0.12.6", path = "../sea-orm-cli", default-features = false, optional = true } sea-schema = { version = "0.14.1" } tracing = { version = "0.1", default-features = false, features = ["log"] } tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] } From 8aa49beb6d7a2670cc955a89c7b3efbd018b9752 Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Mon, 13 Nov 2023 09:03:26 +0000 Subject: [PATCH 19/19] update examples --- examples/actix3_example/entity/Cargo.toml | 2 +- examples/actix3_example/migration/Cargo.toml | 2 +- examples/actix3_example/service/Cargo.toml | 2 +- examples/actix_example/entity/Cargo.toml | 2 +- examples/actix_example/migration/Cargo.toml | 2 +- examples/actix_example/service/Cargo.toml | 2 +- examples/axum_example/entity/Cargo.toml | 2 +- examples/axum_example/migration/Cargo.toml | 2 +- examples/axum_example/service/Cargo.toml | 2 +- examples/graphql_example/entity/Cargo.toml | 2 +- examples/graphql_example/migration/Cargo.toml | 2 +- examples/graphql_example/service/Cargo.toml | 2 +- examples/jsonrpsee_example/entity/Cargo.toml | 2 +- examples/jsonrpsee_example/migration/Cargo.toml | 2 +- examples/jsonrpsee_example/service/Cargo.toml | 2 +- examples/poem_example/entity/Cargo.toml | 2 +- examples/poem_example/migration/Cargo.toml | 2 +- examples/poem_example/service/Cargo.toml | 2 +- examples/rocket_example/entity/Cargo.toml | 2 +- examples/rocket_example/migration/Cargo.toml | 2 +- examples/rocket_example/service/Cargo.toml | 2 +- examples/rocket_okapi_example/entity/Cargo.toml | 2 +- examples/rocket_okapi_example/migration/Cargo.toml | 2 +- examples/rocket_okapi_example/service/Cargo.toml | 2 +- examples/salvo_example/entity/Cargo.toml | 2 +- examples/salvo_example/migration/Cargo.toml | 2 +- examples/salvo_example/service/Cargo.toml | 2 +- examples/seaography_example/migration/Cargo.toml | 4 ++-- examples/tonic_example/entity/Cargo.toml | 2 +- examples/tonic_example/migration/Cargo.toml | 2 +- examples/tonic_example/service/Cargo.toml | 2 +- 31 files changed, 32 insertions(+), 32 deletions(-) diff --git a/examples/actix3_example/entity/Cargo.toml b/examples/actix3_example/entity/Cargo.toml index 0bdda2b18..41f742f6d 100644 --- a/examples/actix3_example/entity/Cargo.toml +++ b/examples/actix3_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/actix3_example/migration/Cargo.toml b/examples/actix3_example/migration/Cargo.toml index fde1eb681..f115e64c1 100644 --- a/examples/actix3_example/migration/Cargo.toml +++ b/examples/actix3_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-async-std-native-tls", diff --git a/examples/actix3_example/service/Cargo.toml b/examples/actix3_example/service/Cargo.toml index 64dd92bf7..ccb410070 100644 --- a/examples/actix3_example/service/Cargo.toml +++ b/examples/actix3_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/actix_example/entity/Cargo.toml b/examples/actix_example/entity/Cargo.toml index 0bdda2b18..41f742f6d 100644 --- a/examples/actix_example/entity/Cargo.toml +++ b/examples/actix_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/actix_example/migration/Cargo.toml b/examples/actix_example/migration/Cargo.toml index c3c678c86..ae056a10f 100644 --- a/examples/actix_example/migration/Cargo.toml +++ b/examples/actix_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-actix-native-tls", diff --git a/examples/actix_example/service/Cargo.toml b/examples/actix_example/service/Cargo.toml index cf0380589..c8092b362 100644 --- a/examples/actix_example/service/Cargo.toml +++ b/examples/actix_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/axum_example/entity/Cargo.toml b/examples/axum_example/entity/Cargo.toml index 0bdda2b18..41f742f6d 100644 --- a/examples/axum_example/entity/Cargo.toml +++ b/examples/axum_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/axum_example/migration/Cargo.toml b/examples/axum_example/migration/Cargo.toml index 6d2a9e23c..518046de3 100644 --- a/examples/axum_example/migration/Cargo.toml +++ b/examples/axum_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/axum_example/service/Cargo.toml b/examples/axum_example/service/Cargo.toml index 087e65e07..0069d8d76 100644 --- a/examples/axum_example/service/Cargo.toml +++ b/examples/axum_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/graphql_example/entity/Cargo.toml b/examples/graphql_example/entity/Cargo.toml index cf43f673e..66bd454be 100644 --- a/examples/graphql_example/entity/Cargo.toml +++ b/examples/graphql_example/entity/Cargo.toml @@ -16,4 +16,4 @@ version = "5.0.10" [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/graphql_example/migration/Cargo.toml b/examples/graphql_example/migration/Cargo.toml index df9b5b8b6..e03da112a 100644 --- a/examples/graphql_example/migration/Cargo.toml +++ b/examples/graphql_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/graphql_example/service/Cargo.toml b/examples/graphql_example/service/Cargo.toml index 5b9d34681..1158114a5 100644 --- a/examples/graphql_example/service/Cargo.toml +++ b/examples/graphql_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/jsonrpsee_example/entity/Cargo.toml b/examples/jsonrpsee_example/entity/Cargo.toml index 0bdda2b18..41f742f6d 100644 --- a/examples/jsonrpsee_example/entity/Cargo.toml +++ b/examples/jsonrpsee_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/jsonrpsee_example/migration/Cargo.toml b/examples/jsonrpsee_example/migration/Cargo.toml index aa7a72827..f1efa6ea4 100644 --- a/examples/jsonrpsee_example/migration/Cargo.toml +++ b/examples/jsonrpsee_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/jsonrpsee_example/service/Cargo.toml b/examples/jsonrpsee_example/service/Cargo.toml index 4ceff63ba..f056221a3 100644 --- a/examples/jsonrpsee_example/service/Cargo.toml +++ b/examples/jsonrpsee_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/poem_example/entity/Cargo.toml b/examples/poem_example/entity/Cargo.toml index 0bdda2b18..41f742f6d 100644 --- a/examples/poem_example/entity/Cargo.toml +++ b/examples/poem_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/poem_example/migration/Cargo.toml b/examples/poem_example/migration/Cargo.toml index aa7a72827..f1efa6ea4 100644 --- a/examples/poem_example/migration/Cargo.toml +++ b/examples/poem_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/poem_example/service/Cargo.toml b/examples/poem_example/service/Cargo.toml index f57bf1219..8dbb7bf1d 100644 --- a/examples/poem_example/service/Cargo.toml +++ b/examples/poem_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/rocket_example/entity/Cargo.toml b/examples/rocket_example/entity/Cargo.toml index c17888958..60cf1e8a4 100644 --- a/examples/rocket_example/entity/Cargo.toml +++ b/examples/rocket_example/entity/Cargo.toml @@ -13,4 +13,4 @@ rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/rocket_example/migration/Cargo.toml b/examples/rocket_example/migration/Cargo.toml index 75ec098fc..b5bda5b0a 100644 --- a/examples/rocket_example/migration/Cargo.toml +++ b/examples/rocket_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/rocket_example/service/Cargo.toml b/examples/rocket_example/service/Cargo.toml index 0a86e2141..8b72ed797 100644 --- a/examples/rocket_example/service/Cargo.toml +++ b/examples/rocket_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "runtime-tokio-native-tls", "sqlx-postgres", diff --git a/examples/rocket_okapi_example/entity/Cargo.toml b/examples/rocket_okapi_example/entity/Cargo.toml index 96196ddba..91dd20795 100644 --- a/examples/rocket_okapi_example/entity/Cargo.toml +++ b/examples/rocket_okapi_example/entity/Cargo.toml @@ -13,7 +13,7 @@ rocket = { version = "0.5.0-rc.4", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version [dependencies.rocket_okapi] version = "0.8.0-rc.2" diff --git a/examples/rocket_okapi_example/migration/Cargo.toml b/examples/rocket_okapi_example/migration/Cargo.toml index 75ec098fc..b5bda5b0a 100644 --- a/examples/rocket_okapi_example/migration/Cargo.toml +++ b/examples/rocket_okapi_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/rocket_okapi_example/service/Cargo.toml b/examples/rocket_okapi_example/service/Cargo.toml index 0525cbcff..cde5208b2 100644 --- a/examples/rocket_okapi_example/service/Cargo.toml +++ b/examples/rocket_okapi_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "runtime-tokio-native-tls", "sqlx-postgres", diff --git a/examples/salvo_example/entity/Cargo.toml b/examples/salvo_example/entity/Cargo.toml index bcd2a2074..058b355f4 100644 --- a/examples/salvo_example/entity/Cargo.toml +++ b/examples/salvo_example/entity/Cargo.toml @@ -14,4 +14,4 @@ salvo = { version = "0.50" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/salvo_example/migration/Cargo.toml b/examples/salvo_example/migration/Cargo.toml index aa7a72827..f1efa6ea4 100644 --- a/examples/salvo_example/migration/Cargo.toml +++ b/examples/salvo_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/salvo_example/service/Cargo.toml b/examples/salvo_example/service/Cargo.toml index ee8da382d..d778d8b4b 100644 --- a/examples/salvo_example/service/Cargo.toml +++ b/examples/salvo_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/seaography_example/migration/Cargo.toml b/examples/seaography_example/migration/Cargo.toml index 790dc31be..742462866 100644 --- a/examples/seaography_example/migration/Cargo.toml +++ b/examples/seaography_example/migration/Cargo.toml @@ -15,11 +15,11 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm] path = "../../.." # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ "runtime-async-std-native-tls", "sqlx-mysql", diff --git a/examples/tonic_example/entity/Cargo.toml b/examples/tonic_example/entity/Cargo.toml index 0bdda2b18..41f742f6d 100644 --- a/examples/tonic_example/entity/Cargo.toml +++ b/examples/tonic_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version diff --git a/examples/tonic_example/migration/Cargo.toml b/examples/tonic_example/migration/Cargo.toml index a5cb04f1f..3cb2baf5c 100644 --- a/examples/tonic_example/migration/Cargo.toml +++ b/examples/tonic_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "0.12.5" # sea-orm-migration version +version = "0.12.6" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-rustls", diff --git a/examples/tonic_example/service/Cargo.toml b/examples/tonic_example/service/Cargo.toml index beee6ad09..e8fb93ec2 100644 --- a/examples/tonic_example/service/Cargo.toml +++ b/examples/tonic_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "0.12.5" # sea-orm version +version = "0.12.6" # sea-orm version features = [ "debug-print", "runtime-tokio-rustls",