code cleanup
This commit is contained in:
parent
0b4041c13a
commit
ad68fb8bf7
1 changed files with 6 additions and 4 deletions
|
@ -45,7 +45,8 @@ void Database::newDb()
|
||||||
|
|
||||||
fs::path sourcePath = dbname_;
|
fs::path sourcePath = dbname_;
|
||||||
fs::path destPath = sourcePath.parent_path() / sourcePath.stem();
|
fs::path destPath = sourcePath.parent_path() / sourcePath.stem();
|
||||||
destPath += std::string("_") += boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db";
|
destPath += std::string("_") +=
|
||||||
|
boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db";
|
||||||
|
|
||||||
fs::copy_file(sourcePath, destPath, fs::copy_options::overwrite_existing);
|
fs::copy_file(sourcePath, destPath, fs::copy_options::overwrite_existing);
|
||||||
|
|
||||||
|
@ -113,7 +114,8 @@ void Database::createNew()
|
||||||
");"};
|
");"};
|
||||||
sqlStrings.push_back(sqlCreateSalesItems);
|
sqlStrings.push_back(sqlCreateSalesItems);
|
||||||
|
|
||||||
std::string sqlInitialEntries{"INSERT OR IGNORE INTO sellers (id, seller_no, first_name, last_name, "
|
std::string sqlInitialEntries{
|
||||||
|
"INSERT OR IGNORE INTO sellers (id, seller_no, first_name, last_name, "
|
||||||
"num_offered_articles) VALUES "
|
"num_offered_articles) VALUES "
|
||||||
"('11111111-1111-1111-1111-111111111111', 0, 'Sonderkonto', 'Sonderkonto', 0)"};
|
"('11111111-1111-1111-1111-111111111111', 0, 'Sonderkonto', 'Sonderkonto', 0)"};
|
||||||
sqlStrings.push_back(sqlInitialEntries);
|
sqlStrings.push_back(sqlInitialEntries);
|
||||||
|
|
Loading…
Reference in a new issue