Open bWanShiTong opened 1 month ago
Note:
Code bellow works
heart_rate::Entity::insert(model)
.on_conflict(
OnConflict::column(heart_rate::Column::Unix)
.do_nothing()
.to_owned(),
)
.do_nothing()
.exec(&pool)
.await?;
But following doesn't:
heart_rate::Entity::insert(model)
.on_conflict(
OnConflict::column(heart_rate::Column::Unix)
.do_nothing()
.to_owned(),
)
.exec(&pool)
.await?;
Description
Steps to Reproduce
Create table with:
Run:
[tokio::main]
async fn main() -> Result<(), anyhow::Error> { let db_url = env::var("DATABASE_URL").expect("DATABASE_URL not set in env"); let pool = Database::connect(db_url).await?;
}
Reproduces How Often
Every time
Workarounds
No
Reproducible Example
See above
Versions