added access field to categories table

This commit is contained in:
bettina 2001-03-27 12:20:39 +00:00
parent 130d7411b0
commit f0458b1acd
5 changed files with 50 additions and 5 deletions

View File

@ -303,6 +303,7 @@
cat_id int(9) DEFAULT '0' NOT NULL auto_increment,
cat_parent int(9) DEFAULT '0' NOT NULL,
cat_owner int(11) DEFAULT '0' NOT NULL,
cat_access char(7),
cat_appname varchar(50) NOT NULL,
cat_name varchar(150) NOT NULL,
cat_description varchar(255) NOT NULL,
@ -345,7 +346,7 @@
)";
$phpgw_setup->db->query($sql);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre25';
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
update_version_table();
// $phpgw_setup->update_version_table();

View File

@ -1396,6 +1396,18 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
}
$test[] = '0.9.10pre24';
function upgrade0_9_10pre24()
{
global $phpgw_info, $phpgw_setup;
$sql = "alter table phpgw_categories add column cat_access char(7) after cat_owner";
$phpgw_setup->db->query($sql,__LINE__,__FILE__);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre25';
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {

View File

@ -275,6 +275,7 @@
cat_id serial,
cat_parent int,
cat_owner int,
cat_access char(7),
cat_appname varchar(50) NOT NULL,
cat_name varchar(150) NOT NULL,
cat_description varchar(255) NOT NULL,
@ -313,7 +314,7 @@
)";
$phpgw_setup->db->query($sql);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre25';
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
update_version_table();
?>

View File

@ -1754,6 +1754,37 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre24';
}
$test[] = '0.9.10pre24';
function upgrade0_9_10pre24()
{
global $phpgw_info, $phpgw_setup;
$phpgw_setup->db->query("create table temp as select * from phpgw_categories",__LINE__,FILE__);
$phpgw_setup->db->query("drop sequence phpgw_categories_cat_id_seq",__LINE__,__FILE__);
$phpgw_setup->db->query("drop table phpgw_categories",__LINE__,__FILE__);
$sql = "CREATE TABLE phpgw_categories (
cat_id serial,
cat_parent int,
cat_owner int,
cat_access char(7),
cat_appname varchar(50) NOT NULL,
cat_name varchar(150) NOT NULL,
cat_description varchar(255) NOT NULL,
cat_data text
)";
$phpgw_setup->db->query($sql,__LINE__,__FILE__);
$phpgw_setup->db->query("insert into phpgw_categories select * from temp",__LINE__,__FILE__);
$phpgw_setup->db->query("drop table temp",__LINE__,__FILE__);
$phpgw_info["setup"]["currentver"]["phpgwapi"] = "0.9.10pre25";
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {

View File

@ -11,5 +11,5 @@
/* $Id$ */
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre24";
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre25";
$phpgw_info["server"]["versions"]["current_header"] = "1.11";