|
From: Benjamin C. <bc...@us...> - 2002-09-14 19:03:57
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv27733
Modified Files:
upgrade.php
Log Message:
Dropped the database_version field from the database_server table so it will match the other lookup tables
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- upgrade.php 4 Aug 2002 16:29:01 -0000 1.23
+++ upgrade.php 14 Sep 2002 19:03:48 -0000 1.24
@@ -29,7 +29,7 @@
function upgrade() {
global $db;
-
+
$upgraded = $db->getOne('select varname from '.TBL_CONFIGURATION.' where varname = \'BUG_UNCONFIRMED\'');
if (!$upgraded or DB::isError($upgraded)) {
if (!@is_writeable('c_templates')) {
@@ -46,21 +46,21 @@
$db->query("create table ".TBL_SITE." (site_id int unsigned NOT NULL default '0', site_name varchar(50) NOT NULL default '', sort_order tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (site_id))");
$db->query("create table ".TBL_SITE."_seq (id int unsigned auto_increment not null primary key)");
$db->query("insert into ".TBL_SITE."_seq values (4)");
- $db->query("create table ".TBL_DATABASE." (database_id int(10) unsigned NOT NULL default '0', database_name varchar(30) NOT NULL default '', database_version varchar(10) NOT NULL default '', sort_order tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (database_id))");
+ $db->query("create table ".TBL_DATABASE." (database_id int(10) unsigned NOT NULL default '0', database_name varchar(40) NOT NULL default '', sort_order tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (database_id))");
$db->query("create table ".TBL_DATABASE."_seq (id int unsigned auto_increment not null primary key)");
$db->query("insert into ".TBL_DATABASE."_seq values (3)");
break;
case 'oci8' :
break;
}
-
+
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('SEND_MIME_EMAIL', '1', 'Whether to use MIME quoted-printable encoded emails or not', 'bool')");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('BUG_UNCONFIRMED', '1', 'The status to assign a bug when it is first submitted.', 'multi')");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('BUG_PROMOTED', '2', 'The status to assign a bug when it is promoted (if enabled).', 'multi')");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('BUG_ASSIGNED', '3', 'The status to assign a bug when it is assigned.', 'multi')");
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('BUG_REOPENED', '4', 'The status to assign a bug when it is reopened.', 'multi')");
$db->query("INSERT INTO ".TBL_SITE." VALUES (0,'All',1), (1,'Development',2), (2,'Testing',3), (3,'Staging',4), (4,'Production',5)");
- $db->query("INSERT INTO ".TBL_DATABASE." VALUES (1,'Oracle','8.1.7',1), (2,'MySQL','3.23.49',2), (3,'PostgreSQL','7.1.3',3");
+ $db->query("INSERT INTO ".TBL_DATABASE." VALUES (1,'Oracle 8.1.7',1), (2,'MySQL 3.23.49',2), (3,'PostgreSQL 7.1.3',3");
}
include 'templates/default/upgrade-finished.html';
}
|