#[non_exhaustive]pub struct MigrationOptions {
pub version_table: String,
}Expand description
Runtime options controlling how Vespertide tracks applied migrations.
Pass this to the migration runner to configure the version-tracking table name.
The default table name used by the vespertide_migration! macro is "vespertide_migrations".
MigrationOptions is #[non_exhaustive], so external callers must construct
via MigrationOptions::new() or Default::default() rather than struct literals.
Construction:
use vespertide_core::MigrationOptions;
// Named constructor — preferred when overriding the version table.
let opts = MigrationOptions::new("app_migrations");
assert_eq!(opts.version_table, "app_migrations");
// Default gives the standard tracking table name.
let default_opts = MigrationOptions::default();
assert_eq!(default_opts.version_table, "vespertide_migrations");Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.version_table: StringName of the table used to record which migration versions have been applied.
Defaults to "vespertide_migrations". Override this when multiple Vespertide-managed
schemas share the same database and need separate version tables.
Implementations§
Trait Implementations§
Source§impl Clone for MigrationOptions
impl Clone for MigrationOptions
Source§fn clone(&self) -> MigrationOptions
fn clone(&self) -> MigrationOptions
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 MigrationOptions
impl Debug for MigrationOptions
Auto Trait Implementations§
impl Freeze for MigrationOptions
impl RefUnwindSafe for MigrationOptions
impl Send for MigrationOptions
impl Sync for MigrationOptions
impl Unpin for MigrationOptions
impl UnsafeUnpin for MigrationOptions
impl UnwindSafe for MigrationOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more