moving the syncml tables to the new syncml app and mark it installed as version 0.9.0

This commit is contained in:
Ralf Becker 2006-08-20 09:48:10 +00:00
parent d110bf5189
commit ca976cd982
3 changed files with 27 additions and 63 deletions

View File

@ -14,7 +14,7 @@
/* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'eGroupWare API';
$setup_info['phpgwapi']['version'] = '1.3.011';
$setup_info['phpgwapi']['version'] = '1.3.012';
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
@ -48,9 +48,6 @@
$setup_info['phpgwapi']['tables'][] = 'phpgw_vfs2_versioning';
$setup_info['phpgwapi']['tables'][] = 'phpgw_vfs2_customfields_data';
$setup_info['phpgwapi']['tables'][] = 'phpgw_vfs2_prefixes';
$setup_info['phpgwapi']['tables'][] = 'egw_contentmap';
$setup_info['phpgwapi']['tables'][] = 'egw_syncmldevinfo';
$setup_info['phpgwapi']['tables'][] = 'egw_syncmlsummary';
$setup_info['phpgwapi']['tables'][] = 'egw_links';
$setup_info['phpgwapi']['tables'][] = 'egw_addressbook';
$setup_info['phpgwapi']['tables'][] = 'egw_addressbook_extra';

View File

@ -416,63 +416,6 @@
'ix' => array(),
'uc' => array()
),
'phpgw_vfs2_prefixes' => array(
'fd' => array(
'prefix_id' => array('type' => 'auto','nullable' => False),
'prefix' => array('type' => 'varchar','precision' => '8','nullable' => False),
'owner_id' => array('type' => 'int','precision' => '4','nullable' => False),
'prefix_description' => array('type' => 'varchar','precision' => '30','nullable' => True),
'prefix_type' => array('type' => 'varchar','precision' => '1','nullable' => False,'default' => 'p')
),
'pk' => array('prefix_id'),
'fk' => array(),
'ix' => array(),
'uc' => array()
),
'egw_contentmap' => array(
'fd' => array(
'map_id' => array('type' => 'varchar','precision' => '128','nullable' => False),
'map_guid' => array('type' => 'varchar','precision' => '100','nullable' => False),
'map_locuid' => array('type' => 'varchar','precision' => '100','nullable' => False),
'map_timestamp' => array('type' => 'timestamp','nullable' => False),
'map_expired' => array('type' => 'bool','nullable' => False)
),
'pk' => array('map_id','map_guid','map_locuid'),
'fk' => array(),
'ix' => array('map_expired',array('map_id','map_locuid')),
'uc' => array()
),
'egw_syncmldevinfo' => array(
'fd' => array(
'dev_id' => array('type' => 'varchar','precision' => '255','nullable' => False),
'dev_dtdversion' => array('type' => 'varchar','precision' => '10','nullable' => False),
'dev_numberofchanges' => array('type' => 'bool','nullable' => False),
'dev_largeobjs' => array('type' => 'bool','nullable' => False),
'dev_swversion' => array('type' => 'varchar','precision' => '100','nullable' => False),
'dev_oem' => array('type' => 'varchar','precision' => '100','nullable' => False),
'dev_model' => array('type' => 'varchar','precision' => '100','nullable' => False),
'dev_manufacturer' => array('type' => 'varchar','precision' => '100','nullable' => False),
'dev_devicetype' => array('type' => 'varchar','precision' => '100','nullable' => False),
'dev_deviceid' => array('type' => 'varchar','precision' => '100','nullable' => False),
'dev_datastore' => array('type' => 'text','nullable' => False)
),
'pk' => array('dev_id'),
'fk' => array(),
'ix' => array(),
'uc' => array()
),
'egw_syncmlsummary' => array(
'fd' => array(
'dev_id' => array('type' => 'varchar','precision' => '255','nullable' => False),
'sync_path' => array('type' => 'varchar','precision' => '100','nullable' => False),
'sync_serverts' => array('type' => 'varchar','precision' => '20','nullable' => False),
'sync_clientts' => array('type' => 'varchar','precision' => '20','nullable' => False)
),
'pk' => array(array('dev_id','sync_path')),
'fk' => array(),
'ix' => array(),
'uc' => array()
),
'egw_links' => array(
'fd' => array(
'link_id' => array('type' => 'auto','nullable' => False),

View File

@ -226,8 +226,11 @@
{
if (isset($entry[$attr])) $to_write[$attr] = array();
}
//echo $entry['dn']; _debug_array($to_write);
ldap_modify($ds,$entry['dn'],$to_write);
if (!ldap_modify($ds,$entry['dn'],$to_write))
{
echo $entry['dn']; _debug_array($to_write);
echo '<p style="color: red;">'.'LDAP error: '.ldap_error($ds)."</p>\n";
}
}
}
}
@ -619,4 +622,25 @@
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.011';
}
$test[] = '1.3.011';
function phpgwapi_upgrade1_3_011()
{
// moving the sync-ml table in to the (new) syncml app and marking the syncml app installed, if not already installed
if (!isset($GLOBALS['setup_info']['syncml']['currentver']))
{
$GLOBALS['egw_setup']->db->insert($GLOBALS['egw_setup']->applications_table,array(
'app_enabled' => 3,
'app_order' => 99,
'app_tables' => 'egw_contentmap,egw_syncmldevinfo,egw_syncmlsummary',
'app_version' => $GLOBALS['setup_info']['syncml']['currentver'] = '0.9.0',
),array('app_name' => 'syncml'),__LINE__,__FILE__);
// we can't do the syncml update in the same go, as it would only set the version, but not run any updates!
unset($GLOBALS['setup_info']['syncml']);
}
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.012';
}
?>