fix(db)!: Doctrine\DBAL\Connection::getSchemaManager was removed, use Connection::createSchemaManager instead

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2024-07-01 11:17:38 +02:00
parent 466f455e93
commit 287d5271e0
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205
5 changed files with 7 additions and 7 deletions

View file

@ -245,7 +245,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
$output->writeln('<info>Clearing schema in new database</info>');
}
foreach ($toTables as $table) {
$db->getSchemaManager()->dropTable($table);
$db->createSchemaManager()->dropTable($table);
}
}
@ -258,7 +258,7 @@ class ConvertType extends Command implements CompletionAwareInterface {
}
return preg_match($filterExpression, $asset) !== false;
});
return $db->getSchemaManager()->listTableNames();
return $db->createSchemaManager()->listTableNames();
}
/**

View file

@ -548,7 +548,7 @@ class Connection extends PrimaryReadReplicaConnection {
*/
public function dropTable($table) {
$table = $this->tablePrefix . trim($table);
$schema = $this->getSchemaManager();
$schema = $this->createSchemaManager();
if ($schema->tablesExist([$table])) {
$schema->dropTable($table);
}

View file

@ -68,7 +68,7 @@ class OracleConnection extends Connection {
public function dropTable($table) {
$table = $this->tablePrefix . trim($table);
$table = $this->quoteIdentifier($table);
$schema = $this->getSchemaManager();
$schema = $this->createSchemaManager();
if ($schema->tablesExist([$table])) {
$schema->dropTable($table);
}
@ -83,7 +83,7 @@ class OracleConnection extends Connection {
public function tableExists($table) {
$table = $this->tablePrefix . trim($table);
$table = $this->quoteIdentifier($table);
$schema = $this->getSchemaManager();
$schema = $this->createSchemaManager();
return $schema->tablesExist([$table]);
}
}

View file

@ -43,7 +43,7 @@ class PgSqlTools {
return preg_match($filterExpression, $asset) !== false;
});
foreach ($conn->getSchemaManager()->listSequences() as $sequence) {
foreach ($conn->createSchemaManager()->listSequences() as $sequence) {
$sequenceName = $sequence->getName();
$sqlInfo = 'SELECT table_schema, table_name, column_name
FROM information_schema.columns

View file

@ -73,7 +73,7 @@ class RepairCollationTest extends TestCase {
}
protected function tearDown(): void {
$this->connection->getInner()->getSchemaManager()->dropTable($this->tableName);
$this->connection->getInner()->createSchemaManager()->dropTable($this->tableName);
parent::tearDown();
}