Skip to content

Commit

Permalink
fix: simplify database creation query in ImportHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kremilly committed Dec 7, 2024
1 parent 52122b2 commit c341871
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/helpers/import_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ impl ImportHandlers {
caps[2].to_string()
};

if caps.get(4).is_some() {
format!("CREATE DATABASE IF NOT EXISTS `{}`;", db_name)
} else {
format!("CREATE DATABASE IF NOT EXISTS `{}`;", db_name)
}
format!("CREATE DATABASE IF NOT EXISTS `{}`;", db_name)
});

let dump_content = use_db_regex.replace_all(&content, |caps: &regex::Captures| {
Expand Down

0 comments on commit c341871

Please sign in to comment.