Compare commits
2 commits
cdeea37f8c
...
d5d309ac10
Author | SHA1 | Date | |
---|---|---|---|
d5d309ac10 | |||
cdec552f04 |
2 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required(VERSION 3.8)
|
cmake_minimum_required(VERSION 3.8)
|
||||||
|
|
||||||
project(kima2 VERSION 0.11.0)
|
project(kima2 VERSION 0.11.1)
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake" ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake" ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ void Database::createNew()
|
||||||
|
|
||||||
std::string sqlCreateKima2{"CREATE TABLE IF NOT EXISTS kima2 ("
|
std::string sqlCreateKima2{"CREATE TABLE IF NOT EXISTS kima2 ("
|
||||||
"version INTEGER NOT NULL);"
|
"version INTEGER NOT NULL);"
|
||||||
"INSERT INTO kima2 (version) VALUES (1);"};
|
"INSERT INTO kima2 (version) VALUES (2);"};
|
||||||
sqlStrings.push_back(sqlCreateKima2);
|
sqlStrings.push_back(sqlCreateKima2);
|
||||||
std::string sqlCreateSellers{"CREATE TABLE IF NOT EXISTS sellers ("
|
std::string sqlCreateSellers{"CREATE TABLE IF NOT EXISTS sellers ("
|
||||||
"id TEXT PRIMARY KEY NOT NULL, "
|
"id TEXT PRIMARY KEY NOT NULL, "
|
||||||
|
@ -111,6 +111,11 @@ 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, "
|
||||||
|
"num_offered_articles) VALUES "
|
||||||
|
"('11111111-1111-1111-1111-111111111111', 0, 'Sonderkonto', 'Sonderkonto', 0)"};
|
||||||
|
sqlStrings.push_back(sqlInitialEntries);
|
||||||
|
|
||||||
beginTransaction();
|
beginTransaction();
|
||||||
for (const auto& sql : sqlStrings) {
|
for (const auto& sql : sqlStrings) {
|
||||||
exec(sql);
|
exec(sql);
|
||||||
|
|
Loading…
Reference in a new issue