pub enum VersionStorage {
UserVersion,
Table {
table: String,
key: String,
},
VersionTable {
table: String,
version_column: String,
applied_at_column: String,
},
}Expand description
Where migration versions are stored. Table storage uses Blueprint-compatible
key TEXT PRIMARY KEY, value TEXT NOT NULL rows, leaving user_version untouched.
Variants§
UserVersion
Table
Table names must contain only ASCII letters, digits, or underscores. Keys are bound parameters and may contain arbitrary text.
VersionTable
One row per applied version, shaped "<version_column>" INTEGER PRIMARY KEY, "<applied_at_column>" INTEGER NOT NULL (ViewRight’s _migrations shape). The applied
version is the highest stored version_column; a rollback deletes the top row. The table is
created on the first write when absent. Identifiers must be ASCII letters, digits, or
underscores. applied_at stores unix seconds.
Implementations§
Source§impl VersionStorage
impl VersionStorage
Sourcepub fn version_table(table: impl Into<String>) -> Self
pub fn version_table(table: impl Into<String>) -> Self
VersionStorage::VersionTable with the version and applied_at column names.
Trait Implementations§
Source§impl Clone for VersionStorage
impl Clone for VersionStorage
Source§impl Debug for VersionStorage
impl Debug for VersionStorage
Source§impl Default for VersionStorage
impl Default for VersionStorage
impl Eq for VersionStorage
Source§impl PartialEq for VersionStorage
impl PartialEq for VersionStorage
impl StructuralPartialEq for VersionStorage
Auto Trait Implementations§
impl Freeze for VersionStorage
impl RefUnwindSafe for VersionStorage
impl Send for VersionStorage
impl Sync for VersionStorage
impl Unpin for VersionStorage
impl UnsafeUnpin for VersionStorage
impl UnwindSafe for VersionStorage
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