Removed type conversions where no longer needed

PHP 8.1 PDO SQLite now returns native data types
This commit is contained in:
Bernd Bestel
2023-02-06 20:22:10 +01:00
parent d8d3c3ef0b
commit d9667b4534
46 changed files with 257 additions and 272 deletions

View File

@@ -45,8 +45,7 @@ class DatabaseMigrationService extends BaseService
private function ExecutePhpMigrationWhenNeeded(int $migrationId, string $phpFile, int &$migrationCounter)
{
$rowCount = $this->getDatabaseService()->ExecuteDbQuery('SELECT COUNT(*) FROM migrations WHERE migration = ' . $migrationId)->fetchColumn();
if (intval($rowCount) === 0 || $migrationId == self::EMERGENCY_MIGRATION_ID || $migrationId == self::DOALWAYS_MIGRATION_ID)
if ($rowCount == 0 || $migrationId == self::EMERGENCY_MIGRATION_ID || $migrationId == self::DOALWAYS_MIGRATION_ID)
{
include $phpFile;
@@ -61,8 +60,7 @@ class DatabaseMigrationService extends BaseService
private function ExecuteSqlMigrationWhenNeeded(int $migrationId, string $sql, int &$migrationCounter)
{
$rowCount = $this->getDatabaseService()->ExecuteDbQuery('SELECT COUNT(*) FROM migrations WHERE migration = ' . $migrationId)->fetchColumn();
if (intval($rowCount) === 0 || $migrationId == self::EMERGENCY_MIGRATION_ID || $migrationId == self::DOALWAYS_MIGRATION_ID)
if ($rowCount == 0 || $migrationId == self::EMERGENCY_MIGRATION_ID || $migrationId == self::DOALWAYS_MIGRATION_ID)
{
$this->getDatabaseService()->GetDbConnectionRaw()->beginTransaction();