pub struct ResolvedMigration {
pub kind: MigrationKind,
pub description: String,
pub script: String,
pub checksum: i32,
pub sql: String,
pub directives: MigrationDirectives,
}Expand description
A migration file discovered on disk.
Fields§
§kind: MigrationKindWhether this is a versioned, repeatable, or undo migration (with version if applicable).
description: StringHuman-readable description extracted from the filename.
script: StringOriginal filename of the migration script (e.g., V1__Create_users.sql).
checksum: i32CRC32 checksum of the migration SQL content.
sql: StringRaw SQL content of the migration file.
directives: MigrationDirectivesParsed directives from SQL comments (e.g., @depends, @environment).
Implementations§
Source§impl ResolvedMigration
impl ResolvedMigration
Sourcepub fn version(&self) -> Option<&MigrationVersion>
pub fn version(&self) -> Option<&MigrationVersion>
Get the version if this is a versioned or undo migration.
Sourcepub fn migration_type(&self) -> MigrationType
pub fn migration_type(&self) -> MigrationType
Get the migration type for display/serialization.
Sourcepub fn is_versioned(&self) -> bool
pub fn is_versioned(&self) -> bool
Whether this is a versioned migration.
Trait Implementations§
Source§impl Clone for ResolvedMigration
impl Clone for ResolvedMigration
Source§fn clone(&self) -> ResolvedMigration
fn clone(&self) -> ResolvedMigration
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 moreAuto Trait Implementations§
impl Freeze for ResolvedMigration
impl RefUnwindSafe for ResolvedMigration
impl Send for ResolvedMigration
impl Sync for ResolvedMigration
impl Unpin for ResolvedMigration
impl UnsafeUnpin for ResolvedMigration
impl UnwindSafe for ResolvedMigration
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