head	1.2;
access;
symbols
	TIGRIS_1_1_0RC2:1.1.6.1
	TIGRIS_1_1_0RC1:1.1.6.1
	TIGRIS_1_1:1.1.6.1.0.2
	TIGRIS_1_0_8:1.1.6.1
	TIGRIS_1_0_8RC3:1.1.6.1
	TIGRIS_1_0_8RC2:1.1.6.1
	TIGRIS_1_0_8RC1:1.1.6.1
	TIGRIS_1_0_7:1.1.6.1
	TIGRIS_1_0_7RC3:1.1.6.1
	TIGRIS_1_0_7RC2:1.1.6.1
	TIGRIS_1_0_7RC1:1.1.6.1
	TIGRIS_1_0_6:1.1.6.1
	TIGRIS_1_0_6RC5:1.1.6.1
	TIGRIS_1_0_6RC4:1.1.6.1
	TIGRIS_1_0_6RC3:1.1.6.1
	TIGRIS_1_0_6RC2:1.1.6.1
	TIGRIS_1_0_6RC1:1.1.6.1
	TIGRIS_1_0_5:1.1.6.1
	TIGRIS_1_0_5RC6:1.1.6.1
	TIGRIS_1_0_5RC5:1.1.6.1
	TIGRIS_1_0_5RC4:1.1.6.1
	TIGRIS_1_0_5RC3:1.1.6.1
	TIGRIS_1_0_5RC2:1.1.6.1
	TIGRIS_1_0_5RC1:1.1.6.1
	TIGRIS_1_0_4:1.1.6.1
	TIGRIS_1_0_3:1.1
	TIGRIS_1_0_2:1.1
	TIGRIS_1_0_1:1.1
	TIGRIS_1_0:1.1.0.6
	TIGRIS_1_0_0:1.1
	TIGRIS_1_0_0_RC1:1.1.0.2;
locks; strict;
comment	@# @;


1.2
date	2001.05.01.00.23.31;	author kmaples;	state Exp;
branches;
next	1.1;

1.1
date	2001.03.23.00.12.36;	author kmaples;	state Exp;
branches
	1.1.6.1;
next	;

1.1.6.1
date	2001.05.02.19.54.30;	author kmaples;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Made sure that the programmatic mailing list user is updated in issuezilla
@
text
@# $Id: BZ_TO_IZ.issuezilla.sql,v 1.1 2001/03/23 00:12:36 kmaples Exp $

# SQL script to change the field names in a bugzilla database to
# those in an issuezilla database (essentially, s/bug/issue/g).
# NOTE: this should be run against a bugzilla database *prior* 
# to running issuezilla's checksetup.pl against the same database

# -------------------------------------------------------
# Update attachments table:
# -------------------------------------------------------

ALTER TABLE attachments
    DROP KEY bug_id;
ALTER TABLE attachments
    CHANGE bug_id issue_id
    mediumint(9) DEFAULT '0' NOT NULL;
ALTER TABLE attachments
    ADD INDEX issue_id (issue_id);

# -------------------------------------------------------
# Update 'bugs' table as 'issues':
# -------------------------------------------------------

ALTER TABLE bugs
    RENAME AS issues;
ALTER TABLE issues
    DROP INDEX bug_severity;
ALTER TABLE issues
    DROP INDEX bug_status;
ALTER TABLE issues
    CHANGE bug_id issue_id
    mediumint(9) DEFAULT '0' NOT NULL auto_increment;
ALTER TABLE issues
    CHANGE bug_file_loc issue_file_loc
    text;
ALTER TABLE issues
    CHANGE bug_severity issue_severity 
    enum('critical','normal','low','---','enhancement','requirement','polish') 
    DEFAULT 'critical' NOT NULL;
ALTER TABLE issues
    CHANGE bug_status issue_status 
    enum('NEW','ASSIGNED','REOPENED','RESOLVED','VERIFIED','CLOSED') 
    DEFAULT 'NEW' NOT NULL;
ALTER TABLE issues
    ADD issue_type
    enum('DEFECT','ENHANCEMENT','FEATURE','TASK','PATCH') 
    DEFAULT 'DEFECT' NOT NULL;
ALTER TABLE issues
    ADD INDEX issue_severity (issue_severity);
ALTER TABLE issues
    ADD INDEX issue_status (issue_status);

# -------------------------------------------------------
# Update 'bugs_activity' as 'issues_activity'
# -------------------------------------------------------

ALTER TABLE bugs_activity
    RENAME AS issues_activity;
ALTER TABLE issues_activity
    DROP INDEX bug_id;
ALTER TABLE issues_activity
    CHANGE bug_id issue_id
    mediumint(9) DEFAULT '0' NOT NULL;
ALTER TABLE issues_activity
    ADD INDEX issue_id (issue_id);  

# -------------------------------------------------------
# Update 'cc' table:
# -------------------------------------------------------

ALTER TABLE cc
    DROP INDEX bug_id;
ALTER TABLE cc
    CHANGE bug_id issue_id
    mediumint(9) DEFAULT '0' NOT NULL;
ALTER TABLE cc
    ADD INDEX issue_id (issue_id);

# -------------------------------------------------------
# Update 'groups' table:
# -------------------------------------------------------

ALTER TABLE groups
    CHANGE isbuggroup isissuegroup
    tinyint(4) DEFAULT '0' NOT NULL;

# -------------------------------------------------------
# Table structure for table 'milestones'
# -------------------------------------------------------
CREATE TABLE milestones (
  value varchar(20) DEFAULT '' NOT NULL,
  product varchar(64) DEFAULT '' NOT NULL,
  sortkey smallint(6) DEFAULT '0' NOT NULL,
  UNIQUE product (product,value)
);

# -------------------------------------------------------
# Update the mailing list user:
# -------------------------------------------------------
UPDATE profiles SET login_name = concat( 
  'issues@@', substring_index(login_name, '@@', -1))
  WHERE login_name LIKE 'bugs@@%';

@


1.1
log
@Added the relevant scripts for the issuezilla portion of upgrade.  These
scripts superceede those previously locted in issuezilla/patches/
@
text
@d1 1
a1 1
# $Id: BZ_TO_IZ.issuezilla.sql,v 1.2 2001/03/22 00:11:10 kmaples Exp $
d97 6
a102 1

@


1.1.6.1
log
@Modified migration scripts to change the bugs@@ user to issues@@; added a script
which attempts to reconcile existing helm accounts with older issuezilla
accounts upon upgrade from versions prior to 0.8.4; removed the sql statement
which attempted a brute-force transformation of user accounts in favor of
the aforementioned script; added data validation tools in helm/tests; added
the shared perl db library that these scripts use (HelmDB.pm) in previous
commit.
@
text
@d1 1
a1 1
# $Id: BZ_TO_IZ.issuezilla.sql,v 1.2 2001/05/01 00:23:31 kmaples Exp $
d97 1
a97 6
# -------------------------------------------------------
# Update the mailing list user:
# -------------------------------------------------------
UPDATE profiles SET login_name = concat( 
  'issues@@', substring_index(login_name, '@@', -1))
  WHERE login_name LIKE 'bugs@@%';
@


