* PostgreSQL: repairing/creating missing indexes

This commit is contained in:
Ralf Becker 2015-08-26 14:14:20 +00:00
parent 85477c18a5
commit 4323d52fd0
2 changed files with 30 additions and 3 deletions

View File

@ -12,7 +12,7 @@
/* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'EGroupware API';
$setup_info['phpgwapi']['version'] = '14.3.901';
$setup_info['phpgwapi']['version'] = '14.3.902';
$setup_info['phpgwapi']['versions']['current_header'] = '1.29';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
@ -36,7 +36,6 @@ $setup_info['phpgwapi']['tables'][] = 'egw_nextid';
$setup_info['phpgwapi']['tables'][] = 'egw_categories';
$setup_info['phpgwapi']['tables'][] = 'egw_history_log';
$setup_info['phpgwapi']['tables'][] = 'egw_async';
$setup_info['phpgwapi']['tables'][] = 'egw_api_content_history';
$setup_info['phpgwapi']['tables'][] = 'egw_links';
$setup_info['phpgwapi']['tables'][] = 'egw_addressbook';
$setup_info['phpgwapi']['tables'][] = 'egw_addressbook_extra';

View File

@ -840,6 +840,22 @@ function phpgwapi_upgrade14_3_002()
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.003';
}
/**
* Check and if necessary fix indexes, they have been completly lost on PostgreSQL with previous updates
*
* @return string
*/
function phpgwapi_upgrade14_3_003()
{
$GLOBALS['run-from-upgrade14_3_003'] = true;
if ($GLOBALS['egw_setup']->db->Type == 'pgsql')
{
$GLOBALS['egw_setup']->oProc->CheckCreateIndexes();
}
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.004';
}
/**
* Updates on the way to 15.1
*/
@ -849,7 +865,7 @@ function phpgwapi_upgrade14_3_002()
*
* @return string
*/
function phpgwapi_upgrade14_3_003()
function phpgwapi_upgrade14_3_004()
{
$GLOBALS['egw_setup']->oProc->DropTable('egw_api_content_history');
@ -867,3 +883,15 @@ function phpgwapi_upgrade14_3_900()
}
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.901';
}
/**
* Run 14.3.003 upgrade for everyone who was already on 14.3.900
*/
function phpgwapi_upgrade14_3_901()
{
if (empty($GLOBALS['run-from-upgrade14_3_003']))
{
phpgwapi_upgrade14_3_003();
}
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.902';
}