Struct migrant_lib::Config
[−]
[src]
pub struct Config { pub path: PathBuf, // some fields omitted }
Project configuration/settings
Fields
path: PathBuf
Methods
impl Config
[src]
fn reload(&self) -> Result<Config>
Do a full reload of the configuration file
fn load_file_only(path: &Path) -> Result<Config>
Load config file from the given path without querying the database to check for applied migrations
fn load(path: &Path) -> Result<Config>
Load config file from the given path and query the database to load up applied migrations
fn init_in(dir: &Path) -> ConfigInitializer
Start a config initializer in the given directory
fn setup(&self) -> Result<bool>
- Confirm the database can be accessed
- Setup the database migrations table if it doesn't exist yet
fn migration_dir(&self) -> Result<PathBuf>
Return the absolute path to the directory containing migration folders
fn database_type(&self) -> Result<String>
Return the database type
fn database_path(&self) -> Result<PathBuf>
Return the absolute path to the database file. This is intended for sqlite3 databases only
fn connect_string(&self) -> Result<String>
Generate a database connection string. Not intended for file-based databases (sqlite)
Trait Implementations
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more