pub struct Schema { /* private fields */ }Implementations§
Source§impl Schema
impl Schema
Sourcepub fn initialize(
&self,
conn: &mut Connection,
db_kind: Option<DbKind>,
) -> Result<()>
pub fn initialize( &self, conn: &mut Connection, db_kind: Option<DbKind>, ) -> Result<()>
Determine if any database migrations need to run, and run them if so. The decision is based on the difference between this Schema’s current_index and the user_version pragma value in the database itself. NB: The current_index is 0-based, and the user_version is 1-based.
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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