pub struct MigrationDetails {
pub version: i64,
pub name: String,
pub state: MigrationState,
pub applied_at: Option<DateTime<Utc>>,
pub rolled_back_at: Option<DateTime<Utc>>,
pub checksum: Option<String>,
pub execution_time_ms: Option<i64>,
pub error_message: Option<String>,
}
Expand description
Detailed information about a single migration
Fields§
§version: i64
Unique version identifier
name: String
Human-readable name
state: MigrationState
Current state of the migration
applied_at: Option<DateTime<Utc>>
When the migration was applied
rolled_back_at: Option<DateTime<Utc>>
When the migration was rolled back (if applicable)
checksum: Option<String>
Checksum for verification
execution_time_ms: Option<i64>
Execution time in milliseconds
error_message: Option<String>
Error message if migration failed
Implementations§
Source§impl MigrationDetails
impl MigrationDetails
Sourcepub fn mark_applied(&mut self, execution_time_ms: i64)
pub fn mark_applied(&mut self, execution_time_ms: i64)
Mark migration as successfully applied
Sourcepub fn mark_failed(&mut self, error: String)
pub fn mark_failed(&mut self, error: String)
Mark migration as failed
Sourcepub fn mark_rolled_back(&mut self)
pub fn mark_rolled_back(&mut self)
Mark migration as rolled back
Trait Implementations§
Source§impl Clone for MigrationDetails
impl Clone for MigrationDetails
Source§fn clone(&self) -> MigrationDetails
fn clone(&self) -> MigrationDetails
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MigrationDetails
impl Debug for MigrationDetails
Source§impl<'de> Deserialize<'de> for MigrationDetails
impl<'de> Deserialize<'de> for MigrationDetails
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 MigrationDetails
impl RefUnwindSafe for MigrationDetails
impl Send for MigrationDetails
impl Sync for MigrationDetails
impl Unpin for MigrationDetails
impl UnwindSafe for MigrationDetails
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