pub struct HistoryFileMigration {
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_cli::HistoryFileMigration;
let entry = HistoryFileMigration {
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 HistoryFileMigration
impl Clone for HistoryFileMigration
Source§fn clone(&self) -> HistoryFileMigration
fn clone(&self) -> HistoryFileMigration
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 HistoryFileMigration
impl Debug for HistoryFileMigration
Source§impl<'de> Deserialize<'de> for HistoryFileMigration
impl<'de> Deserialize<'de> for HistoryFileMigration
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 HistoryFileMigration
impl RefUnwindSafe for HistoryFileMigration
impl Send for HistoryFileMigration
impl Sync for HistoryFileMigration
impl Unpin for HistoryFileMigration
impl UnwindSafe for HistoryFileMigration
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