fix: [application:migration] Better support of plugin migration

pull/72/head
Sami Mokaddem 2021-10-04 11:01:20 +02:00
parent 9685406d99
commit f068d18d49
2 changed files with 4 additions and 1 deletions

View File

@ -62,6 +62,7 @@ class InstanceController extends AppController
foreach ($status as $i => $entry) {
if (!empty($entry['plugin'])) {
$pluginTablename = sprintf('%s_phinxlog', Inflector::underscore($entry['plugin']));
$pluginTablename = str_replace(['\\', '/', '.'], '_', $pluginTablename);
$status[$i] = $this->Phinxlog->mergeMigrationLogIntoStatus([$entry], $pluginTablename)[0];
}

View File

@ -12,7 +12,7 @@ use Cake\Http\Exception\MethodNotAllowedException;
class InstanceTable extends AppTable
{
protected $activePlugins = ['Tags'];
protected $activePlugins = ['Tags', 'ADmad/SocialAuth'];
public $seachAllTables = ['Broods', 'Individuals', 'Organisations', 'SharingGroups', 'Users', 'EncryptionKeys', ];
public function initialize(array $config): void
@ -152,6 +152,8 @@ class InstanceTable extends AppTable
} else {
$migrationResult = $migrations->migrate(['target' => $version]);
}
$command = ROOT . '/bin/cake schema_cache clear';
$output = shell_exec($command);
return [
'success' => true
];