@@ -318,19 +318,22 @@ class KimaiImporterCommand extends Command
|
|||||||
*/
|
*/
|
||||||
protected function checkDatabaseVersion(SymfonyStyle $io, $requiredVersion, $requiredRevision)
|
protected function checkDatabaseVersion(SymfonyStyle $io, $requiredVersion, $requiredRevision)
|
||||||
{
|
{
|
||||||
|
$optionColumn = $this->connection->quoteIdentifier('option');
|
||||||
|
$qb = $this->connection->createQueryBuilder();
|
||||||
|
|
||||||
$version = $this->connection->createQueryBuilder()
|
$version = $this->connection->createQueryBuilder()
|
||||||
->select('value')
|
->select('value')
|
||||||
->from($this->connection->quoteIdentifier($this->dbPrefix . 'configuration'))
|
->from($this->connection->quoteIdentifier($this->dbPrefix . 'configuration'))
|
||||||
->where('option = :option')
|
->where($qb->expr()->eq($optionColumn, ':option'))
|
||||||
->setParameter(':option', 'version')
|
->setParameter('option', 'version')
|
||||||
->execute()
|
->execute()
|
||||||
->fetchColumn();
|
->fetchColumn();
|
||||||
|
|
||||||
$revision = $this->connection->createQueryBuilder()
|
$revision = $this->connection->createQueryBuilder()
|
||||||
->select('value')
|
->select('value')
|
||||||
->from($this->connection->quoteIdentifier($this->dbPrefix . 'configuration'))
|
->from($this->connection->quoteIdentifier($this->dbPrefix . 'configuration'))
|
||||||
->where('option = :option')
|
->where($qb->expr()->eq($optionColumn, ':option'))
|
||||||
->setParameter(':option', 'revision')
|
->setParameter('option', 'revision')
|
||||||
->execute()
|
->execute()
|
||||||
->fetchColumn();
|
->fetchColumn();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user