Skip to content

Commit be35cd0

Browse files
committed
ACP2E-3230: Modifying column length via db_schema.xml doesn't work in case of foreign keys
1 parent 43cebfa commit be35cd0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL/DbSchemaWriter.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public function compile(StatementAggregator $statementAggregator, $dryRun)
289289
foreach ($statementBank as $statement) {
290290
$statementsSql[] = $statement->getStatement();
291291
}
292-
292+
$adapter = $this->resourceConnection->getConnection($statement->getResource());
293293
$this->dryRunLogger->log(
294294
sprintf(
295295
$this->statementDirectives[$statement->getType()],
@@ -332,6 +332,11 @@ private function isNeedToSplitSql() : bool
332332
private function doQuery(
333333
array $statementBank
334334
) : void {
335+
if (empty($statementBank)) {
336+
return;
337+
}
338+
339+
$statement = null;
335340
$statementsSql = [];
336341
foreach ($statementBank as $statement) {
337342
$statementsSql[] = $statement->getStatement();

0 commit comments

Comments
 (0)