[ Index ] |
|
Code source de Mantis 1.1.0rc3 |
1 <?php 2 # Mantis - a php based bugtracking system 3 4 # Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org 5 # Copyright (C) 2002 - 2007 Mantis Team - mantisbt-dev@lists.sourceforge.net 6 7 # Mantis is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 2 of the License, or 10 # (at your option) any later version. 11 # 12 # Mantis is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with Mantis. If not, see <http://www.gnu.org/licenses/>. 19 20 # Changes applied to 0.13 database to give us 0.14 21 22 # -------------------------------------------------------- 23 # $Id: 0_13_inc.php,v 1.9.16.1 2007-10-13 22:35:00 giallu Exp $ 24 # -------------------------------------------------------- 25 ?> 26 <?php 27 require( dirname( dirname( __FILE__ ) ) . DIRECTORY_SEPARATOR . 'db_table_names_inc.php' ); 28 29 $upgrades = array(); 30 31 $upgrades[] = new SQLUpgrade( 32 '0.13-1', 33 'Add mantis_project_table', 34 "CREATE TABLE IF NOT EXISTS $t_project_table ( 35 id int(7) unsigned zerofill NOT NULL auto_increment, 36 name varchar(128) NOT NULL, 37 status enum('development','release','stable','obsolete') DEFAULT 'development' NOT NULL, 38 enabled char(3) NOT NULL, 39 view_state set('public','private') DEFAULT 'public' NOT NULL, 40 description text NOT NULL, 41 PRIMARY KEY (id), 42 KEY id (id), 43 UNIQUE name (name) )" 44 ); 45 46 # @@@ Only add this record if the table has 0 rows, i.e. just added now. 47 $upgrades[] = new SQLUpgrade( 48 '0.13-2', 49 'Insert default project into mantis_project_table', 50 "INSERT INTO $t_project_table 51 ( id, name, status, enabled, view_state, description ) 52 VALUES ( '0000001', 'mantis', 'development', 'on', 'public', 'Mantis. Report problems with the actual bug tracker here. (Do not remove this account. You can set it to be disabled or private if you do not wish to see it)' )" 53 ); 54 55 $upgrades[] = new SQLUpgrade( 56 '0.13-3', 57 'Add mantis_project_category_table', 58 "CREATE TABLE IF NOT EXISTS $t_project_category_table ( 59 project_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL, 60 category varchar(32) NOT NULL )" 61 ); 62 63 $upgrades[] = new SQLUpgrade( 64 '0.13-4', 65 'Add mantis_project_version_table', 66 "CREATE TABLE IF NOT EXISTS $t_project_version_table ( 67 project_id int(7) unsigned zerofill DEFAULT '0000000' NOT NULL, 68 version varchar(32) NOT NULL )" 69 ); 70 71 $upgrades[] = new SQLUpgrade( 72 '0.13-5', 73 'Add project_id column to mantis_bug_table', 74 "ALTER TABLE $t_bug_table ADD project_id INT (7) UNSIGNED ZEROFILL not null AFTER id" 75 ); 76 77 $upgrades[] = new SQLUpgrade( 78 '0.13-6', 79 'Change category column in mantis_bug_table to varchar', 80 "ALTER TABLE $t_bug_table CHANGE category category VARCHAR (32) not null" 81 ); 82 83 $upgrades[] = new SQLUpgrade( 84 '0.13-7', 85 'Change version column in mantis_bug_table to varchar', 86 "ALTER TABLE $t_bug_table CHANGE version version VARCHAR (32) DEFAULT 'none' not null" 87 ); 88 89 $upgrades[] = new SQLUpgrade( 90 '0.13-8', 91 'Set project_id to "0000001" for all bugs', 92 "UPDATE $t_bug_table 93 SET project_id='0000001'" 94 ); 95 96 $upgrades[] = new SQLUpgrade( 97 '0.13-9', 98 'Add project_id column news table', 99 "ALTER TABLE $t_news_table ADD project_id INT (7) UNSIGNED ZEROFILL not null AFTER id" 100 ); 101 102 $upgrades[] = new SQLUpgrade( 103 '0.13-10', 104 'Set project_id to "0000001" for all news postings', 105 "UPDATE $t_news_table 106 SET project_id='0000001'" 107 ); 108 109 $upgrades[] = new SQLUpgrade( 110 '0.13-11', 111 'Added login count to user table', 112 "ALTER TABLE $t_user_table ADD login_count INT not null DEFAULT '0' AFTER access_level" 113 ); 114 115 $upgrades[] = new SQLUpgrade( 116 '0.13-12', 117 'Add manager to access_levels', 118 "ALTER TABLE $t_user_table 119 CHANGE access_level access_level 120 ENUM ('viewer','reporter','updater','developer','manager','administrator') DEFAULT 'viewer' 121 NOT NULL" 122 ); 123 124 $upgrades[] = new SQLUpgrade( 125 '0.13-13', 126 'Make username unique', 127 "ALTER IGNORE TABLE $t_user_table ADD UNIQUE(username)" 128 ); 129 130 131 return $upgrades; 132 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 09:42:17 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |