migra/migra-cli/src/main.rs

28 lines
539 B
Rust
Raw Normal View History

2021-01-31 02:38:35 +03:00
#![deny(clippy::all)]
2021-02-21 18:22:00 +03:00
#![forbid(unsafe_code)]
2021-01-31 02:38:35 +03:00
2021-03-26 02:10:41 +03:00
#[macro_use]
extern crate cfg_if;
#[cfg(not(any(feature = "postgres", feature = "mysql")))]
compile_error!(r#"Either features "postgres" or "mysql" must be enabled for "migra" crate"#);
mod app;
mod commands;
mod config;
2021-02-05 01:37:25 +03:00
mod database;
2021-02-10 01:13:27 +03:00
mod error;
2021-01-31 02:54:23 +03:00
mod opts;
2021-01-31 02:38:35 +03:00
use crate::error::StdResult;
use app::App;
use config::Config;
use opts::{AppOpt, StructOpt};
2021-01-31 02:38:35 +03:00
fn main() -> StdResult<()> {
2021-02-26 01:21:29 +03:00
#[cfg(feature = "dotenv")]
dotenv::dotenv().ok();
App::new(AppOpt::from_args()).run_command()
2021-01-31 02:38:35 +03:00
}