/
db_upgrade.sql
61 lines (45 loc) · 1.76 KB
/
db_upgrade.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Run this to upgrade your bugtracker
# It might complain if the change was already made but no big deal.
# Double check any errors to make sure that it wasn't another problem
#
# mysql -u<username> -p<password> <databasename> < db_upgrade.sql
#
# =================
# 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;
# =================
# 0.10.2 to 0.11.0
# =================
# inserted feedback as a status
ALTER TABLE mantis_bug_table CHANGE status status ENUM ('new','need info',
'acknowledged','confirmed','assigned','resolved') DEFAULT 'new' not null;
# New user profile tables
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)
);
# Versions has been changed to be an enum(edit by hand or through the manage section
ALTER TABLE mantis_bug_table CHANGE version version ENUM ('none') not null;
# New table for default user preferences
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.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