From 9e222f5b805285f7eb9a1b0bbfa3e0cb7952a92d Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Sat, 28 May 2022 06:10:39 +0200 Subject: [PATCH] do not print white characters in log for the first migration --- winixd/models/migration.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/winixd/models/migration.cpp b/winixd/models/migration.cpp index 9e04eb5..2a75e2e 100644 --- a/winixd/models/migration.cpp +++ b/winixd/models/migration.cpp @@ -5,7 +5,7 @@ */ /* - * Copyright (c) 2021, Tomasz Sowa + * Copyright (c) 2021-2022, Tomasz Sowa * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -115,13 +115,11 @@ bool Migration::do_migration(int & current_table_version) bool Migration::create_winix_schema() { - // may the name of a schema (core) should be a parameter in the config? + const char * str[] = { + "create schema if not exists core", + }; - const char * str = R"sql( - create schema if not exists core - )sql"; - - return db_query(str); + return db_query(str, sizeof(str) / sizeof(const char*)); }