diff --git a/etemplate/setup/setup.inc.php b/etemplate/setup/setup.inc.php index df26c10b8f..4146b0fbff 100644 --- a/etemplate/setup/setup.inc.php +++ b/etemplate/setup/setup.inc.php @@ -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; diff --git a/etemplate/setup/tables_current.inc.php b/etemplate/setup/tables_current.inc.php index 393e79063f..7893bfa9fa 100644 --- a/etemplate/setup/tables_current.inc.php +++ b/etemplate/setup/tables_current.inc.php @@ -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(), diff --git a/etemplate/setup/tables_update.inc.php b/etemplate/setup/tables_update.inc.php index e96fa4e8d9..742f89d396 100644 --- a/etemplate/setup/tables_update.inc.php +++ b/etemplate/setup/tables_update.inc.php @@ -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']; + } ?>