diff options
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -49,6 +49,10 @@ pub struct Args { /// Sqlite URL or path for the `hi` database #[arg(short, long, env, default_value = "sqlite://.hi")] database_url: String, + + /// Sqlite URL or path for a backup of the `hi` database during upgrades + #[arg(short = 'D', long, env, default_value = "sqlite://.hi.backup")] + backup_database_url: String, } impl Args { @@ -100,7 +104,7 @@ impl Args { } async fn pool(&self) -> Result<SqlitePool, db::Error> { - db::prepare(&self.database_url).await + db::prepare(&self.database_url, &self.backup_database_url).await } } |
