Trying to figure out how transaction works at phinx package. Here is my migration code and it doesn't work. I use mysql
and everything is ok with phinx.yml
. So table acme
is created while table fail
fails and no records are found in phinxlog
table. So, when I ran phinx migrate
I've error SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'acme' already exists
. So, how can I use transactions? I didn't find any docs about it, Help me please))
public function up()
{
$this->getAdapter()->beginTransaction();
$this->table('acme')->addColumn('name', 'string')->create();
$this->table('fail')->addColumn('lal', 'failme')->create();
$this->getAdapter()->commitTransaction();
}