pub struct MigrationReport {
pub successful: Vec<MigrationResult>,
pub failed: Vec<MigrationResult>,
pub skipped: Vec<i64>,
pub total_time_ms: i64,
pub started_at: DateTime<Utc>,
pub completed_at: Option<DateTime<Utc>>,
}
Expand description
Report of migration operations
Fields§
§successful: Vec<MigrationResult>
Successfully applied migrations
failed: Vec<MigrationResult>
Failed migrations
skipped: Vec<i64>
Skipped migrations (already applied)
total_time_ms: i64
Total execution time in milliseconds
started_at: DateTime<Utc>
Start time of the operation
completed_at: Option<DateTime<Utc>>
End time of the operation
Implementations§
Source§impl MigrationReport
impl MigrationReport
Sourcepub fn add_success(&mut self, result: MigrationResult)
pub fn add_success(&mut self, result: MigrationResult)
Add a successful migration result
Sourcepub fn add_failure(&mut self, result: MigrationResult)
pub fn add_failure(&mut self, result: MigrationResult)
Add a failed migration result
Sourcepub fn add_skipped(&mut self, version: i64)
pub fn add_skipped(&mut self, version: i64)
Add a skipped migration
Sourcepub fn successful_count(&self) -> usize
pub fn successful_count(&self) -> usize
Get the number of successful migrations
Sourcepub fn failed_count(&self) -> usize
pub fn failed_count(&self) -> usize
Get the number of failed migrations
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if all migrations were successful
Trait Implementations§
Source§impl Debug for MigrationReport
impl Debug for MigrationReport
Source§impl Default for MigrationReport
impl Default for MigrationReport
Source§fn default() -> MigrationReport
fn default() -> MigrationReport
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MigrationReport
impl<'de> Deserialize<'de> for MigrationReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MigrationReport
impl RefUnwindSafe for MigrationReport
impl Send for MigrationReport
impl Sync for MigrationReport
impl Unpin for MigrationReport
impl UnwindSafe for MigrationReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more