This commit is contained in:
Paula Quispe
2017-01-11 17:05:48 -04:00
parent 76cfc5bd9e
commit 5bf63d9051
4 changed files with 25 additions and 5 deletions

View File

@@ -209,12 +209,14 @@ class database extends database_base
if (isset( $aParameters['AutoIncrement'] ) && $aParameters['AutoIncrement']) {
$sSQL .= ' AUTO_INCREMENT';
}
if (isset( $aParameters['Unique'] ) && $aParameters['Unique']) {
$sSQL .= ' UNIQUE';
} else {
if (isset( $aParameters['PrimaryKey'] ) && $aParameters['PrimaryKey']) {
$sSQL .= ' PRIMARY KEY';
}
if (isset( $aParameters['Unique'] ) && $aParameters['Unique']) {
$sSQL .= ' UNIQUE';
}
//we need to check the property AI
if (isset( $aParameters['AI'] )) {
if ($aParameters['AI'] == 1) {
$sSQL .= ' AUTO_INCREMENT';

View File

@@ -947,3 +947,18 @@ function run_migrate_self_service_value($args, $opts) {
$stop = microtime(true);
CLI::logging("<*> Migrating Self-Service records Process took " . ($stop - $start) . " seconds.\n");
}
function run_migrate_indexing_acv($args, $opts) {
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$args = $filter->xssFilterHard($args);
$workspaces = get_workspaces_from_args($args);
$start = microtime(true);
CLI::logging("> Migrating and populating indexing for APP_CACHE_VIEW...\n");
foreach ($workspaces as $workspace) {
print_r('Indexing for APP_CACHE_VIEW: ' . pakeColor::colorize($workspace->name, 'INFO') . "\n");
$workspace->migratePopulateIndexingACV($workspace->name);
}
$stop = microtime(true);
CLI::logging("<*> Migrating an populating indexing for APP_CACHE_VIEW process took " . ($stop - $start) . " seconds.\n");
}

View File

@@ -823,7 +823,8 @@ class System
'Null' => $required ? "NO" : "YES",
'Default' => $default,
'AutoIncrement' => $autoIncrement,
'Unique' => $unique
'Unique' => $unique,
'PrimaryKey' => $primaryKey
);
}

View File

@@ -308,11 +308,13 @@ function getAllUsersArray ($action)
function getStatusArray($action, $userUid)
{
$status = array();
$aStatus = Application::$app_status_values;
$status[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
foreach ($aStatus as $key => $value) {
$status[] = array ($value, G::LoadTranslation( 'ID_CASES_STATUS_' . $key ));
}
return $aStatus;
return $status;
}
//these getXX function gets the default fields in casesListSetup