Skip to content

Commit

Permalink
fix dbal deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis Igoumenos committed Oct 22, 2023
1 parent 3492096 commit 4a393af
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/Lib/Util/SchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class SchemaManager {
// The column library from the main config
protected $columnLibrary = null;

// The current platform
protected $platform = null;

/**
* Construct a new SchemaManager.
*
Expand Down Expand Up @@ -98,6 +101,7 @@ public function __construct(?ConsoleIo $io=null, string $connection='default') {

$this->conn = DriverManager::getConnection($cfargs, $config);
$this->driver = $cfg['driver'];
$this->platform = $this->conn->getDatabasePlatform();
}

/**
Expand Down Expand Up @@ -358,8 +362,7 @@ protected function processSchema(
// schema file).
$comparator = new Comparator();
$schemaDiff = $comparator->compareSchemas($curSchema, $schema);

$diffSql = $schemaDiff->toSaveSql($this->conn->getDatabasePlatform());
$diffSql = $this->platform->getAlterSchemaSQL($schemaDiff);

// We don't start a transaction since in general we always want to move to
// the desired state, and if we fail in flight it's probably a bug that
Expand Down

0 comments on commit 4a393af

Please sign in to comment.