forked from extern/egroupware
update of phpgw_categories.access plus phpgw_notes.access type to use varchar
This commit is contained in:
parent
cf9686e512
commit
798ff60cb9
@ -2,7 +2,7 @@
|
||||
/* Basic information about this app */
|
||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['title'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['version'] = '0.9.13.001';
|
||||
$setup_info['phpgwapi']['version'] = '0.9.13.002';
|
||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.16';
|
||||
// $setup_info['phpgwapi']['app_order'] = '6';
|
||||
|
||||
|
@ -305,16 +305,16 @@
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$sql = "CREATE TABLE phpgw_categories (
|
||||
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_level int(3) DEFAULT '0' NOT NULL,
|
||||
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_level int(3) 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,
|
||||
cat_data text,
|
||||
cat_access varchar(7),
|
||||
cat_appname varchar(50) NOT NULL,
|
||||
cat_name varchar(150) NOT NULL,
|
||||
cat_description varchar(255) NOT NULL,
|
||||
cat_data text,
|
||||
PRIMARY KEY (cat_id)
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
@ -330,7 +330,7 @@
|
||||
$sql = "CREATE TABLE phpgw_notes (
|
||||
note_id int(20) NOT NULL auto_increment,
|
||||
note_owner int(11),
|
||||
note_access char(7),
|
||||
note_access varchar(7),
|
||||
note_date int(11),
|
||||
note_category int(9),
|
||||
note_content text,
|
||||
@ -354,7 +354,7 @@
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.001';
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.002';
|
||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||
update_version_table();
|
||||
// $phpgw_setup->update_version_table();
|
||||
|
@ -1685,6 +1685,17 @@
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.001';
|
||||
}
|
||||
|
||||
$test[] = '0.9.13.001';
|
||||
function upgrade0_9_13_001()
|
||||
{
|
||||
global $phpgw_info,$phpgw_setup;
|
||||
|
||||
$phpgw_setup->db->query("alter table phpgw_categories modify column cat_access varchar(7)",__LINE__,__TABLE__);
|
||||
$phpgw_setup->db->query("alter table phpgw_notes modify column note_access varchar(7)",__LINE__,__TABLE__);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.002';
|
||||
}
|
||||
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
@ -283,7 +283,7 @@
|
||||
cat_parent int DEFAULT 0,
|
||||
cat_level int DEFAULT 0,
|
||||
cat_owner int,
|
||||
cat_access char(7),
|
||||
cat_access varchar(7),
|
||||
cat_appname varchar(50) NOT NULL,
|
||||
cat_name varchar(150) NOT NULL,
|
||||
cat_description varchar(255) NOT NULL,
|
||||
@ -302,7 +302,7 @@
|
||||
$sql = "CREATE TABLE phpgw_notes (
|
||||
note_id serial,
|
||||
note_owner int,
|
||||
note_access char(7),
|
||||
note_access varchar(7),
|
||||
note_date int,
|
||||
note_category int,
|
||||
note_content text
|
||||
@ -323,7 +323,7 @@
|
||||
)";
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.001';
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.002';
|
||||
$phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi'];
|
||||
update_version_table();
|
||||
?>
|
||||
|
@ -1875,7 +1875,7 @@
|
||||
$sql = "CREATE TABLE phpgw_notes (
|
||||
note_id serial,
|
||||
note_owner int,
|
||||
note_access char(7),
|
||||
note_access char(7),
|
||||
note_date int,
|
||||
note_category int,
|
||||
note_content text
|
||||
@ -2000,17 +2000,17 @@
|
||||
$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
|
||||
)");
|
||||
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__);
|
||||
|
||||
@ -2205,6 +2205,58 @@
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.001';
|
||||
}
|
||||
|
||||
$test[] = '0.9.13.001';
|
||||
function upgrade0_9_13_001()
|
||||
{
|
||||
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(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("insert into phpgw_categories select * from temp",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_setup->db->query("drop table temp",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_setup->db->query("create table phpgw_temp as select * from phpgw_notes",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_setup->db->query("drop sequence phpgw_notes_note_id_seq",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_setup->db->query("drop table phpgw_notes",__LINE__,__FILE__);
|
||||
|
||||
$sql = "CREATE TABLE phpgw_notes (
|
||||
note_id serial,
|
||||
note_owner int,
|
||||
note_access varchar(7),
|
||||
note_date int,
|
||||
note_category int,
|
||||
note_content text
|
||||
)";
|
||||
|
||||
$phpgw_setup->db->query($sql);
|
||||
|
||||
$phpgw_setup->db->query("insert into phpgw_notes select * from phpgw_temp",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_setup->db->query("drop table phpgw_temp",__LINE__,__FILE__);
|
||||
|
||||
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.13.002';
|
||||
}
|
||||
|
||||
reset ($test);
|
||||
while (list ($key, $value) = each ($test)){
|
||||
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {
|
||||
|
Loading…
Reference in New Issue
Block a user