mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 02:22:21 +00:00
run database migrations by default
This commit is contained in:
@@ -23,8 +23,8 @@ mod setup_tracing;
|
|||||||
struct Args {
|
struct Args {
|
||||||
#[arg(short, long, env, default_value = "/etc/rustical/config.toml")]
|
#[arg(short, long, env, default_value = "/etc/rustical/config.toml")]
|
||||||
config_file: String,
|
config_file: String,
|
||||||
#[arg(long, env, help = "Run database migrations (only for sql store)")]
|
#[arg(long, env, help = "Do no run database migrations (only for sql store)")]
|
||||||
migrate: bool,
|
no_migrations: bool,
|
||||||
|
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
command: Option<Command>,
|
command: Option<Command>,
|
||||||
@@ -61,7 +61,8 @@ async fn main() -> Result<()> {
|
|||||||
|
|
||||||
setup_tracing(&config.tracing);
|
setup_tracing(&config.tracing);
|
||||||
|
|
||||||
let (addr_store, cal_store) = get_data_stores(args.migrate, &config.data_store).await?;
|
let (addr_store, cal_store) =
|
||||||
|
get_data_stores(!args.no_migrations, &config.data_store).await?;
|
||||||
|
|
||||||
let user_store = Arc::new(match config.auth {
|
let user_store = Arc::new(match config.auth {
|
||||||
config::AuthConfig::Static(config) => StaticUserStore::new(config),
|
config::AuthConfig::Static(config) => StaticUserStore::new(config),
|
||||||
|
|||||||
Reference in New Issue
Block a user