mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-27 08:19:45 +01:00
added cat_main plus cat_level to phpgw_categories
This commit is contained in:
parent
120bbf4544
commit
b0199b263f
@ -304,7 +304,9 @@
|
|||||||
|
|
||||||
$sql = "CREATE TABLE phpgw_categories (
|
$sql = "CREATE TABLE phpgw_categories (
|
||||||
cat_id int(9) DEFAULT '0' NOT NULL auto_increment,
|
cat_id int(9) DEFAULT '0' NOT NULL auto_increment,
|
||||||
|
cat_main int(9) DEFAULT '0' NOT NULL,
|
||||||
cat_parent int(9) DEFAULT '0' NOT NULL,
|
cat_parent int(9) DEFAULT '0' NOT NULL,
|
||||||
|
cat_level int(3) DEFAULT '0' NOT NULL,
|
||||||
cat_owner int(11) DEFAULT '0' NOT NULL,
|
cat_owner int(11) DEFAULT '0' NOT NULL,
|
||||||
cat_access char(7),
|
cat_access char(7),
|
||||||
cat_appname varchar(50) NOT NULL,
|
cat_appname varchar(50) NOT NULL,
|
||||||
@ -350,7 +352,7 @@
|
|||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.002';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.003';
|
||||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
// $phpgw_setup->update_version_table();
|
// $phpgw_setup->update_version_table();
|
||||||
|
@ -1561,6 +1561,18 @@
|
|||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.002';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.002';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = '0.9.11.002';
|
||||||
|
function upgrade0_9_11_002()
|
||||||
|
{
|
||||||
|
global $phpgw_info,$phpgw_setup;
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("alter table phpgw_categories add column cat_main int(9) default '0' not null after cat_id",__LINE__,__FILE__);
|
||||||
|
$phpgw_setup->db->query("alter table phpgw_categories add column cat_level int(9) default '0' not null after cat_parent",__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.003';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
@ -276,7 +276,9 @@
|
|||||||
|
|
||||||
$sql = "CREATE TABLE phpgw_categories (
|
$sql = "CREATE TABLE phpgw_categories (
|
||||||
cat_id serial,
|
cat_id serial,
|
||||||
cat_parent int,
|
cat_main int,
|
||||||
|
cat_parent int DEFAULT 0,
|
||||||
|
cat_level int DEFAULT 0,
|
||||||
cat_owner int,
|
cat_owner int,
|
||||||
cat_access char(7),
|
cat_access char(7),
|
||||||
cat_appname varchar(50) NOT NULL,
|
cat_appname varchar(50) NOT NULL,
|
||||||
@ -318,7 +320,7 @@
|
|||||||
)";
|
)";
|
||||||
$phpgw_setup->db->query($sql);
|
$phpgw_setup->db->query($sql);
|
||||||
|
|
||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.002';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.003';
|
||||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||||
update_version_table();
|
update_version_table();
|
||||||
?>
|
?>
|
||||||
|
@ -1989,6 +1989,36 @@
|
|||||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.002';
|
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.002';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$test[] = '0.9.11.002';
|
||||||
|
function upgrade0_9_11_002() {
|
||||||
|
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__);
|
||||||
|
|
||||||
|
$phpgw_setup->db->query("CREATE TABLE phpgw_categories (
|
||||||
|
cat_id serial,
|
||||||
|
cat_main int,
|
||||||
|
cat_parent int DEFAULT 0,
|
||||||
|
cat_level int DEFAULT 0,
|
||||||
|
cat_owner int,
|
||||||
|
cat_access varchar(25),
|
||||||
|
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("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.11.003";
|
||||||
|
}
|
||||||
|
|
||||||
reset ($test);
|
reset ($test);
|
||||||
while (list ($key, $value) = each ($test)){
|
while (list ($key, $value) = each ($test)){
|
||||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user