Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@188 f5dc347c-c33d-0410-90a0-b07cc1902cb9
- Loading branch information
Kenzaburo Ito
committed
Feb 11, 2001
1 parent
ee075a3
commit fd70666
Showing
2 changed files
with
85 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,83 @@ | ||
# ------------------------------------------------------------------------------- | ||
# Upgrading | ||
# ------------------------------------------------------------------------------- | ||
|
||
# Here are the basic steps to upgrade the database tables | ||
# Take a look in db_upgrade.sql as well. | ||
|
||
# ================= | ||
# 0.11.x to 0.12.0 | ||
# ================= | ||
|
||
# Add a new field to store profile descriptions | ||
|
||
ALTER TABLE mantis_bug_table ADD profile_id INT UNSIGNED ZEROFILL not null AFTER votes | ||
|
||
# ================= | ||
# 0.10.2 to 0.11.0 | ||
# ================= | ||
|
||
# I've added a profile table and inserted feedback into the main bug table. | ||
# Also modified version to be an enum (edit using the manage section) | ||
# Run these queries: | ||
|
||
ALTER TABLE mantis_bug_table CHANGE status status ENUM ('new','fdeedback', | ||
'acknowledged','confirmed','assigned','resolved') DEFAULT 'new' not null; | ||
|
||
CREATE TABLE mantis_user_profile_table ( | ||
id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, | ||
user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, | ||
platform varchar(32) NOT NULL, | ||
os varchar(32) NOT NULL, | ||
os_build varchar(16) NOT NULL, | ||
description text NOT NULL, | ||
default_profile char(3) NOT NULL, | ||
PRIMARY KEY (id) | ||
); | ||
|
||
ALTER TABLE mantis_bug_table CHANGE version version ENUM ('none') not null; | ||
|
||
CREATE TABLE mantis_user_pref_table ( | ||
id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, | ||
user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, | ||
advanced_report char(3) NOT NULL, | ||
advanced_view char(3) NOT NULL, | ||
PRIMARY KEY (id) | ||
); | ||
|
||
# ================= | ||
# 0.9.x to 0.10.x | ||
# ================= | ||
|
||
# You will need to add a 'protected' field in the mantis_user_table. | ||
# This command will do the trick: | ||
|
||
ALTER TABLE mantis_user_table ADD protected VARCHAR (3) not null | ||
|
||
# ------------------------------------------------------------------------------- | ||
# Upgrading | ||
# ------------------------------------------------------------------------------- | ||
|
||
# Here are the basic steps to upgrade the database tables | ||
# Take a look in db_upgrade.sql as well. | ||
|
||
# ================= | ||
# 0.12.0 to 0.14.0 | ||
# ================= | ||
|
||
Due to many changes the upgrade procedure is more complicated than before. I | ||
will try my best to clearly illustrate the needed steps below. | ||
|
||
The primary issue is that you may lose your date stamps for user logins and, | ||
more importanly, all bug data. This is due to the time being stored in a | ||
TIMESTAMP field (which is a design error on my part). Secondarily, all news | ||
and bugs are associated with the first project_id (0000001). The first project | ||
defaults to mantis but feel free to rename it. DO NOT DELETE IT. If you have | ||
no projects in your database you will not be able to login. | ||
|
||
You will want to run the upgrade.php3 file. Just type it into the url field. | ||
Hopefully everything goes well with no errors. If you don't worry about the | ||
date then you can just run the queries in db_upgrade.sql | ||
|
||
If you have existing categories they will be converted to varchar(32) in each | ||
bug report. To make sure that you can index these correctly you will need to | ||
create categories reflecting this. So if your original bug table had | ||
('bugtracker','security','other') then you would need to add these three | ||
categories to your project. You can access this from via | ||
Manage->Projects->Edit. Same thing goes for versions. | ||
|
||
News posts with a project_id=0000000 are sitewide posts (and vice versa) | ||
|
||
# ================= | ||
# 0.11.x to 0.12.0 | ||
# ================= | ||
|
||
# Add a new field to store profile descriptions | ||
|
||
ALTER TABLE mantis_bug_table ADD profile_id INT UNSIGNED ZEROFILL not null AFTER votes | ||
|
||
# ================= | ||
# 0.10.2 to 0.11.0 | ||
# ================= | ||
|
||
# I've added a profile table and inserted feedback into the main bug table. | ||
# Also modified version to be an enum (edit using the manage section) | ||
# Run these queries: | ||
|
||
ALTER TABLE mantis_bug_table CHANGE status status ENUM ('new','fdeedback', | ||
'acknowledged','confirmed','assigned','resolved') DEFAULT 'new' not null; | ||
|
||
CREATE TABLE mantis_user_profile_table ( | ||
id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, | ||
user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, | ||
platform varchar(32) NOT NULL, | ||
os varchar(32) NOT NULL, | ||
os_build varchar(16) NOT NULL, | ||
description text NOT NULL, | ||
default_profile char(3) NOT NULL, | ||
PRIMARY KEY (id) | ||
); | ||
|
||
ALTER TABLE mantis_bug_table CHANGE version version ENUM ('none') not null; | ||
|
||
CREATE TABLE mantis_user_pref_table ( | ||
id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL auto_increment, | ||
user_id int(10) unsigned zerofill DEFAULT '0000000000' NOT NULL, | ||
advanced_report char(3) NOT NULL, | ||
advanced_view char(3) NOT NULL, | ||
PRIMARY KEY (id) | ||
); | ||
|
||
# ================= | ||
# 0.9.x to 0.10.x | ||
# ================= | ||
|
||
# You will need to add a 'protected' field in the mantis_user_table. | ||
# This command will do the trick: | ||
|
||
ALTER TABLE mantis_user_table ADD protected VARCHAR (3) not null | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters