pub enum DefaultVersioning {
Inferred,
Timestamp,
Sequential,
}Available on crate feature
_unstable-docs only.Expand description
The default scheme that sqlx migrate add should use for version integers.
Variantsยง
Inferred
Infer the versioning scheme from existing migrations:
- If the versions of the last two migrations differ by
1, inferSequential. - If only one migration exists and has version
1, inferSequential. - Otherwise, infer
Timestamp.
Timestamp
Use UTC timestamps for migration versions.
This is the recommended versioning format as itโs less likely to collide when multiple developers are creating migrations on different branches.
The exact timestamp format is unspecified.
Sequential
Use sequential integers for migration versions.
Trait Implementationsยง
Sourceยงimpl Debug for DefaultVersioning
impl Debug for DefaultVersioning
Sourceยงimpl Default for DefaultVersioning
impl Default for DefaultVersioning
Sourceยงfn default() -> DefaultVersioning
fn default() -> DefaultVersioning
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl PartialEq for DefaultVersioning
impl PartialEq for DefaultVersioning
impl Eq for DefaultVersioning
impl StructuralPartialEq for DefaultVersioning
Auto Trait Implementationsยง
impl Freeze for DefaultVersioning
impl RefUnwindSafe for DefaultVersioning
impl Send for DefaultVersioning
impl Sync for DefaultVersioning
impl Unpin for DefaultVersioning
impl UnwindSafe for DefaultVersioning
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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