Merged in bugfix/HOR-4636 (pull request #6524)
HOR-4636 Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
@@ -289,6 +289,12 @@ class WorkspaceTools
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Optimizing content data took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrating and populating indexing for avoiding the use of table APP_CACHE_VIEW...\n");
|
||||
$this->migratePopulateIndexingACV($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Migrating an populating indexing for avoiding the use of table APP_CACHE_VIEW process took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrate new lists...\n");
|
||||
@@ -316,12 +322,6 @@ class WorkspaceTools
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Migrating Self-Service records Process took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrating and populating indexing for avoiding the use of table APP_CACHE_VIEW...\n");
|
||||
$this->migratePopulateIndexingACV($workSpace);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Migrating an populating indexing for avoiding the use of table APP_CACHE_VIEW process took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating rows in Web Entry table for classic processes...\n");
|
||||
$this->updatingWebEntryClassicModel($workSpace);
|
||||
@@ -1249,6 +1249,7 @@ class WorkspaceTools
|
||||
|
||||
public function upgradeData()
|
||||
{
|
||||
$this->getSchema();
|
||||
if (file_exists(PATH_CORE . 'data' . PATH_SEP . 'check.data')) {
|
||||
$checkData = unserialize(file_get_contents(PATH_CORE . 'data' . PATH_SEP . 'check.data'));
|
||||
if (is_array($checkData)) {
|
||||
@@ -2029,6 +2030,13 @@ class WorkspaceTools
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Optimizing content data took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
//Populate the new fields for replace string UID to Interger ID
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrating and populating indexing for APP_CACHE_VIEW...\n");
|
||||
$workspace->migratePopulateIndexingACV($workspace->name);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Migrating an populating indexing for APP_CACHE_VIEW process took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
//Move the data of cases to the corresponding List
|
||||
/*----------------------------------********---------------------------------*/
|
||||
$start = microtime(true);
|
||||
@@ -2044,13 +2052,6 @@ class WorkspaceTools
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Updating Files Manager took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
//Populate the new fields for replace string UID to Interger ID
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Migrating and populating indexing for APP_CACHE_VIEW...\n");
|
||||
$workspace->migratePopulateIndexingACV($workspace->name);
|
||||
$stop = microtime(true);
|
||||
CLI::logging("<*> Migrating an populating indexing for APP_CACHE_VIEW process took " . ($stop - $start) . " seconds.\n");
|
||||
|
||||
//Updating generated class files for PM Tables
|
||||
passthru(PHP_BINARY . ' processmaker regenerate-pmtable-classes ' . $workspace->name);
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ class Content extends BaseContent
|
||||
|
||||
DB::connection($connection)->statement($query);
|
||||
|
||||
$languages = DB::table('CONTENT')->select('CON_LANG')->distinct()->get();
|
||||
$languages = DB::connection($connection)->table('CONTENT')->select('CON_LANG')->distinct()->get();
|
||||
|
||||
foreach ($languages as $value) {
|
||||
if (array_search($value->CON_LANG, $langs) === false) {
|
||||
@@ -335,7 +335,7 @@ class Content extends BaseContent
|
||||
DB::connection($connection)->statement('SET FOREIGN_KEY_CHECKS=0');
|
||||
DB::connection($connection)->statement('SET SQL_BIG_SELECTS=1');
|
||||
|
||||
$result = DB::table('CONTENT')
|
||||
$result = DB::connection($connection)->table('CONTENT')
|
||||
->select('CON_ID', 'CON_CATEGORY', 'CON_LANG', 'CON_PARENT', 'CON_VALUE')
|
||||
->orderBy('CON_ID', 'CON_CATEGORY', 'CON_LANG', 'CON_PARENT', 'CON_VALUE')
|
||||
->get();
|
||||
@@ -385,7 +385,7 @@ class Content extends BaseContent
|
||||
DB::connection($connection)->statement('DROP TABLE CONTENT_BACKUP');
|
||||
|
||||
$result = DB::connection($connection)
|
||||
->select("SELECT * FROM information_schema.processlist WHERE command = 'Sleep' and user = SUBSTRING_INDEX(USER(),'@',1) and db = DATABASE() ORDER BY id");
|
||||
->select("SELECT * FROM information_schema.processlist WHERE COMMAND = 'Sleep' AND USER = SUBSTRING_INDEX(USER(),'@',1) AND DB = DATABASE() AND TIME > 0 ORDER BY ID");
|
||||
|
||||
foreach ($result as $value) {
|
||||
DB::connection($connection)->statement('kill ' . $value->ID);
|
||||
|
||||
Reference in New Issue
Block a user