From 4af9f4af7d390c37ca33e6bb01c61d7a6d36e0ca Mon Sep 17 00:00:00 2001 From: jengo Date: Mon, 26 Mar 2001 23:40:02 +0000 Subject: [PATCH] Change the todo table to use the phpgw_ prefix --- setup/sql/mysql_newtables.inc.php | 5 +++-- setup/sql/mysql_upgrade_beta.inc.php | 12 ++++++++++++ setup/sql/pgsql_newtables.inc.php | 5 +++-- setup/sql/pgsql_upgrade_beta.inc.php | 11 +++++++++++ version.inc.php | 2 +- 5 files changed, 30 insertions(+), 5 deletions(-) diff --git a/setup/sql/mysql_newtables.inc.php b/setup/sql/mysql_newtables.inc.php index 20594257ad..21d37f94f7 100644 --- a/setup/sql/mysql_newtables.inc.php +++ b/setup/sql/mysql_newtables.inc.php @@ -91,6 +91,7 @@ )"; $phpgw_setup->db->query($sql); + // Note: This table will be removed durring 0.9.11 $sql = "CREATE TABLE profiles ( con int(11) DEFAULT '0' NOT NULL auto_increment, owner varchar(20), @@ -192,7 +193,7 @@ );"; $phpgw_setup->db->query($sql); - $sql = "CREATE TABLE todo ( + $sql = "CREATE TABLE phpgw_todo ( todo_id int(11) DEFAULT '0' NOT NULL auto_increment, todo_id_parent int(11) DEFAULT '0' NOT NULL, todo_owner varchar(25), @@ -344,7 +345,7 @@ )"; $phpgw_setup->db->query($sql); - $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre22'; + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre23'; $phpgw_info['setup']['oldver']['phpgwapi'] = $phpgw_info['setup']['currentver']['phpgwapi']; update_version_table(); // $phpgw_setup->update_version_table(); diff --git a/setup/sql/mysql_upgrade_beta.inc.php b/setup/sql/mysql_upgrade_beta.inc.php index a72b08532d..3f817dffc1 100644 --- a/setup/sql/mysql_upgrade_beta.inc.php +++ b/setup/sql/mysql_upgrade_beta.inc.php @@ -1374,6 +1374,18 @@ $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre22'; } + $test[] = '0.9.10pre22'; + function upgrade0_9_10pre22() + { + global $phpgw_info, $phpgw_setup; + + $phpgw_setup->db->query("alter table todo rename phpgw_todo",__LINE__,__FILE__); + + $phpgw_setup->db->query($sql); + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre23'; + } + + 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 529d328631..16a7a369c8 100644 --- a/setup/sql/pgsql_newtables.inc.php +++ b/setup/sql/pgsql_newtables.inc.php @@ -90,6 +90,7 @@ )"; $phpgw_setup->db->query($sql); + // Note: This table will be removed durring 0.9.11 $sql = "CREATE TABLE profiles ( con serial, owner varchar(20), @@ -168,7 +169,7 @@ $phpgw_setup->db->query($sql); - $sql = "create table todo ( + $sql = "create table phpgw_todo ( todo_id serial, todo_id_parent int, todo_owner varchar(25), @@ -312,7 +313,7 @@ )"; $phpgw_setup->db->query($sql); - $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre22'; + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre23'; $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 88889bc17e..cd8293e078 100644 --- a/setup/sql/pgsql_upgrade_beta.inc.php +++ b/setup/sql/pgsql_upgrade_beta.inc.php @@ -1732,6 +1732,17 @@ $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre22'; } + $test[] = '0.9.10pre22'; + function upgrade0_9_10pre22() + { + global $phpgw_info, $phpgw_setup; + + $phpgw_setup->db->query("alter table todo rename to phpgw_todo",__LINE__,__FILE__); + + $phpgw_setup->db->query($sql); + $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre23'; + } + 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 4e94961d27..af47de5e5b 100644 --- a/version.inc.php +++ b/version.inc.php @@ -11,5 +11,5 @@ /* $Id$ */ - $phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre22"; + $phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre23"; $phpgw_info["server"]["versions"]["current_header"] = "1.11";