Question: ddl statements are not allowed in transactions?
Answer: The cause of the message is an attempt to execute a DDL statement inside a transaction. By default, PDO allows to execute the DDL statements inside a transaction: ... So, it is allowed in PDO , but it breaks the possibility to rollback the transaction.