Fix some of the problems created by missing fields in last upgrade.

This commit is contained in:
Miles Lott 2001-03-21 04:06:20 +00:00
parent e2a2e74619
commit 2f327b58c9
4 changed files with 48 additions and 21 deletions

View File

@ -128,19 +128,19 @@
title varchar(64), title varchar(64),
adr_one_street varchar(64), adr_one_street varchar(64),
adr_one_locality varchar(32), adr_one_locality varchar(64),
adr_one_region varchar(32), adr_one_region varchar(64),
adr_one_postalcode varchar(32), adr_one_postalcode varchar(64),
adr_one_countryname varchar(32), adr_one_countryname varchar(64),
adr_one_type varchar(64), adr_one_type varchar(32),
label text, label text,
adr_two_street varchar(64), adr_two_street varchar(64),
adr_two_locality varchar(32), adr_two_locality varchar(64),
adr_two_region varchar(32), adr_two_region varchar(64),
adr_two_postalcode varchar(32), adr_two_postalcode varchar(64),
adr_two_countryname varchar(32), adr_two_countryname varchar(64),
adr_two_type varchar(64), adr_two_type varchar(32),
tel_work varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL, tel_work varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL,
tel_home varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL, tel_home varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL,

View File

@ -1259,7 +1259,6 @@
global $phpgw_info, $phpgw_setup; global $phpgw_info, $phpgw_setup;
$db1 = $phpgw_setup->db; $db1 = $phpgw_setup->db;
$phpgw_setup->db->query("alter table phpgw_addressbook add pubkey text");
$phpgw_setup->db->query("alter table phpgw_addressbook change a_tel tel_work varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL"); $phpgw_setup->db->query("alter table phpgw_addressbook change a_tel tel_work varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL");
$phpgw_setup->db->query("alter table phpgw_addressbook change b_tel tel_home varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL"); $phpgw_setup->db->query("alter table phpgw_addressbook change b_tel tel_home varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL");
$phpgw_setup->db->query("alter table phpgw_addressbook change c_tel tel_fax varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL"); $phpgw_setup->db->query("alter table phpgw_addressbook change c_tel tel_fax varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL");
@ -1302,6 +1301,27 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre17'; $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre17';
} }
$test[] = '0.9.10pre17';
function upgrade0_9_10pre17() {
global $phpgw_info, $phpgw_setup;
$phpgw_setup->db->query("alter table phpgw_addressbook add pubkey text");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_street adr_one_street varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_locality adr_one_locality varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_region adr_one_region varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_postalcode adr_one_postalcode varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_countryname adr_one_countryname varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_work adr_one_type varchar(32)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_home adr_two_type varchar(32)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_poaddr adr_two_street varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_extaddr adr_two_locality varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_parcel adr_two_region varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook change adr_postal adr_two_postalcode varchar(64)");
$phpgw_setup->db->query("alter table phpgw_addressbook add adr_two_countryname varchar(64)");
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre18';
}
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) {

View File

@ -123,18 +123,18 @@
org_unit varchar(64), org_unit varchar(64),
title varchar(64), title varchar(64),
adr_one_street varchar(64), adr_one_street varchar(64),
adr_one_locality varchar(32), adr_one_locality varchar(64),
adr_one_region varchar(32), adr_one_region varchar(64),
adr_one_postalcode varchar(32), adr_one_postalcode varchar(64),
adr_one_countryname varchar(32), adr_one_countryname varchar(64),
adr_one_type varchar(64), adr_one_type varchar(32),
label text, label text,
adr_two_street varchar(64), adr_two_street varchar(64),
adr_two_locality varchar(32), adr_two_locality varchar(64),
adr_two_region varchar(32), adr_two_region varchar(64),
adr_two_postalcode varchar(32), adr_two_postalcode varchar(64),
adr_two_countryname varchar(32), adr_two_countryname varchar(64),
adr_two_type varchar(64), adr_two_type varchar(32),
tel_work varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL, tel_work varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL,
tel_home varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL, tel_home varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL,
tel_voice varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL, tel_voice varchar(40) DEFAULT '+1 (000) 000-0000' NOT NULL,

View File

@ -1564,6 +1564,13 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre17'; $phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre17';
} }
$test[] = '0.9.10pre17';
function upgrade0_9_10pre17() {
global $phpgw_info, $phpgw_setup;
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre18';
}
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) {