setting egw_api_content_history.sync_{added|modified|deleted} to NOTNULL, as the code only sets one timestamp (mysql does not care about NOTNULL, but eg. postgres does)

This commit is contained in:
Ralf Becker 2005-03-30 07:36:17 +00:00
parent cb820c8ccf
commit f7892bcce2
3 changed files with 29 additions and 10 deletions

View File

@ -14,7 +14,7 @@
/* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
$setup_info['phpgwapi']['version'] = '1.0.1.004';
$setup_info['phpgwapi']['version'] = '1.0.1.005';
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
@ -59,3 +59,4 @@

View File

@ -371,18 +371,18 @@
),
'egw_api_content_history' => array(
'fd' => array(
'sync_appname' => array('type' => 'varchar','precision' => '60','nullable' => False),
'sync_appname' => array('type' => 'varchar','precision' => '60','nullable' => False),
'sync_contentid' => array('type' => 'varchar','precision' => '60','nullable' => False),
'sync_added' => array('type' => 'timestamp', 'nullable' => False),
'sync_modified' => array('type' => 'timestamp', 'nullable' => False),
'sync_deleted' => array('type' => 'timestamp', 'nullable' => False),
'sync_id' => array('type' => 'auto','nullable' => False),
'sync_guid' => array('type' => 'varchar','precision' => '120','nullable' => False),
'sync_changedby' => array('type' => 'int','precision' => '4','nullable' => False),
'sync_added' => array('type' => 'timestamp'),
'sync_modified' => array('type' => 'timestamp'),
'sync_deleted' => array('type' => 'timestamp'),
'sync_id' => array('type' => 'auto','nullable' => False),
'sync_guid' => array('type' => 'varchar','precision' => '120','nullable' => False),
'sync_changedby' => array('type' => 'int','precision' => '4','nullable' => False)
),
'pk' => array('sync_id'),
'fk' => array(),
'ix' => array(array('sync_appname','sync_contentid'),'sync_added','sync_modified','sync_deleted','sync_guid','sync_changedby'),
'ix' => array('sync_added','sync_modified','sync_deleted','sync_guid','sync_changedby',array('sync_appname','sync_contentid')),
'uc' => array()
),
)
);

View File

@ -161,3 +161,21 @@
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.004';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}
$test[] = '1.0.1.004';
function phpgwapi_upgrade1_0_1_004()
{
$GLOBALS['phpgw_setup']->oProc->AlterColumn('egw_api_content_history','sync_added',array(
'type' => 'timestamp'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('egw_api_content_history','sync_modified',array(
'type' => 'timestamp'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('egw_api_content_history','sync_deleted',array(
'type' => 'timestamp'
));
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.005';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}
?>