Skip to content

Commit 3181f9c

Browse files
committed
Exit if filename of sqlite configuration is empty
1 parent 03ff137 commit 3181f9c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/migrate/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ pub async fn run_migrate(options: MigrateOptions) -> anyhow::Result<()> {
117117

118118
let db_conf = deserialize_db_conf(db_conf_path)?;
119119

120+
if let DatabaseDriver::SQLite { filename } = &db_conf.driver {
121+
if filename.is_empty() {
122+
println!("Invalid configuration: Filename for sqlite is empty");
123+
return Ok(());
124+
}
125+
}
126+
120127
let p = Path::new(options.migration_dir.as_str());
121128
if !p.exists() || p.is_file() {
122129
println!(

0 commit comments

Comments
 (0)