Doctrine migrations: cannot insert multiple commands into a prepared statement
Asked Answered
C

0

7

I am trying to prepare first migration for project, that has quite big postgres database. I have dumped production DB schema, cleared it from comments and empty lines, and put whole as a text in single variable. Then I called

$this->addSql($sql);

When I tried to run this migration, i have been punched in the face with

SQLSTATE[42601]: Syntax error: 7 ERROR: cannot insert multiple commands into a prepared statement

Do I really need to split every SQL command into separate call of addSql method? There are few thousands of lines of SQLs in the cleared dump. It will be painful to do it by hand and I am not willing to do that with scripting, because something could go wrong and I wouldn't even notice it.

Counterattraction answered 24/7, 2019 at 15:6 Comment(2)
did you fixed this problem? how did you fixed it?@CounterattractionStep
Do you already have the doctrine mapping for the complete database?Premolar

© 2022 - 2024 — McMap. All rights reserved.