CakeDC / users

Users Plugin for CakePHP
https://www.cakedc.com
Other
521 stars 296 forks source link

PhpUnit bootstrap migration doesnot create "users" table #984

Closed Cyrille37 closed 2 years ago

Cyrille37 commented 2 years ago

Hello

Versions:

The 'CakeDC/Users' migration works fine with in the App but not with PhpUnit.

This code create table cake_d_c_users_phinxlog but not the users table.

$plug = new \CakeDC\Users\Plugin();
Plugin::getCollection()->add($plug);
$migrator = new Migrator() ;
$migrator->run(['plugin' => $plug->getName() /* 'CakeDC/Users' */]);
$migrator->run();

Any idea ?

Thanks & cheers.

Cyrille37 commented 2 years ago

Argh! If I run only the plugin migration it works: users table is created ... but not my application tables

$plug = new \CakeDC\Users\Plugin();
Plugin::getCollection()->add($plug);
$migrator = new Migrator() ;
$migrator->run(['plugin' => $plug->getName() /* 'CakeDC/Users' */]);
// disable: $migrator->run();
Cyrille37 commented 2 years ago

Ok ... I've found. Must add an empty array for application migration ...

$migrator->runMany([
    [],
    ['plugin' => $plug->getName()]
]);