pub struct Migrations<'c> { /* private fields */ }Expand description
Helper struct for applying migrations to a database connection.
This struct manages the migration process, ensuring that the database schema is brought up to the current version by applying any pending migrations.
Implementations§
Source§impl<'c> Migrations<'c>
impl<'c> Migrations<'c>
Sourcepub fn prepare(self) -> Result<()>
pub fn prepare(self) -> Result<()>
Prepares the database connection by configuring settings and applying migrations.
This method performs the following operations:
- Enables foreign key constraints if configured
- Applies any pending migrations to bring the schema up to date
§Returns
Returns Ok(()) on success, or a rusqlite::Error if any operation fails.
Auto Trait Implementations§
impl<'c> !RefUnwindSafe for Migrations<'c>
impl<'c> !Sync for Migrations<'c>
impl<'c> !UnwindSafe for Migrations<'c>
impl<'c> Freeze for Migrations<'c>
impl<'c> Send for Migrations<'c>
impl<'c> Unpin for Migrations<'c>
impl<'c> UnsafeUnpin for Migrations<'c>
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