Skip to content

Commit a9f633e

Browse files
authored
Merge pull request #12509 from greg0ire/avoid-mutation
Avoid table mutation
2 parents 41a8f8f + 1262c77 commit a9f633e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

src/Tools/SchemaTool.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,8 @@ public function getSchemaFromMetadata(array $classes): Schema
213213
$table = new Table(
214214
name: $tableName,
215215
configuration: $metadataSchemaConfig->toTableConfiguration(),
216+
options: $metadataSchemaConfig->getDefaultTableOptions(),
216217
);
217-
// Add default table options (charset, collation, engine, etc.)
218-
foreach ($metadataSchemaConfig->getDefaultTableOptions() as $option => $value) {
219-
$table->addOption($option, $value);
220-
}
221218
} else {
222219
$table = $schema->createTable($tableName);
223220
}

0 commit comments

Comments
 (0)