pub async fn migrate(&self) -> Result<(), SessionError> {
        if let Some(client) = &self.client {
            sqlx::query(
                &databases::MIGRATE_QUERY.replace("%%TABLE_NAME%%", &self.config.table_name),
            )
            .execute(client.inner())
            .await?;
        }

        Ok(())
    }
/// Creates the Database Table needed for the Session if it does not exist.
///
/// If client is None it will return Ok(()).
///
/// # Errors
/// - ['SessionError::Sqlx'] is returned if database connection has failed or user does not have permissions.
///
/// # Examples
/// ```rust
/// use axum_database_sessions::{AxumSessionConfig, AxumSessionStore};
///
/// let config = AxumSessionConfig::default();
/// let session_store = AxumSessionStore::new(None, config);
/// async {
///     let _ = session_store.migrate().await.unwrap();
/// };
/// ```
///
Creates the Database Table needed for the Session if it does not exist.
If client is None it will return Ok(()).
Creates the Database Table needed for the Session if it does not exist . If client is None it will return Ok (( )) .
pub async fn migrate(&self) -> Result<(), SessionError> {
        if let Some(client) = &self.client {
            sqlx::query(
                &databases::MIGRATE_QUERY.replace("%%TABLE_NAME%%", &self.config.table_name),
            )
            .execute(client.inner())
            .await?;
        }
        Ok(())
    }
pub async fn migrate ( & self ) -> Result < ( ) , SessionError > { if let Some ( client ) = & self . client { sqlx :: query ( & databases :: MIGRATE_QUERY . replace ( " " , & self . config . table_name ) , ) . execute ( client . inner ( ) ) . await ? ; } Ok ( ( ) ) }
Creates the Database Table needed for the Session if it does not exist.
Creates the Database Table needed for the Session if it does not exist .
&self
&self
errors
['SessionError::Sqlx'] is returned if database connection has failed or user does not have permissions.
[ ' SessionError :: Sqlx ' ] is returned if database connection has failed or user does not have permissions .
examples
```rust
use axum_database_sessions::{AxumSessionConfig, AxumSessionStore}.

let config = AxumSessionConfig::default();
let session_store = AxumSessionStore::new(None, config);
async {
let _ = session_store.migrate().await.unwrap();
};
```
` ` ` rust use axum_database_sessions :: { AxumSessionConfig AxumSessionStore } . let config = AxumSessionConfig :: default () ; let session_store = AxumSessionStore :: new ( None config ) ; async { let _ = session_store . migrate () . await . unwrap () ; } ; ` ` `