pub struct MigrationTracking {
pub table: Cow<'static, str>,
pub schema: Option<Cow<'static, str>>,
}Expand description
Shared migration metadata configuration.
This contains only tracking metadata and can be reused by higher-level crates (CLI, runtime migrator, etc.) without pulling in migration runtime logic.
Fields§
§table: Cow<'static, str>Migrations tracking table name.
schema: Option<Cow<'static, str>>Optional schema name for the tracking table (PostgreSQL).
Implementations§
Source§impl MigrationTracking
impl MigrationTracking
Sourcepub fn new(
table: impl Into<Cow<'static, str>>,
schema: Option<impl Into<Cow<'static, str>>>,
) -> Self
pub fn new( table: impl Into<Cow<'static, str>>, schema: Option<impl Into<Cow<'static, str>>>, ) -> Self
Create tracking metadata from table/schema values.
Sourcepub fn table(self, table: impl Into<Cow<'static, str>>) -> Self
pub fn table(self, table: impl Into<Cow<'static, str>>) -> Self
Override table name while preserving schema.
Sourcepub fn schema(self, schema: impl Into<Cow<'static, str>>) -> Self
pub fn schema(self, schema: impl Into<Cow<'static, str>>) -> Self
Override schema while preserving table name.
Sourcepub fn without_schema(self) -> Self
pub fn without_schema(self) -> Self
Clear the schema while preserving table name.
Trait Implementations§
Source§impl Clone for MigrationTracking
impl Clone for MigrationTracking
Source§fn clone(&self) -> MigrationTracking
fn clone(&self) -> MigrationTracking
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 MigrationTracking
impl Debug for MigrationTracking
Source§impl Default for MigrationTracking
impl Default for MigrationTracking
Source§impl Hash for MigrationTracking
impl Hash for MigrationTracking
Source§impl PartialEq for MigrationTracking
impl PartialEq for MigrationTracking
Source§fn eq(&self, other: &MigrationTracking) -> bool
fn eq(&self, other: &MigrationTracking) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for MigrationTracking
impl StructuralPartialEq for MigrationTracking
Auto Trait Implementations§
impl Freeze for MigrationTracking
impl RefUnwindSafe for MigrationTracking
impl Send for MigrationTracking
impl Sync for MigrationTracking
impl Unpin for MigrationTracking
impl UnsafeUnpin for MigrationTracking
impl UnwindSafe for MigrationTracking
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