[−][src]Struct schemamama_postgres::PostgresAdapter
An adapter that allows its migrations to act upon PostgreSQL connection transactions.
Methods
impl<'a> PostgresAdapter<'a>
[src]
pub fn new(client: &'a mut Client) -> PostgresAdapter<'a>
[src]
Create a new migrator tied to a PostgreSQL connection.
pub fn set_metadata_table<S: Into<String>>(&mut self, metadata_table: S)
[src]
Sets a custom metadata table name for this adapter. By default, the metadata table name is
called schemamama
.
pub fn setup_schema(&self) -> Result<(), PostgresError>
[src]
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 PostgresAdapter<'a>
[src]
type MigrationType = dyn PostgresMigration
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 = PostgresError
An adapter-specific error type that can be returned from any of this trait's methods.
fn current_version(&self) -> Result<Option<Version>, PostgresError>
[src]
fn migrated_versions(&self) -> Result<BTreeSet<Version>, PostgresError>
[src]
fn apply_migration(
&self,
migration: &dyn PostgresMigration
) -> Result<(), PostgresError>
[src]
&self,
migration: &dyn PostgresMigration
) -> Result<(), PostgresError>
fn revert_migration(
&self,
migration: &dyn PostgresMigration
) -> Result<(), PostgresError>
[src]
&self,
migration: &dyn PostgresMigration
) -> Result<(), PostgresError>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PostgresAdapter<'a>
impl<'a> !Send for PostgresAdapter<'a>
impl<'a> !Sync for PostgresAdapter<'a>
impl<'a> Unpin for PostgresAdapter<'a>
impl<'a> !UnwindSafe for PostgresAdapter<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,