|
From: Benjamin C. <bc...@us...> - 2003-04-09 12:11:49
|
Update of /cvsroot/phpbt/phpbt
In directory sc8-pr-cvs1:/tmp/cvs-serv30407
Modified Files:
upgrade.php install.php
Log Message:
Adding project_perm table
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- upgrade.php 11 Mar 2003 13:25:35 -0000 1.30
+++ upgrade.php 9 Apr 2003 12:11:44 -0000 1.31
@@ -35,49 +35,17 @@
include('templates/default/base/templatesperm.html');
exit;
}
- /*switch(DB_TYPE) {
+ switch(DB_TYPE) {
case 'pgsql' :
- $db->query("alter table ".TBL_USER_PREF." add saved_queries int2");
- $db->query("alter table ".TBL_USER_PREF." alter saved_queries set default 1");
- $db->query("update ".TBL_USER_PREF." set saved_queries = 1");
- $db->query("create table ".TBL_BUG_HISTORY."_old as select * from ".TBL_BUG_HISTORY);
- $db->query("drop table ".TBL_BUG_HISTORY);
- $db->query("create table ".TBL_BUG_HISTORY." ( bug_id INT4 NOT NULL DEFAULT '0', changed_field varchar(30) NOT NULL DEFAULT '', old_value varchar(255) NOT NULL DEFAULT '', new_value varchar(255) NOT NULL DEFAULT '', created_by INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0' )");
- $db->query("insert into ".TBL_BUG_HISTORY." select * from ".TBL_BUG_HISTORY."_old");
- $db->query("drop table ".TBL_BUG_HISTORY."_old");
- $db->query("alter table ".TBL_BUG." add database_id int4");
- $db->query("alter table ".TBL_BUG." add site_id int4");
- $db->query("alter table ".TBL_BUG." add closed_in_version_id int4");
- $db->query("alter table ".TBL_BUG." add to_be_closed_in_version_id int4");
- $db->query("create table ".TBL_SITE." ( site_id INT2 NOT NULL DEFAULT '0', site_name varchar(50) NOT NULL DEFAULT '', sort_order INT2 NOT NULL DEFAULT '0', PRIMARY KEY (site_id) )");
- $db->query("INSERT INTO ".TBL_SITE." VALUES (0,'All',1)");
- $db->query("INSERT INTO ".TBL_SITE." VALUES (1,'Development',2)");
- $db->query("INSERT INTO ".TBL_SITE." VALUES (2,'Testing',3)");
- $db->query("INSERT INTO ".TBL_SITE." VALUES (3,'Staging',4)");
- $db->query("INSERT INTO ".TBL_SITE." VALUES (4,'Production',5)");
- $db->query("CREATE SEQUENCE ".TBL_SITE."_seq START 5");
- $db->query("create table ".TBL_DATABASE." ( database_id INT2 NOT NULL DEFAULT '0', database_name varchar(40) NOT NULL DEFAULT '', sort_order INT2 NOT NULL DEFAULT '0', PRIMARY KEY (database_id) )");
- $db->query("INSERT INTO ".TBL_DATABASE." VALUES (1,'Oracle 8.1.7',1)");
- $db->query("INSERT INTO ".TBL_DATABASE." VALUES (2,'MySQL 3.23.49',2)");
- $db->query("INSERT INTO ".TBL_DATABASE." VALUES (3,'PostgreSQL 7.1.3',3)");
- $db->query("CREATE SEQUENCE ".TBL_DATABASE."_seq START 4");
+ $db->query("create table ".TBL_PROJECT_PERM." ( project_id INT4 NOT NULL DEFAULT '0', user_id INT4 NOT NULL DEFAULT '0' )");
break;
case 'mysql' :
- $db->query("alter table ".TBL_USER_PREF." add saved_queries tinyint(1) not null default '1' after email_notices");
- $db->query("alter table ".TBL_BUG_HISTORY." change changed_field changed_field varchar(30) not null");
- $db->query("alter table ".TBL_BUG." add database_id int not null after resolution_id, add site_id int not null after database_id, add closed_in_version_id int not null after version_id, add to_be_closed_in_version_id int not null after closed_in_version_id");
- $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(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)");
- $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("create table ".TBL_PROJECT_PERM." ( project_id int(11) NOT NULL default '0', user_id int(11) NOT NULL default '0' )");
break;
case 'oci8' :
+ $db->query("create table ".TBL_PROJECT_PERM." ( project_id number(10) default '0' NOT NULL, user_id number(10) default '0' NOT NULL )");
break;
- }*/
+ }
$db->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('GROUP_ASSIGN_TO', '3', 'The group to whom bugs can be assigned', 'multi');");
}
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- install.php 18 Oct 2002 17:48:35 -0000 1.35
+++ install.php 9 Apr 2003 12:11:44 -0000 1.36
@@ -92,7 +92,7 @@
'/TBL_USER_PERM/' => $_pv['tbl_prefix'].'user_perm',
'/TBL_USER_PREF/' => $_pv['tbl_prefix'].'user_pref',
'/TBL_VERSION/' => $_pv['tbl_prefix'].'version',
- '/TBL_PROJECT_GROUP/' => $_pv['tbl_prefix'].'project_group',
+ '/TBL_PROJECT_PERM/' => $_pv['tbl_prefix'].'project_perm',
'/TBL_DATABASE/' => $_pv['tbl_prefix'].'database_server',
'/TBL_SITE/' => $_pv['tbl_prefix'].'site',
'/OPTION_ADMIN_EMAIL/' => $_pv['admin_login'],
|