diff --git a/sea-orm-cli/Cargo.toml b/sea-orm-cli/Cargo.toml index a288f7a2..771a1f41 100644 --- a/sea-orm-cli/Cargo.toml +++ b/sea-orm-cli/Cargo.toml @@ -22,13 +22,13 @@ clap = { version = "^2.33.3" } dotenv = { version = "^0.15" } async-std = { version = "^1.9", features = [ "attributes" ] } sea-orm = { version = "^0.1", features = [ "sqlx-all" ] } -sea-orm-codegen = { version = "^0.1" } +sea-orm-codegen = { version = "^0.1", path = "../sea-orm-codegen" } sea-schema = { version = "^0.2.4", default-features = false, features = [ "sqlx-mysql", "sqlx-postgres", "discovery", "writer", -] } +], git = "https://github.com/SeaQL/sea-schema.git", branch = "pg-pk-generated-expr" } sqlx = { version = "^0.5", default-features = false, features = [ "mysql", "postgres" ] } [features] diff --git a/sea-orm-codegen/Cargo.toml b/sea-orm-codegen/Cargo.toml index 3511b614..624e6458 100644 --- a/sea-orm-codegen/Cargo.toml +++ b/sea-orm-codegen/Cargo.toml @@ -15,7 +15,7 @@ name = "sea_orm_codegen" path = "src/lib.rs" [dependencies] -sea-query = { version = "^0.12.8" } +sea-query = { version = "^0.14" } syn = { version = "^1", default-features = false, features = [ "derive", "parsing", diff --git a/sea-orm-codegen/src/entity/column.rs b/sea-orm-codegen/src/entity/column.rs index 6a630da6..a2c3b4f5 100644 --- a/sea-orm-codegen/src/entity/column.rs +++ b/sea-orm-codegen/src/entity/column.rs @@ -285,7 +285,7 @@ mod tests { #[test] fn test_from_column_def() { - let column: Column = ColumnDef::new(Alias::new("id")).string().into(); + let column: Column = ColumnDef::new(Alias::new("id")).string().to_owned().into(); assert_eq!( column.get_def().to_string(), quote! { @@ -294,13 +294,18 @@ mod tests { .to_string() ); - let column: Column = ColumnDef::new(Alias::new("id")).string().not_null().into(); + let column: Column = ColumnDef::new(Alias::new("id")) + .string() + .not_null() + .to_owned() + .into(); assert!(column.not_null); let column: Column = ColumnDef::new(Alias::new("id")) .string() .unique_key() .not_null() + .to_owned() .into(); assert!(column.unique); assert!(column.not_null); @@ -310,6 +315,7 @@ mod tests { .auto_increment() .unique_key() .not_null() + .to_owned() .into(); assert!(column.auto_increment); assert!(column.unique);