pub struct HistoryEntry {
pub id: u64,
pub name: String,
pub snapshot_name: String,
pub checksum: Option<String>,
}Expand description
A single entry in the migration history.
Each entry records the randomly-assigned ID used by the database driver to track application status, the migration SQL file name, the companion snapshot file name, and an optional checksum.
§Examples
use toasty_core::migration::HistoryEntry;
let entry = HistoryEntry {
id: 42,
name: "0001_create_users.sql".to_string(),
snapshot_name: "0001_snapshot.toml".to_string(),
checksum: None,
};
assert_eq!(entry.id, 42);
assert_eq!(entry.name, "0001_create_users.sql");Fields§
§id: u64Random unique identifier for this migration.
name: StringMigration name/identifier.
snapshot_name: StringName of the snapshot generated alongside this migration.
checksum: Option<String>Optional checksum of the migration file to detect changes
Trait Implementations§
Source§impl Clone for HistoryEntry
impl Clone for HistoryEntry
Source§fn clone(&self) -> HistoryEntry
fn clone(&self) -> HistoryEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HistoryEntry
impl Debug for HistoryEntry
Source§impl<'de> Deserialize<'de> for HistoryEntry
impl<'de> Deserialize<'de> for HistoryEntry
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 HistoryEntry
impl RefUnwindSafe for HistoryEntry
impl Send for HistoryEntry
impl Sync for HistoryEntry
impl Unpin for HistoryEntry
impl UnsafeUnpin for HistoryEntry
impl UnwindSafe for HistoryEntry
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