Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extra SQL support in Doctrine migrations #36966

Merged
merged 1 commit into from
May 26, 2020

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented May 26, 2020

Q A
Branch? 5.1
Bug fix? yes
New feature? no
Deprecations? no
Tickets n/a
License MIT
Doc PR n/a

/cc @weaverryan

@@ -79,7 +78,9 @@ public function onSchemaCreateTable(SchemaCreateTableEventArgs $event): void
* the only way to inject some extra SQL.
*/
$event->addSql($createTableSql);
$event->addSql($extraSql);
foreach ($extraSql as $sql) {
$event->addSql($sql);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fix: addSql() onlt works if it is given a single SQL statement.

@nicolas-grekas nicolas-grekas changed the base branch from master to 5.1 May 26, 2020 06:07
@nicolas-grekas nicolas-grekas added this to the 5.1 milestone May 26, 2020
@fabpot
Copy link
Member Author

fabpot commented May 26, 2020

Tests fail are expected.

@fabpot fabpot merged commit 7f6934c into symfony:5.1 May 26, 2020
@fabpot fabpot deleted the doctrine-mig-fix branch May 26, 2020 07:18
@fabpot fabpot mentioned this pull request May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants