mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
cleaned up code and added proper drop tables, which takes into account the sequence records
This commit is contained in:
parent
f7a113632d
commit
0ee9714eb5
@ -26,19 +26,21 @@
|
|||||||
$db->query("DROP TABLE profiles");
|
$db->query("DROP TABLE profiles");
|
||||||
$db->query("drop sequence addressbook_ab_id_seq");
|
$db->query("drop sequence addressbook_ab_id_seq");
|
||||||
$db->query("DROP TABLE addressbook");
|
$db->query("DROP TABLE addressbook");
|
||||||
$db->query("drop sequence webcal_entry_cal_id_seq");
|
$db->query("drop sequence calendar_entry_cal_id_seq");
|
||||||
|
$db->query("drop sequence todo_todo_id_seq");
|
||||||
$db->query("DROP TABLE todo");
|
$db->query("DROP TABLE todo");
|
||||||
$db->query("DROP TABLE calendar_entry");
|
$db->query("DROP TABLE calendar_entry");
|
||||||
$db->query("DROP TABLE calendar_entry_repeats");
|
$db->query("DROP TABLE webcal_entry_repeats");
|
||||||
$db->query("DROP TABLE calendar_entry_user");
|
$db->query("DROP TABLE calendar_entry_user");
|
||||||
$db->query("drop sequence newsgroups_con_seq");
|
$db->query("drop sequence newsgroups_con_seq");
|
||||||
$db->query("DROP TABLE newsgroups");
|
$db->query("DROP TABLE newsgroups");
|
||||||
$db->query("DROP TABLE users_newsgroups");
|
/* $db->query("DROP TABLE users_newsgroups");*/
|
||||||
$db->query("DROP TABLE lang");
|
$db->query("DROP TABLE lang");
|
||||||
$db->query("drop sequence news_msg_con_seq");
|
$db->query("drop sequence news_msg_con_seq");
|
||||||
$db->query("DROP TABLE news_msg");
|
$db->query("DROP TABLE news_msg");
|
||||||
$db->query("DROP TABLE languages");
|
$db->query("DROP TABLE languages");
|
||||||
$db->query("drop sequence categories_cat_id_seq");
|
$db->query("drop sequence categories_cat_id_seq");
|
||||||
$db->query("DROP TABLE categories");
|
$db->query("DROP TABLE categories");
|
||||||
|
$db->query("DROP sequence notes_note_id_seq");
|
||||||
$db->query("DROP TABLE notes");
|
$db->query("DROP TABLE notes");
|
||||||
?>
|
?>
|
@ -722,10 +722,8 @@
|
|||||||
$db2->query("INSERT INTO calendar_entry(cal_id,cal_owner,cal_group,cal_datetime,cal_mdatetime,cal_edatetime,cal_priority,cal_type,cal_access,cal_name,cal_description) VALUES(".$cal_id.",".$cal_owner.",'".$cal_group."',".cal_datetime.",".$cal_mdatetime.",".$cal_edatetime.",".$cal_priority.",'".$cal_type."','".$cal_access."','".$cal_name."','".$cal_description."')",__LINE__,__FILE__);
|
$db2->query("INSERT INTO calendar_entry(cal_id,cal_owner,cal_group,cal_datetime,cal_mdatetime,cal_edatetime,cal_priority,cal_type,cal_access,cal_name,cal_description) VALUES(".$cal_id.",".$cal_owner.",'".$cal_group."',".cal_datetime.",".$cal_mdatetime.",".$cal_edatetime.",".$cal_priority.",'".$cal_type."','".$cal_access."','".$cal_name."','".$cal_description."')",__LINE__,__FILE__);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "DROP TABLE TEMP";
|
$sql = "DROP TABLE TEMP";
|
||||||
$db->query($sql,__LINE__,__FILE__);
|
$db->query($sql,__LINE__,__FILE__);
|
||||||
|
|
||||||
$currentver = "0.9.7pre3";
|
$currentver = "0.9.7pre3";
|
||||||
update_version_table();
|
update_version_table();
|
||||||
}
|
}
|
||||||
@ -733,7 +731,6 @@
|
|||||||
$currentver = "0.9.7";
|
$currentver = "0.9.7";
|
||||||
update_version_table();
|
update_version_table();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($oldversion != $currentver){
|
if ($oldversion != $currentver){
|
||||||
echo " </tr><td>\n";
|
echo " </tr><td>\n";
|
||||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
echo " <tr bgcolor=\"e6e6e6\">\n";
|
||||||
@ -801,36 +798,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function v0_9_9to0_9_10(){
|
|
||||||
global $currentver, $oldversion, $phpgw_info, $db;
|
|
||||||
|
|
||||||
if ($currentver == "0.9.9" || ereg ("^0\.9\.10pre", $currentver)){
|
|
||||||
/*
|
|
||||||
if ($currentver == "0.9.9") {
|
|
||||||
// upgrade code starts here
|
|
||||||
|
|
||||||
// upgrade code ends here
|
|
||||||
$currentver = "0.9.10pre1";
|
|
||||||
update_version_table();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
if ($currentver == "0.9.10pre1") {
|
|
||||||
// upgrade code starts here
|
|
||||||
|
|
||||||
// upgrade code ends here
|
|
||||||
$currentver = "0.9.10pre2";
|
|
||||||
update_version_table();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if ($oldversion != $currentver){
|
|
||||||
echo " </tr><td>\n";
|
|
||||||
echo " <tr bgcolor=\"e6e6e6\">\n";
|
|
||||||
echo " <td>Upgrade from $oldversion to $currentver is completed.</td>\n";
|
|
||||||
echo " </tr>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
v0_9_1to0_9_2();
|
v0_9_1to0_9_2();
|
||||||
v0_9_2to0_9_3();
|
v0_9_2to0_9_3();
|
||||||
|
Loading…
Reference in New Issue
Block a user