Skip to content

Commit

Permalink
feat: use Duration for migrations' execution_time
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmauro committed Nov 18, 2024
1 parent 416c187 commit 9964ee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/dal/src/system_dal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct DatabaseMigration {
pub installed_on: DateTime<chrono::Utc>,
pub success: bool,
pub checksum: String,
pub execution_time: i64,
pub execution_time: Duration,
}

#[derive(Debug)]
Expand Down Expand Up @@ -118,7 +118,7 @@ impl SystemDal<'_, '_> {
installed_on: row.installed_on,
success: row.success,
checksum: hex::encode(row.checksum),
execution_time: row.execution_time,
execution_time: Duration::from_millis(u64::try_from(row.execution_time).unwrap_or(0)),
})
}
}

0 comments on commit 9964ee7

Please sign in to comment.