drop index "PRIMARY" on mantis_user_table;
drop index idx_user_cookie_string on mantis_user_table;
drop index idx_user_username on mantis_user_table;
drop index idx_enable on mantis_user_table;
drop index idx_access on mantis_user_table;
drop table if exists mantis_user_table;
/*==============================================================*/
/* Table: mantis_user_table */
/*==============================================================*/
create table if not exists mantis_user_table
(
id integer unsigne(10) default '0',
username varchar(32) not null,
realname varchar(64) not null,
email varchar(64) not null,
"password" varchar(32) not null,
date_created datetime not null default '1970-01-01 00:00:01',
last_visit datetime not null default '1970-01-01 00:00:01',
enabled tinyint(3) not null default 1,
protected tinyint(3) not null default 0,
access_level smallint(5) not null default 10,
login_count integer(10) not null default 0,
lost_password_request_ smallint(5) not null default 0,
failed_login_count smallint(5) not null default 0,
cookie_string varchar(64) not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_user_table
(
id
);
/*==============================================================*/
/* Index: idx_user_cookie_string */
/*==============================================================*/
create unique index idx_user_cookie_string on mantis_user_table
(
cookie_string
);
/*==============================================================*/
/* Index: idx_user_username */
/*==============================================================*/
create unique index idx_user_username on mantis_user_table
(
username
);
/*==============================================================*/
/* Index: idx_enable */
/*==============================================================*/
create index idx_enable on mantis_user_table
(
enabled
);
/*==============================================================*/
/* Index: idx_access */
/*==============================================================*/
create index idx_access on mantis_user_table
(
access_level
);
drop index idx_user_cookie_string on mantis_user_table;
drop index idx_user_username on mantis_user_table;
drop index idx_enable on mantis_user_table;
drop index idx_access on mantis_user_table;
drop table if exists mantis_user_table;
/*==============================================================*/
/* Table: mantis_user_table */
/*==============================================================*/
create table if not exists mantis_user_table
(
id integer unsigne(10) default '0',
username varchar(32) not null,
realname varchar(64) not null,
email varchar(64) not null,
"password" varchar(32) not null,
date_created datetime not null default '1970-01-01 00:00:01',
last_visit datetime not null default '1970-01-01 00:00:01',
enabled tinyint(3) not null default 1,
protected tinyint(3) not null default 0,
access_level smallint(5) not null default 10,
login_count integer(10) not null default 0,
lost_password_request_ smallint(5) not null default 0,
failed_login_count smallint(5) not null default 0,
cookie_string varchar(64) not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_user_table
(
id
);
/*==============================================================*/
/* Index: idx_user_cookie_string */
/*==============================================================*/
create unique index idx_user_cookie_string on mantis_user_table
(
cookie_string
);
/*==============================================================*/
/* Index: idx_user_username */
/*==============================================================*/
create unique index idx_user_username on mantis_user_table
(
username
);
/*==============================================================*/
/* Index: idx_enable */
/*==============================================================*/
create index idx_enable on mantis_user_table
(
enabled
);
/*==============================================================*/
/* Index: idx_access */
/*==============================================================*/
create index idx_access on mantis_user_table
(
access_level
);
drop index "PRIMARY" on mantis_project_table;
drop index idx_project_name on mantis_project_table;
drop index idx_project_id on mantis_project_table;
drop index idx_project_view on mantis_project_table;
drop table if exists mantis_project_table;
/*==============================================================*/
/* Table: mantis_project_table */
/*==============================================================*/
create table if not exists mantis_project_table
(
id integer unsigne(10) default '0',
项目名称 varchar(128) not null,
"status" smallint(5) not null default 10,
enabled tinyint(3) not null default 1,
view_state smallint(5) not null default 10,
access_min smallint(5) not null default 10,
file_path varchar(250) not null,
description text not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_project_table
(
id
);
/*==============================================================*/
/* Index: idx_project_name */
/*==============================================================*/
create unique index idx_project_name on mantis_project_table
(
项目名称
);
/*==============================================================*/
/* Index: idx_project_id */
/*==============================================================*/
create index idx_project_id on mantis_project_table
(
id
);
/*==============================================================*/
/* Index: idx_project_view */
/*==============================================================*/
create index idx_project_view on mantis_project_table
(
view_state
);
drop index idx_project_name on mantis_project_table;
drop index idx_project_id on mantis_project_table;
drop index idx_project_view on mantis_project_table;
drop table if exists mantis_project_table;
/*==============================================================*/
/* Table: mantis_project_table */
/*==============================================================*/
create table if not exists mantis_project_table
(
id integer unsigne(10) default '0',
项目名称 varchar(128) not null,
"status" smallint(5) not null default 10,
enabled tinyint(3) not null default 1,
view_state smallint(5) not null default 10,
access_min smallint(5) not null default 10,
file_path varchar(250) not null,
description text not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_project_table
(
id
);
/*==============================================================*/
/* Index: idx_project_name */
/*==============================================================*/
create unique index idx_project_name on mantis_project_table
(
项目名称
);
/*==============================================================*/
/* Index: idx_project_id */
/*==============================================================*/
create index idx_project_id on mantis_project_table
(
id
);
/*==============================================================*/
/* Index: idx_project_view */
/*==============================================================*/
create index idx_project_view on mantis_project_table
(
view_state
);
drop index "PRIMARY" on mantis_bug_file_table;
drop index idx_bug_file_bug_id on mantis_bug_file_table;
drop table if exists mantis_bug_file_table;
/*==============================================================*/
/* Table: mantis_bug_file_table */
/*==============================================================*/
create table if not exists mantis_bug_file_table
(
id integer unsigne(10) default '0',
bug_id integer unsigne(10) not null default '0',
title varchar(250) not null,
description varchar(250) not null,
diskfile varchar(250) not null,
filename varchar(250) not null,
folder varchar(250) not null,
filesize integer(10) not null default 0,
file_type varchar(250) not null,
date_added datetime not null default '1970-01-01 00:00:01',
content blob not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_bug_file_table
(
id
);
/*==============================================================*/
/* Index: idx_bug_file_bug_id */
/*==============================================================*/
create index idx_bug_file_bug_id on mantis_bug_file_table
(
bug_id
);
drop index idx_bug_file_bug_id on mantis_bug_file_table;
drop table if exists mantis_bug_file_table;
/*==============================================================*/
/* Table: mantis_bug_file_table */
/*==============================================================*/
create table if not exists mantis_bug_file_table
(
id integer unsigne(10) default '0',
bug_id integer unsigne(10) not null default '0',
title varchar(250) not null,
description varchar(250) not null,
diskfile varchar(250) not null,
filename varchar(250) not null,
folder varchar(250) not null,
filesize integer(10) not null default 0,
file_type varchar(250) not null,
date_added datetime not null default '1970-01-01 00:00:01',
content blob not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_bug_file_table
(
id
);
/*==============================================================*/
/* Index: idx_bug_file_bug_id */
/*==============================================================*/
create index idx_bug_file_bug_id on mantis_bug_file_table
(
bug_id
);
drop index "PRIMARY" on mantis_bug_table;
drop index idx_bug_sponsorship_to on mantis_bug_table;
drop index idx_bug_fixed_in_versi on mantis_bug_table;
drop index idx_bug_status on mantis_bug_table;
drop index idx_project on mantis_bug_table;
drop table if exists mantis_bug_table;
/*==============================================================*/
/* Table: mantis_bug_table */
/*==============================================================*/
create table if not exists mantis_bug_table
(
id integer unsigne(10) default '0',
project_id integer unsigne(10) not null default '0',
reporter_id integer unsigne(10) not null default '0',
handler_id integer unsigne(10) not null default '0',
duplicate_id integer unsigne(10) not null default '0',
priority smallint(5) not null default 30,
severity smallint(5) not null default 50,
reproducibility smallint(5) not null default 10,
"status" smallint(5) not null default 10,
resolution smallint(5) not null default 10,
projection smallint(5) not null default 10,
category varchar(64) not null,
date_submitted datetime not null default '1970-01-01 00:00:01',
last_updated datetime not null default '1970-01-01 00:00:01',
eta smallint(5) not null default 10,
bug_text_id integer unsigne(10) not null default '0',
os varchar(32) not null,
os_build varchar(32) not null,
platform varchar(32) not null,
version varchar(64) not null,
fixed_in_version varchar(64) not null,
build varchar(32) not null,
profile_id integer unsigne(10) not null default '0',
view_state smallint(5) not null default 10,
summary varchar(128) not null,
sponsorship_total integer(10) not null default 0,
sticky tinyint(3) not null default 0,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_bug_table
(
id
);
/*==============================================================*/
/* Index: idx_bug_sponsorship_to */
/*==============================================================*/
create index idx_bug_sponsorship_to on mantis_bug_table
(
sponsorship_total
);
/*==============================================================*/
/* Index: idx_bug_fixed_in_versi */
/*==============================================================*/
create index idx_bug_fixed_in_versi on mantis_bug_table
(
fixed_in_version
);
/*==============================================================*/
/* Index: idx_bug_status */
/*==============================================================*/
create index idx_bug_status on mantis_bug_table
(
"status"
);
/*==============================================================*/
/* Index: idx_project */
/*==============================================================*/
create index idx_project on mantis_bug_table
(
project_id
);
drop index idx_bug_sponsorship_to on mantis_bug_table;
drop index idx_bug_fixed_in_versi on mantis_bug_table;
drop index idx_bug_status on mantis_bug_table;
drop index idx_project on mantis_bug_table;
drop table if exists mantis_bug_table;
/*==============================================================*/
/* Table: mantis_bug_table */
/*==============================================================*/
create table if not exists mantis_bug_table
(
id integer unsigne(10) default '0',
project_id integer unsigne(10) not null default '0',
reporter_id integer unsigne(10) not null default '0',
handler_id integer unsigne(10) not null default '0',
duplicate_id integer unsigne(10) not null default '0',
priority smallint(5) not null default 30,
severity smallint(5) not null default 50,
reproducibility smallint(5) not null default 10,
"status" smallint(5) not null default 10,
resolution smallint(5) not null default 10,
projection smallint(5) not null default 10,
category varchar(64) not null,
date_submitted datetime not null default '1970-01-01 00:00:01',
last_updated datetime not null default '1970-01-01 00:00:01',
eta smallint(5) not null default 10,
bug_text_id integer unsigne(10) not null default '0',
os varchar(32) not null,
os_build varchar(32) not null,
platform varchar(32) not null,
version varchar(64) not null,
fixed_in_version varchar(64) not null,
build varchar(32) not null,
profile_id integer unsigne(10) not null default '0',
view_state smallint(5) not null default 10,
summary varchar(128) not null,
sponsorship_total integer(10) not null default 0,
sticky tinyint(3) not null default 0,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_bug_table
(
id
);
/*==============================================================*/
/* Index: idx_bug_sponsorship_to */
/*==============================================================*/
create index idx_bug_sponsorship_to on mantis_bug_table
(
sponsorship_total
);
/*==============================================================*/
/* Index: idx_bug_fixed_in_versi */
/*==============================================================*/
create index idx_bug_fixed_in_versi on mantis_bug_table
(
fixed_in_version
);
/*==============================================================*/
/* Index: idx_bug_status */
/*==============================================================*/
create index idx_bug_status on mantis_bug_table
(
"status"
);
/*==============================================================*/
/* Index: idx_project */
/*==============================================================*/
create index idx_project on mantis_bug_table
(
project_id
);
drop index "PRIMARY" on mantis_bugnote_table;
drop index idx_bug on mantis_bugnote_table;
drop index idx_last_mod on mantis_bugnote_table;
drop table if exists mantis_bugnote_table;
/*==============================================================*/
/* Table: mantis_bugnote_table */
/*==============================================================*/
create table if not exists mantis_bugnote_table
(
id integer unsigne(10) default '0',
bug_id integer unsigne(10) not null default '0',
reporter_id integer unsigne(10) not null default '0',
bugnote_text_id integer unsigne(10) not null default '0',
view_state smallint(5) not null default 10,
date_submitted datetime not null default '1970-01-01 00:00:01',
last_modified datetime not null default '1970-01-01 00:00:01',
note_type integer(10) default 0,
note_attr varchar(250),
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_bugnote_table
(
id
);
/*==============================================================*/
/* Index: idx_bug */
/*==============================================================*/
create index idx_bug on mantis_bugnote_table
(
bug_id
);
/*==============================================================*/
/* Index: idx_last_mod */
/*==============================================================*/
create index idx_last_mod on mantis_bugnote_table
(
last_modified
);
drop index idx_bug on mantis_bugnote_table;
drop index idx_last_mod on mantis_bugnote_table;
drop table if exists mantis_bugnote_table;
/*==============================================================*/
/* Table: mantis_bugnote_table */
/*==============================================================*/
create table if not exists mantis_bugnote_table
(
id integer unsigne(10) default '0',
bug_id integer unsigne(10) not null default '0',
reporter_id integer unsigne(10) not null default '0',
bugnote_text_id integer unsigne(10) not null default '0',
view_state smallint(5) not null default 10,
date_submitted datetime not null default '1970-01-01 00:00:01',
last_modified datetime not null default '1970-01-01 00:00:01',
note_type integer(10) default 0,
note_attr varchar(250),
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_bugnote_table
(
id
);
/*==============================================================*/
/* Index: idx_bug */
/*==============================================================*/
create index idx_bug on mantis_bugnote_table
(
bug_id
);
/*==============================================================*/
/* Index: idx_last_mod */
/*==============================================================*/
create index idx_last_mod on mantis_bugnote_table
(
last_modified
);
drop index "PRIMARY" on mantis_news_table;
drop table if exists mantis_news_table;
/*==============================================================*/
/* Table: mantis_news_table */
/*==============================================================*/
create table if not exists mantis_news_table
(
id integer unsigne(10) default '0',
project_id integer unsigne(10) not null default '0',
poster_id integer unsigne(10) not null default '0',
date_posted datetime not null default '1970-01-01 00:00:01',
last_modified datetime not null default '1970-01-01 00:00:01',
view_state smallint(5) not null default 10,
announcement tinyint(3) not null default 0,
headline varchar(64) not null,
body text not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_news_table
(
id
);
drop table if exists mantis_news_table;
/*==============================================================*/
/* Table: mantis_news_table */
/*==============================================================*/
create table if not exists mantis_news_table
(
id integer unsigne(10) default '0',
project_id integer unsigne(10) not null default '0',
poster_id integer unsigne(10) not null default '0',
date_posted datetime not null default '1970-01-01 00:00:01',
last_modified datetime not null default '1970-01-01 00:00:01',
view_state smallint(5) not null default 10,
announcement tinyint(3) not null default 0,
headline varchar(64) not null,
body text not null,
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_news_table
(
id
);
drop index "PRIMARY" on mantis_user_pref_table;
drop table if exists mantis_user_pref_table;
/*==============================================================*/
/* Table: mantis_user_pref_table */
/*==============================================================*/
create table if not exists mantis_user_pref_table
(
id integer unsigne(10) default '0',
user_id integer unsigne(10) not null default '0',
project_id integer unsigne(10) not null default '0',
default_profile integer unsigne(10) not null default '0',
default_project integer unsigne(10) not null default '0',
advanced_report tinyint(3) not null default 0,
advanced_view tinyint(3) not null default 0,
advanced_update tinyint(3) not null default 0,
refresh_delay integer(10) not null default 0,
redirect_delay tinyint(3) not null default 0,
bugnote_order varchar(4) not null default 'ASC',
email_on_new tinyint(3) not null default 0,
email_on_assigned tinyint(3) not null default 0,
email_on_feedback tinyint(3) not null default 0,
email_on_resolved tinyint(3) not null default 0,
email_on_closed tinyint(3) not null default 0,
email_on_reopened tinyint(3) not null default 0,
email_on_bugnote tinyint(3) not null default 0,
email_on_status tinyint(3) not null default 0,
email_on_priority tinyint(3) not null default 0,
email_on_priority_min_ smallint(5) not null default 10,
email_on_status_min_se smallint(5) not null default 10,
email_on_bugnote_min_s smallint(5) not null default 10,
email_on_reopened_min_ smallint(5) not null default 10,
email_on_closed_min_se smallint(5) not null default 10,
email_on_resolved_min_ smallint(5) not null default 10,
email_on_feedback_min_ smallint(5) not null default 10,
email_on_assigned_min_ smallint(5) not null default 10,
email_on_new_min_sever smallint(5) not null default 10,
email_bugnote_limit smallint(5) not null default 0,
language varchar(32) not null default 'english',
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_user_pref_table
(
id
);
drop table if exists mantis_user_pref_table;
/*==============================================================*/
/* Table: mantis_user_pref_table */
/*==============================================================*/
create table if not exists mantis_user_pref_table
(
id integer unsigne(10) default '0',
user_id integer unsigne(10) not null default '0',
project_id integer unsigne(10) not null default '0',
default_profile integer unsigne(10) not null default '0',
default_project integer unsigne(10) not null default '0',
advanced_report tinyint(3) not null default 0,
advanced_view tinyint(3) not null default 0,
advanced_update tinyint(3) not null default 0,
refresh_delay integer(10) not null default 0,
redirect_delay tinyint(3) not null default 0,
bugnote_order varchar(4) not null default 'ASC',
email_on_new tinyint(3) not null default 0,
email_on_assigned tinyint(3) not null default 0,
email_on_feedback tinyint(3) not null default 0,
email_on_resolved tinyint(3) not null default 0,
email_on_closed tinyint(3) not null default 0,
email_on_reopened tinyint(3) not null default 0,
email_on_bugnote tinyint(3) not null default 0,
email_on_status tinyint(3) not null default 0,
email_on_priority tinyint(3) not null default 0,
email_on_priority_min_ smallint(5) not null default 10,
email_on_status_min_se smallint(5) not null default 10,
email_on_bugnote_min_s smallint(5) not null default 10,
email_on_reopened_min_ smallint(5) not null default 10,
email_on_closed_min_se smallint(5) not null default 10,
email_on_resolved_min_ smallint(5) not null default 10,
email_on_feedback_min_ smallint(5) not null default 10,
email_on_assigned_min_ smallint(5) not null default 10,
email_on_new_min_sever smallint(5) not null default 10,
email_bugnote_limit smallint(5) not null default 0,
language varchar(32) not null default 'english',
primary key (id)
);
/*==============================================================*/
/* Index: "PRIMARY" */
/*==============================================================*/
create unique index "PRIMARY" on mantis_user_pref_table
(
id
);