commit cca74b2439a47e6548d012eb67a2d3d6f6388107
Author: Christian Ehringfeld <c.ehringfeld@mailbox.org>
Date:   Sat Jan 12 21:39:41 2019 +0100

    imp

diff --git a/samples/simple/main.cpp b/samples/simple/main.cpp
index 8793e19..16cad76 100644
--- a/samples/simple/main.cpp
+++ b/samples/simple/main.cpp
@@ -13,7 +13,7 @@ int main(int argc, char *argv[]) {
     QSharedPointer<CuteEntityManager::EntityManager> e =
         QSharedPointer<CuteEntityManager::EntityManager>(new
                 CuteEntityManager::EntityManager("QSQLITE",
-                        QDir::currentPath() + "/db.sqlite"));
+                        QDir::currentPath() + "/db.sqlite","","","test"));
     QStringList inits = QStringList() << "Article";
     e->startup("0.1", inits);
     QSharedPointer<Article> a = QSharedPointer<Article>(new Article(5.0,
diff --git a/src/database.cpp b/src/database.cpp
index 3fd19b3..80d872f 100644
--- a/src/database.cpp
+++ b/src/database.cpp
@@ -154,16 +154,13 @@ Schema *Database::getSchema(DatabaseType db,
     switch (db) {
     case DatabaseType::SQLITE:
         return new SqliteSchema(database);
-        break;
     //    case PGSQL:
     //        return QSharedPointer<Schema>(new PgSqlSchema());
     //        break;
     case DatabaseType::MYSQL:
         return new MysqlSchema(database);
-        break;
     default:
         return new SqliteSchema(database);
-        break;
     }
 }
 
diff --git a/src/entitymanager.cpp b/src/entitymanager.cpp
index e4f5148..39959cc 100644
--- a/src/entitymanager.cpp
+++ b/src/entitymanager.cpp
@@ -76,7 +76,7 @@ EntityManager::EntityManager(const QString &databaseType, QString databasename,
                                                      hostname,
                                                      databasename, username,
                                                      password,
-                                                     port.toInt(), true, logQueries, databaseOptions, logActions));
+                                                     port.toInt(), logQueries, true, databaseOptions, logActions));
     this->init(inspectEntities, logActions);
 }
 
diff --git a/src/schema/sqliteschema.cpp b/src/schema/sqliteschema.cpp
index 758aea4..011db01 100644
--- a/src/schema/sqliteschema.cpp
+++ b/src/schema/sqliteschema.cpp
@@ -22,6 +22,10 @@ using namespace CuteEntityManager;
 
 SqliteSchema::SqliteSchema(QSharedPointer<Database> database) : Schema(
         database, QSharedPointer<QueryBuilder>(new SqliteQueryBuilder(this, database))) {
+    if(this->tables.empty()) {
+        QStringList inits = QStringList() << "PRAGMA locking_mode = EXCLUSIVE;"<<"PRAGMA synchronous = 1;" << "PRAGMA journal_mode = WAL;" << "PRAGMA wal_autocheckpoint = 16;" << "PRAGMA journal_size_limit = 1536;" << "PRAGMA temp_store = MEMORY;" << "PRAGMA foreign_keys = ON;";
+        database->exec(inits);
+    }
 }
 
 SqliteSchema::~SqliteSchema() {
