From 1c0f8cdad18f26e48e4f9cc8095ec0978aa2c10a Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Fri, 1 Jun 2018 15:06:29 +0200 Subject: [PATCH] Bugfix importer (#145) (#146) * Fix importer #145 --- README.md | 2 +- src/Command/KimaiImporterCommand.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index de4d6e1c..0cd5b18f 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ The database to use is up to you, but we would not recommend using the default S Please create your database and configure the connection string in your environment, e.g. with the `.env` file: ``` APP_ENV=prod -DATABASE_URL=sqlitemysql://db_user:db_password@127.0.0.1:3306/db_name +DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name APP_SECRET=insert_a_random_secret_string_for_production ``` diff --git a/src/Command/KimaiImporterCommand.php b/src/Command/KimaiImporterCommand.php index 16aab59b..41089e80 100644 --- a/src/Command/KimaiImporterCommand.php +++ b/src/Command/KimaiImporterCommand.php @@ -293,8 +293,8 @@ class KimaiImporterCommand extends Command */ protected function checkDatabaseVersion(SymfonyStyle $io, $requiredVersion, $requiredRevision) { - $versionQuery = 'SELECT value from ' . $this->dbPrefix . 'configuration WHERE option = "version"'; - $revisionQuery = 'SELECT value from ' . $this->dbPrefix . 'configuration WHERE option = "revision"'; + $versionQuery = 'SELECT `value` from ' . $this->dbPrefix . 'configuration WHERE `option` = "version"'; + $revisionQuery = 'SELECT `value` from ' . $this->dbPrefix . 'configuration WHERE `option` = "revision"'; $version = $this->getImportConnection()->query($versionQuery)->fetchColumn(); $revision = $this->getImportConnection()->query($revisionQuery)->fetchColumn();