fix: [application:migration] Better support of plugin migration
parent
9685406d99
commit
f068d18d49
|
@ -62,6 +62,7 @@ class InstanceController extends AppController
|
||||||
foreach ($status as $i => $entry) {
|
foreach ($status as $i => $entry) {
|
||||||
if (!empty($entry['plugin'])) {
|
if (!empty($entry['plugin'])) {
|
||||||
$pluginTablename = sprintf('%s_phinxlog', Inflector::underscore($entry['plugin']));
|
$pluginTablename = sprintf('%s_phinxlog', Inflector::underscore($entry['plugin']));
|
||||||
|
$pluginTablename = str_replace(['\\', '/', '.'], '_', $pluginTablename);
|
||||||
$status[$i] = $this->Phinxlog->mergeMigrationLogIntoStatus([$entry], $pluginTablename)[0];
|
$status[$i] = $this->Phinxlog->mergeMigrationLogIntoStatus([$entry], $pluginTablename)[0];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ use Cake\Http\Exception\MethodNotAllowedException;
|
||||||
|
|
||||||
class InstanceTable extends AppTable
|
class InstanceTable extends AppTable
|
||||||
{
|
{
|
||||||
protected $activePlugins = ['Tags'];
|
protected $activePlugins = ['Tags', 'ADmad/SocialAuth'];
|
||||||
public $seachAllTables = ['Broods', 'Individuals', 'Organisations', 'SharingGroups', 'Users', 'EncryptionKeys', ];
|
public $seachAllTables = ['Broods', 'Individuals', 'Organisations', 'SharingGroups', 'Users', 'EncryptionKeys', ];
|
||||||
|
|
||||||
public function initialize(array $config): void
|
public function initialize(array $config): void
|
||||||
|
@ -152,6 +152,8 @@ class InstanceTable extends AppTable
|
||||||
} else {
|
} else {
|
||||||
$migrationResult = $migrations->migrate(['target' => $version]);
|
$migrationResult = $migrations->migrate(['target' => $version]);
|
||||||
}
|
}
|
||||||
|
$command = ROOT . '/bin/cake schema_cache clear';
|
||||||
|
$output = shell_exec($command);
|
||||||
return [
|
return [
|
||||||
'success' => true
|
'success' => true
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue