Struct schemamama_rusqlite::SqliteAdapter
[−]
[src]
pub struct SqliteAdapter<'a> { // some fields omitted }
An adapter that allows its migrations to act upon PostgreSQL connection transactions.
Methods
impl<'a> SqliteAdapter<'a>
[src]
fn new(connection: &'a SqliteConnection) -> SqliteAdapter<'a>
Create a new migrator tied to a SQLite connection.
fn setup_schema(&self)
Create the tables Schemamama requires to keep track of schema state. If the tables already exist, this function has no operation.
Trait Implementations
impl<'a> Adapter for SqliteAdapter<'a>
[src]
type MigrationType = SqliteMigration
An alias to a specific trait that extends Migration
. Typically, the aforementioned trait will declare functions that the adapter will use to migrate upwards and downwards. Read more
type Error = SqliteMigrationError
An adapter-specific error type that can be returned from any of this trait's methods.
fn current_version(&self) -> Result<Option<Version>>
Panics if setup_schema
hasn't previously been called or if the query otherwise fails.
fn migrated_versions(&self) -> Result<BTreeSet<Version>>
Panics if setup_schema
hasn't previously been called or if the query otherwise fails.
fn apply_migration(&self, migration: &SqliteMigration) -> Result<()>
Panics if setup_schema
hasn't previously been called or if the migration otherwise fails.
fn revert_migration(&self, migration: &SqliteMigration) -> Result<()>
Panics if setup_schema
hasn't previously been called or if the migration otherwise fails.