Compare commits

..

2 commits

Author SHA1 Message Date
d5d309ac10 bump to new version 0.11.1 2018-10-08 14:31:22 +02:00
cdec552f04 Fix: Create correct sql schema 2018-10-08 14:30:42 +02:00
2 changed files with 7 additions and 2 deletions

View file

@ -1,6 +1,6 @@
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})

View file

@ -72,7 +72,7 @@ void Database::createNew()
std::string sqlCreateKima2{"CREATE TABLE IF NOT EXISTS kima2 ("
"version INTEGER NOT NULL);"
"INSERT INTO kima2 (version) VALUES (1);"};
"INSERT INTO kima2 (version) VALUES (2);"};
sqlStrings.push_back(sqlCreateKima2);
std::string sqlCreateSellers{"CREATE TABLE IF NOT EXISTS sellers ("
"id TEXT PRIMARY KEY NOT NULL, "
@ -111,6 +111,11 @@ void Database::createNew()
");"};
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();
for (const auto& sql : sqlStrings) {
exec(sql);