#17611·cphalcon

[BUG]: After AbstractPdo:createTable transaction is no active

Author: ryinnerCreated Sep 28, 2026Updated Sep 28, 2026
Labelsnot a bugbugstatus: unverified

Describe the bug I'm working with the migration module and I want to wrap each individual migration in a transaction so that in case of an error, part of the SQL script is not applied to the database, but when I try to complete the transaction after creating the table, I see that Phalcon does not have any active transactions.

To Reproduce

Provide output if related. Provide coredump if any. Use https://docs.phalcon.io/latest/generating-backtrace as reference.

Steps to reproduce the behavior:

php
$db = new Mysql(
  // put your connection config here
);

$db->begin();
$db->createTable('test', 'your_db_name', [
  'columns' => [
    new Column('id', [
      "type" => Column::TYPE_INTEGER,
      "size" => 10,
      "unsigned" => true,
      "notNull" => true,
      "autoIncrement" => true,
      "first" => true,
      "primary"  => true
    ])
   ]
]);
$db->commit(); // Throw: There is no active transaction

Expected behavior Only after commit transaction will applied

Details

  • Phalcon version: 5.22.0
  • PHP Version: 8.4.25
  • Operating System: Linux Mint 21.3
  • Installation type: pecl
  • Server: Cli
  • Other related info (Database, table schema): Mysql