Merging in patch for addressbook

This commit is contained in:
jengo 2000-11-01 10:44:47 +00:00
parent 793040b5ba
commit 512dd9c983
5 changed files with 112 additions and 75 deletions

View File

@ -127,6 +127,7 @@
ab_company_id int(10) unsigned, ab_company_id int(10) unsigned,
ab_title varchar(60), ab_title varchar(60),
ab_address2 varchar(60), ab_address2 varchar(60),
ab_url varchar(255),
PRIMARY KEY (ab_id) PRIMARY KEY (ab_id)
)"; )";
$db->query($sql); $db->query($sql);

View File

@ -124,6 +124,7 @@
ab_company_id int, ab_company_id int,
ab_title varchar(60), ab_title varchar(60),
ab_address2 varchar(60) ab_address2 varchar(60)
ab_url varchar(255),
)"; )";
$db->query($sql); $db->query($sql);
@ -198,4 +199,13 @@
)"; )";
$db->query($sql); $db->query($sql);
$sql = "CREATE TABLE categories (
cat_id serial,
account_id int DEFAULT '0' NOT NULL,
app_name varchar(25) NOT NULL,
cat_name varchar(150) NOT NULL,
cat_description text NOT NULL
)";
$db->query($sql);
?> ?>

View File

@ -259,7 +259,7 @@
global $currentver, $phpgw_info, $db; global $currentver, $phpgw_info, $db;
// The 0.9.3pre1 is only temp until release // The 0.9.3pre1 is only temp until release
if ($currentver == "0.9.2" || $currentver == "0.9.3pre1" || $currentver == "0.9.3pre2" || $currentver == "0.9.3pre3" || $currentver == "0.9.3pre4") { if ($currentver == "0.9.2" || $currentver == "0.9.3pre1" || $currentver == "0.9.3pre2" || $currentver == "0.9.3pre3" || $currentver == "0.9.3pre4" || $currentver == "0.9.3pre5" || $currentver == "0.9.3pre6") {
if ($currentver == "0.9.2" || $currentver == "0.9.3pre1") { if ($currentver == "0.9.2" || $currentver == "0.9.3pre1") {
v0_9_2to0_9_3update_owner("addressbook","ab_owner"); v0_9_2to0_9_3update_owner("addressbook","ab_owner");
v0_9_2to0_9_3update_owner("todo","todo_owner"); v0_9_2to0_9_3update_owner("todo","todo_owner");
@ -301,6 +301,7 @@
$currentver = "0.9.3pre5"; $currentver = "0.9.3pre5";
update_version_table(); update_version_table();
} }
if ($currentver == "0.9.3pre5") { if ($currentver == "0.9.3pre5") {
$db->query("CREATE TABLE categories ( $db->query("CREATE TABLE categories (
cat_id int(9) DEFAULT '0' NOT NULL auto_increment, cat_id int(9) DEFAULT '0' NOT NULL auto_increment,
@ -313,8 +314,15 @@
$currentver = "0.9.3pre6"; $currentver = "0.9.3pre6";
update_version_table(); update_version_table();
} }
if ($currentver == "0.9.3pre6") {
$db->query("alter table addressbook add ab_url varchar(255)");
$currentver = "0.9.3pre7";
update_version_table();
}
echo " <tr bgcolor=\"e6e6e6\">\n"; echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td>Upgrade from 0.9.2 to 0.9.3pre6 is completed.</td>\n"; echo " <td>Upgrade from 0.9.2 to $currentver is completed.</td>\n";
echo " </tr>\n"; echo " </tr>\n";
} }
} }

View File

@ -245,12 +245,13 @@
$db->query("alter table $table change $field $field int(11) NOT NULL"); $db->query("alter table $table change $field $field int(11) NOT NULL");
} }
function v0_9_2to0_9_3pre5(){ function v0_9_2to0_9_3()
{
global $currentver, $phpgw_info, $db; global $currentver, $phpgw_info, $db;
$didupgrade = True; $didupgrade = True;
// The 0.9.3pre1 is only temp until release // The 0.9.3pre1 is only temp until release
if ($currentver == "0.9.2" || $currentver == "0.9.3pre1" || $currentver == "0.9.3pre2" || $currentver == "0.9.3pre3" || $currentver == "0.9.3pre4") { if ($currentver == "0.9.2" || $currentver == "0.9.3pre1" || $currentver == "0.9.3pre2" || $currentver == "0.9.3pre3" || $currentver == "0.9.3pre4" || $currentver == "0.9.3pre5" || $currentver == "0.9.3pre6") {
if ($currentver == "0.9.2" || $currentver == "0.9.3pre1") { if ($currentver == "0.9.2" || $currentver == "0.9.3pre1") {
update_owner("addressbook","ab_owner"); update_owner("addressbook","ab_owner");
update_owner("todo","todo_owner"); update_owner("todo","todo_owner");
@ -275,6 +276,7 @@
} }
$currentver = "0.9.3pre3"; $currentver = "0.9.3pre3";
} }
if ($currentver == "0.9.3pre3") { if ($currentver == "0.9.3pre3") {
$db->query("alter table todo add todo_id_parent int DEFAULT 0 NOT NULL"); $db->query("alter table todo add todo_id_parent int DEFAULT 0 NOT NULL");
$currentver = "0.9.3pre4"; $currentver = "0.9.3pre4";
@ -289,6 +291,22 @@
$currentver = "0.9.3pre5"; $currentver = "0.9.3pre5";
} }
if ($currentver == "0.9.3pre5") {
$db->query("CREATE TABLE categories (
cat_id serial,
account_id int DEFAULT '0' NOT NULL,
app_name varchar(25) NOT NULL,
cat_name varchar(150) NOT NULL,
cat_description text NOT NULL)"
);
$currentver = "0.9.3pre6";
update_version_table();
}
if ($currentver == "0.9.3pre6") {
$db->query("alter table addressbook add ab_url varchar(255)");
$currentver = "0.9.3pre7";
}
echo " <tr bgcolor=\"e6e6e6\">\n"; echo " <tr bgcolor=\"e6e6e6\">\n";
echo " <td>Upgrade from 0.9.2 to $currentver is completed.</td>\n"; echo " <td>Upgrade from 0.9.2 to $currentver is completed.</td>\n";
@ -307,7 +325,7 @@
v9052000to9072000(); v9052000to9072000();
v9072000to0_9_1(); v9072000to0_9_1();
v0_9_1to0_9_2(); v0_9_1to0_9_2();
v0_9_2to0_9_3pre5(); v0_9_2to0_9_3();
$db->query("update applications set app_version='".$phpgw_info["server"]["version"]."' where (app_name='admin' or app_name='filemanager' or app_name='addressbook' or app_name='todo' or app_name='calendar' or app_name='email' or app_name='nntp' or app_name='cron_apps')"); $db->query("update applications set app_version='".$phpgw_info["server"]["version"]."' where (app_name='admin' or app_name='filemanager' or app_name='addressbook' or app_name='todo' or app_name='calendar' or app_name='email' or app_name='nntp' or app_name='cron_apps')");
$db->query("update config set config_value='" . $phpgw_info["server"]["version"] . "' where " $db->query("update config set config_value='" . $phpgw_info["server"]["version"] . "' where "

View File

@ -1 +1 @@
<?php $phpgw_info["server"]["version"] = "0.9.3pre6"; ?> <?php $phpgw_info["server"]["version"] = "0.9.3pre7"; ?>