adding s3-flags and aes-key columns

This commit is contained in:
ralf 2023-10-23 09:01:33 +03:00
parent 2326db8780
commit 1da6622e9e
3 changed files with 33 additions and 11 deletions

View File

@ -11,7 +11,7 @@
/* Basic information about this app */ /* Basic information about this app */
$setup_info['api']['name'] = 'api'; $setup_info['api']['name'] = 'api';
$setup_info['api']['title'] = 'EGroupware API'; $setup_info['api']['title'] = 'EGroupware API';
$setup_info['api']['version'] = '23.1.004'; $setup_info['api']['version'] = '23.1.005';
$setup_info['api']['versions']['current_header'] = '1.29'; $setup_info['api']['versions']['current_header'] = '1.29';
// maintenance release in sync with changelog in doc/rpm-build/debian.changes // maintenance release in sync with changelog in doc/rpm-build/debian.changes
$setup_info['api']['versions']['maintenance_release'] = '23.1.20230911'; $setup_info['api']['versions']['maintenance_release'] = '23.1.20230911';
@ -139,4 +139,4 @@ $setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = arra
); );
$setup_info['groupdav']['license'] = 'GPL'; $setup_info['groupdav']['license'] = 'GPL';
$setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hooks::menus'; $setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hooks::menus';
$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings'; $setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings';

View File

@ -325,11 +325,13 @@ $phpgw_baseline = array(
'fs_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'), 'fs_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'),
'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'), 'fs_active' => array('type' => 'bool','nullable' => False,'default' => 't'),
'fs_content' => array('type' => 'blob'), 'fs_content' => array('type' => 'blob'),
'fs_link' => array('type' => 'varchar','precision' => '255') 'fs_link' => array('type' => 'varchar','precision' => '255'),
'fs_s3_flags' => array('type' => 'int','precision' => '1','default' => '0'),
'fs_aes_key' => array('type' => 'binary','precision' => '32')
), ),
'pk' => array('fs_id'), 'pk' => array('fs_id'),
'fk' => array(), 'fk' => array(),
'ix' => array(array('fs_dir','fs_active','fs_name(16)')), 'ix' => array('fs_s3_flags',array('fs_dir','fs_active')),
'uc' => array() 'uc' => array()
), ),
'egw_locks' => array( 'egw_locks' => array(
@ -397,12 +399,10 @@ $phpgw_baseline = array(
'share_writable' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=readable, 1=writable'), 'share_writable' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=readable, 1=writable'),
'share_with' => array('type' => 'varchar','precision' => '4096','comment' => 'email addresses, comma seperated'), 'share_with' => array('type' => 'varchar','precision' => '4096','comment' => 'email addresses, comma seperated'),
'share_passwd' => array('type' => 'varchar','precision' => '128','comment' => 'optional password-hash'), 'share_passwd' => array('type' => 'varchar','precision' => '128','comment' => 'optional password-hash'),
'share_pw_reversable' => array('type' => 'varchar', 'precision' => '128', 'share_pw_reversable' => array('type' => 'varchar','precision' => '128','comment' => 'optional reversible password'),
'comment' => 'optional reversible password'), 'share_encryption' => array('type' => 'int','nullable' => True,'comment' => 'Type of encryption, user or system (See Credentials)'),
'share_encryption' => array('type' => 'int', 'nullable' => true, 'share_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False),
'comment' => 'Type of encryption, user or system (See Credentials)'), 'share_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'),
'share_modified' => array('type' => 'timestamp', 'precision' => '8', 'nullable' => False),
'share_modifier' => array('type' => 'int', 'meta' => 'user', 'precision' => '4'),
'share_created' => array('type' => 'timestamp','nullable' => False,'comment' => 'creation date'), 'share_created' => array('type' => 'timestamp','nullable' => False,'comment' => 'creation date'),
'share_last_accessed' => array('type' => 'timestamp','comment' => 'last access of share') 'share_last_accessed' => array('type' => 'timestamp','comment' => 'last access of share')
), ),
@ -552,4 +552,4 @@ $phpgw_baseline = array(
'ix' => array('account_id'), 'ix' => array('account_id'),
'uc' => array() 'uc' => array()
) )
); );

View File

@ -932,4 +932,26 @@ function api_upgrade23_1_003()
array('type' => 'int', 'meta' => 'user', 'precision' => '4') array('type' => 'int', 'meta' => 'user', 'precision' => '4')
); );
return $GLOBALS['setup_info']['api']['currentver'] = '23.1.004'; return $GLOBALS['setup_info']['api']['currentver'] = '23.1.004';
}
/**
* Columns to support S3 storage for files
*
* @return string
*/
function api_upgrade23_1_004()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_sqlfs','fs_s3_flags',array(
'type' => 'int',
'precision' => '1',
'default' => '0'
));
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_sqlfs', 'fs_s3_flags');
$GLOBALS['egw_setup']->oProc->AddColumn('egw_sqlfs','fs_aes_key',array(
'type' => 'binary',
'precision' => '32'
));
return $GLOBALS['setup_info']['api']['currentver'] = '23.1.005';
} }