Codegen supports ColumnType::TimestampWithTimeZone

This commit is contained in:
Billy Chan 2021-09-17 21:57:16 +08:00
parent 6435b51d09
commit ffb0f1f07d
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7
2 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,7 @@ clap = { version = "^2.33.3" }
dotenv = { version = "^0.15" } dotenv = { version = "^0.15" }
async-std = { version = "^1.9", features = [ "attributes" ] } async-std = { version = "^1.9", features = [ "attributes" ] }
sea-orm-codegen = { version = "^0.2.0", path = "../sea-orm-codegen" } sea-orm-codegen = { version = "^0.2.0", path = "../sea-orm-codegen" }
sea-schema = { version = "^0.2.8", git = "https://github.com/SeaQL/sea-schema.git", default-features = false, features = [ sea-schema = { version = "^0.2.8", git = "https://github.com/SeaQL/sea-schema.git", branch = "pg-timestamp-tz", default-features = false, features = [
"debug-print", "debug-print",
"sqlx-mysql", "sqlx-mysql",
"sqlx-postgres", "sqlx-postgres",

View File

@ -38,6 +38,7 @@ impl Column {
ColumnType::Double(_) => "f64", ColumnType::Double(_) => "f64",
ColumnType::Json | ColumnType::JsonBinary => "Json", ColumnType::Json | ColumnType::JsonBinary => "Json",
ColumnType::DateTime(_) | ColumnType::Timestamp(_) => "DateTime", ColumnType::DateTime(_) | ColumnType::Timestamp(_) => "DateTime",
ColumnType::TimestampWithTimeZone(_) => "DateTimeWithTimeZone",
ColumnType::Decimal(_) | ColumnType::Money(_) => "Decimal", ColumnType::Decimal(_) | ColumnType::Money(_) => "Decimal",
ColumnType::Uuid => "Uuid", ColumnType::Uuid => "Uuid",
ColumnType::Binary(_) => "Vec<u8>", ColumnType::Binary(_) => "Vec<u8>",