Support sea-query 0.12.9

This commit is contained in:
Chris Tsang 2021-08-08 15:42:53 +08:00
parent e228ada74a
commit b9a537db3b
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "sea-orm-codegen" name = "sea-orm-codegen"
version = "0.1.0" version = "0.1.1"
authors = ["Billy Chan <ccw.billy.123@gmail.com>"] authors = ["Billy Chan <ccw.billy.123@gmail.com>"]
edition = "2018" edition = "2018"
description = "Code Generator for SeaORM" description = "Code Generator for SeaORM"

View File

@ -41,6 +41,7 @@ impl Column {
ColumnType::Uuid => "Uuid", ColumnType::Uuid => "Uuid",
ColumnType::Binary(_) => "Vec<u8>", ColumnType::Binary(_) => "Vec<u8>",
ColumnType::Boolean => "bool", ColumnType::Boolean => "bool",
_ => unimplemented!(),
} }
.parse() .parse()
.unwrap(); .unwrap();
@ -87,7 +88,8 @@ impl Column {
ColumnType::Custom(s) => { ColumnType::Custom(s) => {
let s = s.to_string(); let s = s.to_string();
quote! { ColumnType::Custom(#s.to_owned()).def() } quote! { ColumnType::Custom(#s.to_owned()).def() }
} },
_ => unimplemented!(),
}; };
if !self.not_null { if !self.not_null {
col_def.extend(quote! { col_def.extend(quote! {