add new table to keep track of contentchanges

This commit is contained in:
Lars Kneschke 2005-02-27 23:30:55 +00:00
parent 0b846885ee
commit 8149f57cad
3 changed files with 45 additions and 3 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.003';
$setup_info['phpgwapi']['version'] = '1.0.1.004';
$setup_info['phpgwapi']['versions']['current_header'] = '1.27';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
@ -41,6 +41,7 @@
$setup_info['phpgwapi']['tables'][] = 'egw_vfs';
$setup_info['phpgwapi']['tables'][] = 'phpgw_history_log';
$setup_info['phpgwapi']['tables'][] = 'phpgw_async';
$setup_info['phpgwapi']['tables'][] = 'egw_api_content_history';
/* Basic information about this app */
$setup_info['notifywindow']['name'] = 'notifywindow';

View File

@ -368,5 +368,21 @@
'fk' => array(),
'ix' => array(),
'uc' => array()
)
),
'egw_api_content_history' => array(
'fd' => array(
'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),
),
'pk' => array('sync_id'),
'fk' => array(),
'ix' => array(array('sync_appname','sync_contentid'),'sync_added','sync_modified','sync_deleted','sync_guid','sync_changedby'),
'uc' => array()
),
);

View File

@ -84,7 +84,6 @@
}
$test[] = '1.0.1.002';
function phpgwapi_upgrade1_0_1_002()
{
@ -136,3 +135,29 @@
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.003';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}
$test[] = '1.0.1.003';
function phpgwapi_upgrade1_0_1_003()
{
$GLOBALS['phpgw_setup']->oProc->CreateTable(
'egw_api_content_history', array(
'fd' => array(
'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),
),
'pk' => array('sync_id'),
'fk' => array(),
'ix' => array(array('sync_appname','sync_contentid'),'sync_added','sync_modified','sync_deleted','sync_guid','sync_changedby'),
'uc' => array()
)
);
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.1.004';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}