Changed the accounts table to use the phpgw_ prefix and removed some old fields from the phpgw_accounts table

This commit is contained in:
jengo 2001-02-05 14:57:01 +00:00
parent 91b0c37877
commit df5388f3cd
2 changed files with 23 additions and 12 deletions

View File

@ -31,18 +31,17 @@
)";
$phpgw_setup->db->query($sql);
$sql = "CREATE TABLE accounts (
account_id int(11) DEFAULT '0' NOT NULL auto_increment,
account_lid varchar(25) NOT NULL,
account_pwd varchar(32) NOT NULL,
account_firstname varchar(50),
account_lastname varchar(50),
account_permissions text,
account_groups varchar(30),
account_lastlogin int(11),
account_lastloginfrom varchar(255),
$sql = "CREATE TABLE phpgw_accounts (
account_id int(11) DEFAULT '0' NOT NULL auto_increment,
account_lid varchar(25) NOT NULL,
account_pwd varchar(32) NOT NULL,
account_firstname varchar(50),
account_lastname varchar(50),
account_lastlogin int(11),
account_lastloginfrom varchar(255),
account_lastpwd_change int(11),
account_status enum('A','L') DEFAULT 'A' NOT NULL,
account_status enum('A','L'),
account_type char(1),
PRIMARY KEY (account_id),
UNIQUE account_lid (account_lid)
)";

View File

@ -854,10 +854,22 @@
}
}
}
$phpgw_setup->db->query("update accounts set account_groups = ''",__LINE__,__FILE__);
$phpgw_setup->db->query("alter table accounts set account_groups = ''",__LINE__,__FILE__);
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre3";
}
$test[] = "0.9.10pre3";
function upgrade0_9_10pre3()
{
global $phpgw_info, $phpgw_setup;
$phpgw_setup->db->query("alter table accounts rename phpgw_accounts",__LINE__,__FILE__);
$phpgw_setup->db->query("alter table phpgw_accounts drop column account_permissions",__LINE__,__FILE__);
$phpgw_setup->db->query("alter table phpgw_accounts drop column account_groups",__LINE__,__FILE__);
$phpgw_setup->db->query("alter table phpgw_accounts add column account_type char(1)",__LINE__,__FILE__);
$phpgw_setup->db->query("update phpgw_accounts set account_type='u'",__LINE__,__FILE__);
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre4";
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {