thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Query("error occurred while decoding column \"paid_at\": mismatched types; Rust type `core::option::Option<chrono::datetime::DateTime<chrono::offset::utc::Utc>>` (as SQL type `TIMESTAMPTZ`) is not compatible with SQL type `TIMESTAMP`")', src/handler/order.rs:17:56
The generate code created_at field is DateTimeUtc type not DateTime (without time zone)
psql (13.6, server 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
You are now connected to database "w" as user "postgres".
w=# \d orders
Table "public.orders"
Column | Type | Collation | Nullable | Default
------------+-----------------------------+-----------+----------+-------------------
team_id | bigint | | not null |
product_id | bigint | | not null |
user_id | bigint | | not null |
service_id | bigint | | not null |
status | order_status | | not null |
type_ | order_type | | not null |
paid_at | timestamp without time zone | | not null |
price | integer | | not null |
id | bigint | | not null |
created_at | timestamp without time zone | | not null | CURRENT_TIMESTAMP
Description
I want use postgres
timestamp without time zone
type in sea-ormSteps to Reproduce
Expected Behavior
The generate code created_at field is
Actual Behavior
The generate code created_at field is
DateTimeUtc
type notDateTime
(without time zone)Reproduces How Often
always
Versions
Additional Information
postgres orders table schema