fixed wrong NOT NULL attributes in phpgw_accounts

This commit is contained in:
Ralf Becker 2003-09-25 01:33:59 +00:00
parent ff3a3ce3c8
commit 0d41ea8765
3 changed files with 53 additions and 11 deletions

View File

@ -15,7 +15,7 @@
/* Basic information about this app */ /* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'phpgwapi';
$setup_info['phpgwapi']['version'] = '0.9.99.003'; $setup_info['phpgwapi']['version'] = '0.9.99.004';
$setup_info['phpgwapi']['versions']['current_header'] = '1.24'; $setup_info['phpgwapi']['versions']['current_header'] = '1.24';
$setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1; $setup_info['phpgwapi']['app_order'] = 1;
@ -57,3 +57,4 @@

View File

@ -52,18 +52,18 @@
), ),
'phpgw_accounts' => array( 'phpgw_accounts' => array(
'fd' => array( 'fd' => array(
'account_id' => array('type' => 'auto','nullable' => False), 'account_id' => array('type' => 'auto'),
'account_lid' => array('type' => 'varchar','precision' => '25','nullable' => False), 'account_lid' => array('type' => 'varchar','precision' => '25'),
'account_pwd' => array('type' => 'varchar','precision' => '32','nullable' => False), 'account_pwd' => array('type' => 'varchar','precision' => '32','nullable' => False),
'account_firstname' => array('type' => 'varchar','precision' => '50','nullable' => False), 'account_firstname' => array('type' => 'varchar','precision' => '50'),
'account_lastname' => array('type' => 'varchar','precision' => '50','nullable' => False), 'account_lastname' => array('type' => 'varchar','precision' => '50'),
'account_lastlogin' => array('type' => 'int','precision' => '4','nullable' => False), 'account_lastlogin' => array('type' => 'int','precision' => '4'),
'account_lastloginfrom' => array('type' => 'varchar','precision' => '255','nullable' => False), 'account_lastloginfrom' => array('type' => 'varchar','precision' => '255'),
'account_lastpwd_change' => array('type' => 'int','precision' => '4','nullable' => False), 'account_lastpwd_change' => array('type' => 'int','precision' => '4'),
'account_status' => array('type' => 'char','precision' => '1','nullable' => False,'default' => 'A'), 'account_status' => array('type' => 'char','precision' => '1','nullable' => False,'default' => 'A'),
'account_expires' => array('type' => 'int','precision' => '4','nullable' => False), 'account_expires' => array('type' => 'int','precision' => '4'),
'account_type' => array('type' => 'char','precision' => '1','nullable' => True), 'account_type' => array('type' => 'char','precision' => '1'),
'person_id' => array('type' => 'int','precision' => '4','nullable' => True), 'person_id' => array('type' => 'int','precision' => '4'),
'account_primary_group' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0') 'account_primary_group' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0')
), ),
'pk' => array('account_id'), 'pk' => array('account_id'),

View File

@ -882,4 +882,45 @@
return $GLOBALS['setup_info']['phpgwapi']['currentver']; return $GLOBALS['setup_info']['phpgwapi']['currentver'];
} }
$test[] = '0.9.99.003';
function phpgwapi_upgrade0_9_99_003()
{
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_id',array(
'type' => 'auto'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_lid',array(
'type' => 'varchar',
'precision' => '25'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_firstname',array(
'type' => 'varchar',
'precision' => '50'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_lastname',array(
'type' => 'varchar',
'precision' => '50'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_lastlogin',array(
'type' => 'int',
'precision' => '4'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_lastloginfrom',array(
'type' => 'varchar',
'precision' => '255'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_lastpwd_change',array(
'type' => 'int',
'precision' => '4'
));
$GLOBALS['phpgw_setup']->oProc->AlterColumn('phpgw_accounts','account_expires',array(
'type' => 'int',
'precision' => '4'
));
$GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.99.004';
return $GLOBALS['setup_info']['phpgwapi']['currentver'];
}
?> ?>