diff --git a/setup/sql/mysql_newtables.inc.php b/setup/sql/mysql_newtables.inc.php index 2dde4aa2bb..baed2fe216 100644 --- a/setup/sql/mysql_newtables.inc.php +++ b/setup/sql/mysql_newtables.inc.php @@ -323,12 +323,13 @@ $phpgw_setup->db->query($sql); $sql = "CREATE TABLE phpgw_notes ( - note_id int(20) NOT NULL auto_increment, - note_owner int(11), - note_date int(11), - note_category int(9), - note_content text, - PRIMARY KEY (note_id) + note_id int(20) NOT NULL auto_increment, + note_owner int(11), + note_access char(7), + note_date int(11), + note_category int(9), + note_content text, + PRIMARY KEY (note_id) )"; $phpgw_setup->db->query($sql); @@ -348,8 +349,8 @@ )"; $phpgw_setup->db->query($sql); - $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10'; + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001'; $phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi']; update_version_table(); // $phpgw_setup->update_version_table(); -?> +?> \ No newline at end of file diff --git a/setup/sql/mysql_upgrade_beta.inc.php b/setup/sql/mysql_upgrade_beta.inc.php index 464c304533..ebe8bf6d83 100644 --- a/setup/sql/mysql_upgrade_beta.inc.php +++ b/setup/sql/mysql_upgrade_beta.inc.php @@ -1469,6 +1469,16 @@ $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10'; } + $test[] = '0.9.10'; + function upgrade0_9_10() + { + global $phpgw_info,$phpgw_setup; + + $phpgw_setup->db->query("alter table phpgw_notes add column note_access char(7) after note_owner"); + + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001'; + } + reset ($test); while (list ($key, $value) = each ($test)){ if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) { diff --git a/setup/sql/pgsql_newtables.inc.php b/setup/sql/pgsql_newtables.inc.php index 53cce25425..7e4b6e0daa 100644 --- a/setup/sql/pgsql_newtables.inc.php +++ b/setup/sql/pgsql_newtables.inc.php @@ -294,11 +294,12 @@ $phpgw_setup->db->query($sql); $sql = "CREATE TABLE phpgw_notes ( - note_id serial, - note_owner int, - note_date int, - note_category int, - note_content text + note_id serial, + note_owner int, + note_access char(7), + note_date int, + note_category int, + note_content text )"; $phpgw_setup->db->query($sql); @@ -316,7 +317,7 @@ )"; $phpgw_setup->db->query($sql); - $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10'; + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.11.001'; $phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi']; update_version_table(); ?> diff --git a/setup/sql/pgsql_upgrade_beta.inc.php b/setup/sql/pgsql_upgrade_beta.inc.php index c4e755f5b2..f230bfdcc0 100644 --- a/setup/sql/pgsql_upgrade_beta.inc.php +++ b/setup/sql/pgsql_upgrade_beta.inc.php @@ -1861,6 +1861,34 @@ $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10'; } + $test[] = '0.9.10'; + function upgrade0_9_10() + { + global $phpgw_info,$phpgw_setup; + + $phpgw_setup->db->query("create table phpgw_temp as select * from notes",__LINE__,__FILE__); + + $phpgw_setup->db->query("drop sequence notes_note_id_seq",__LINE__,__FILE__); + + $phpgw_setup->db->query("drop table notes",__LINE__,__FILE__); + + $sql = "CREATE TABLE phpgw_notes ( + note_id serial, + note_owner int, + note_access char(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.11.001'; + } + reset ($test); while (list ($key, $value) = each ($test)){ if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) { diff --git a/version.inc.php b/version.inc.php index bb40d6885a..86fbb8f14c 100644 --- a/version.inc.php +++ b/version.inc.php @@ -11,5 +11,5 @@ /* $Id$ */ - $phpgw_info['server']['versions']['phpgwapi'] = '0.9.10'; + $phpgw_info['server']['versions']['phpgwapi'] = '0.9.11.001'; $phpgw_info['server']['versions']['current_header'] = '1.11';