insert or ignore is better here

This commit is contained in:
Martin Brodbeck 2018-08-07 08:02:27 +02:00
parent 3a40f586fa
commit 50ec5b3015

View file

@ -104,7 +104,8 @@ void Database::createNew()
void Database::updateDbToVer2()
{
beginTransaction();
exec("INSERT INTO sellers (id, seller_no, first_name, last_name, num_offered_articles) VALUES "
exec("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)");
exec("UPDATE kima2 SET version = 2");
endTransaction();