neccessary schema update to support further credential-types

This commit is contained in:
Ralf Becker 2021-02-08 17:33:54 +02:00
parent c37581f43c
commit 3ab851550c
3 changed files with 16 additions and 2 deletions

View File

@ -11,7 +11,7 @@
/* Basic information about this app */
$setup_info['api']['name'] = 'api';
$setup_info['api']['title'] = 'EGroupware API';
$setup_info['api']['version'] = '20.1.002';
$setup_info['api']['version'] = '20.1.003';
$setup_info['api']['versions']['current_header'] = '1.29';
// maintenance release in sync with changelog in doc/rpm-build/debian.changes
$setup_info['api']['versions']['maintenance_release'] = '20.1.20210125';
@ -142,3 +142,4 @@ $setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hook
$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings';

View File

@ -462,7 +462,7 @@ $phpgw_baseline = array(
'fd' => array(
'cred_id' => array('type' => 'auto','nullable' => False),
'acc_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment' => 'into egw_ea_accounts'),
'cred_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '&1=imap, &2=smtp, &4=admin'),
'cred_type' => array('type' => 'int','precision' => '2','nullable' => False,'comment' => '&1=imap, &2=smtp, &4=admin'),
'account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'account_id or 0=all'),
'cred_username' => array('type' => 'varchar','precision' => '80','nullable' => False,'comment' => 'username'),
'cred_password' => array('type' => 'varchar','precision' => '16384','comment' => 'password encrypted'),

View File

@ -769,3 +769,16 @@ function api_upgrade20_1_001()
return $GLOBALS['setup_info']['api']['currentver'] = '20.1.002';
}
function api_upgrade20_1_002()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_ea_credentials','cred_type',array(
'type' => 'int',
'precision' => '2',
'nullable' => False,
'comment' => '&1=imap, &2=smtp, &4=admin'
));
return $GLOBALS['setup_info']['api']['currentver'] = '20.1.003';
}