changed all char-column to varchar, as pgSql fills the char's up with space

This commit is contained in:
Ralf Becker 2003-03-18 00:47:05 +00:00
parent 027cfe7207
commit d507c0dd47
3 changed files with 46 additions and 8 deletions

View File

@ -14,7 +14,7 @@
$setup_info['etemplate']['name'] = 'etemplate';
$setup_info['etemplate']['title'] = 'eTemplates';
$setup_info['etemplate']['version'] = '0.9.15.001';
$setup_info['etemplate']['version'] = '0.9.15.002';
$setup_info['etemplate']['app_order'] = 8; // just behind the developers-tools
$setup_info['etemplate']['tables'] = array('phpgw_etemplate');
$setup_info['etemplate']['enable'] = 1;

View File

@ -15,15 +15,15 @@
$phpgw_baseline = array(
'phpgw_etemplate' => array(
'fd' => array(
'et_name' => array('type' => 'char','precision' => '80','nullable' => False),
'et_template' => array('type' => 'char','precision' => '20','default' => '','nullable' => False),
'et_lang' => array('type' => 'char','precision' => '5','default' => '','nullable' => False),
'et_group' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False),
'et_version' => array('type' => 'char','precision' => '20','default' => '','nullable' => False),
'et_name' => array('type' => 'varchar','precision' => '80','nullable' => False),
'et_template' => array('type' => 'varchar','precision' => '20','nullable' => False,'default' => ''),
'et_lang' => array('type' => 'varchar','precision' => '5','nullable' => False,'default' => ''),
'et_group' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'et_version' => array('type' => 'varchar','precision' => '20','nullable' => False,'default' => ''),
'et_data' => array('type' => 'text','nullable' => True),
'et_size' => array('type' => 'char','precision' => '128','nullable' => True),
'et_size' => array('type' => 'varchar','precision' => '128','nullable' => True),
'et_style' => array('type' => 'text','nullable' => True),
'et_modified' => array('type' => 'int','precision' => '4','default' => '0','nullable' => False)
'et_modified' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0')
),
'pk' => array('et_name','et_template','et_lang','et_group','et_version'),
'fk' => array(),

View File

@ -38,4 +38,42 @@
$GLOBALS['setup_info']['etemplate']['currentver'] = '0.9.15.001';
return $GLOBALS['setup_info']['etemplate']['currentver'];
}
$test[] = '0.9.15.001';
function etemplate_upgrade0_9_15_001()
{
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_etemplate','et_name',array(
'type' => 'varchar',
'precision' => '80',
'nullable' => False
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_etemplate','et_template',array(
'type' => 'varchar',
'precision' => '20',
'nullable' => False,
'default' => ''
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_etemplate','et_lang',array(
'type' => 'varchar',
'precision' => '5',
'nullable' => False,
'default' => ''
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_etemplate','et_version',array(
'type' => 'varchar',
'precision' => '20',
'nullable' => False,
'default' => ''
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_etemplate','et_size',array(
'type' => 'varchar',
'precision' => '128',
'nullable' => True
));
$GLOBALS['setup_info']['etemplate']['currentver'] = '0.9.15.002';
return $GLOBALS['setup_info']['etemplate']['currentver'];
}
?>