renamed table notes -> phpgw_notes

This commit is contained in:
bettina 2001-02-22 16:23:00 +00:00
parent bdac59038b
commit c51f21db61
6 changed files with 55 additions and 14 deletions

View File

@ -19,26 +19,26 @@
* the absolute path to fit your site, and you should be up and running. *
\**************************************************************************/
define("PHPGW_SERVER_ROOT", "{SERVER_ROOT}");
define("PHPGW_INCLUDE_ROOT", "{INCLUDE_ROOT}");
$phpgw_info["server"]["header_admin_password"] = "{HEADER_ADMIN_PASSWORD}";
define("PHPGW_SERVER_ROOT", "/usr/local/www/phpgroupware");
define("PHPGW_INCLUDE_ROOT", "/usr/local/www/phpgroupware");
$phpgw_info["server"]["header_admin_password"] = "bla";
$phpgw_domain["default"] = array (
"db_host" => "{DB_HOST}",
"db_name" => "{DB_NAME}",
"db_user" => "{DB_USER}",
"db_pass" => "{DB_PASS}",
"db_host" => "localhost",
"db_name" => "phpgw",
"db_user" => "root",
"db_pass" => "",
/* Look at the README file */
"db_type" => "{DB_TYPE}",
"db_type" => "mysql",
/* This will limit who is allowed to make configuration modifcations */
"config_passwd" => "{CONFIG_PASS}"
"config_passwd" => "bla"
);
/* If you want to have your domains in a select box, change to True */
$phpgw_info["server"]["show_domain_selectbox"] = {DOMAIN_SELECTBOX};
$phpgw_info["server"]["show_domain_selectbox"] = False;
/* This is used to control mcrypt's use */
$phpgw_info["server"]["mcrypt_enabled"] = {ENABLE_MCRYPT};
$phpgw_info["server"]["mcrypt_enabled"] = False;
/* Set this to "old" for versions < 2.4, otherwise the exact mcrypt version you use. */
$phpgw_info["server"]["versions"]["mcrypt"] = "{MCRYPT_VERSION}";

View File

@ -273,10 +273,11 @@
)";
$phpgw_setup->db->query($sql);
$sql = "CREATE TABLE notes (
$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)
)";

View File

@ -1010,6 +1010,18 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre11';
}
$test[] = '0.9.10pre11';
function upgrade0_9_10pre11()
{
global $phpgw_info, $phpgw_setup;
$phpgw_setup->db->query("alter table notes rename phpgw_notes",__LINE__,__FILE__);
$phpgw_setup->db->query("alter table phpgw_notes add column note_category int(9) after note_date",__LINE__,__FILE__);
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre12';
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {

View File

@ -248,10 +248,11 @@
)";
$phpgw_setup->db->query($sql);
$sql = "CREATE TABLE notes (
$sql = "CREATE TABLE phpgw_notes (
note_id serial,
note_owner int,
note_date int,
note_category int,
note_content text
)";
$phpgw_setup->db->query($sql);

View File

@ -1088,6 +1088,33 @@
$phpgw_info['setup']['currentver']['phpgwapi'] = '0.9.10pre11';
}
$test[] = '0.9.10pre10';
function upgrade0_9_10pre10()
{
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");
$phpgw_setup->db->query("drop table notes",__LINE__,__FILE__);
$sql = "CREATE TABLE phpgw_notes (
note_id serial,
note_owner int,
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.10pre12';
}
reset ($test);
while (list ($key, $value) = each ($test)){
if ($phpgw_info["setup"]["currentver"]["phpgwapi"] == $value) {

View File

@ -11,5 +11,5 @@
/* $Id$ */
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre11";
$phpgw_info["server"]["versions"]["phpgwapi"] = "0.9.10pre12";
$phpgw_info["server"]["versions"]["current_header"] = "1.11";