head	1.2;
access;
symbols;
locks; strict;
comment	@# @;


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

1.1
date	2001.05.30.00.17.32;	author kmaples;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Update fielddefs w/ componenent/subcomponent change.
@
text
@# $Id: TIGRIS_0_8_4.issuezilla.sql,v 1.1 2001/05/30 00:17:32 kmaples Exp $

# SQL script to bring issuezilla databases from 
# TIGRIS_SEP_13_2000 to TIGRIS_0_8_4

# -------------------------------------------------------
# Change 'component' to 'subcomponent':
# -------------------------------------------------------
# 1.a: components table:

ALTER TABLE components 
    RENAME AS subcomponents;

# 1.b.: issues table:

ALTER TABLE issues 
    DROP KEY component;
ALTER TABLE issues 
    CHANGE component subcomponent 
    VARCHAR(50) DEFAULT '' NOT NULL;
ALTER TABLE issues
    ADD INDEX subcomponent (subcomponent);

# 1.c.: fielddefs table:
UPDATE fielddefs
    SET name = 'subcomponent'
    WHERE name = 'component';

# -------------------------------------------------------
# Change 'products' to component:
# -------------------------------------------------------
# 2.a products table:

ALTER TABLE products 
    RENAME AS components;
ALTER TABLE components
    CHANGE product component
    VARCHAR(64);

# 2.b: milestones table:

ALTER TABLE milestones
    DROP INDEX product;
ALTER TABLE milestones
    CHANGE product component
    VARCHAR(64) DEFAULT '' NOT NULL;
ALTER TABLE milestones 
    ADD UNIQUE component (component, value);

# 2.c: issues table:

ALTER TABLE issues
    DROP INDEX product;
ALTER TABLE issues
    CHANGE product component
    VARCHAR(64) DEFAULT '' NOT NULL;
ALTER TABLE issues
    ADD INDEX component (component);

# 3.d.: fielddefs table:
UPDATE fielddefs
    SET name = 'component'
    WHERE name = 'product';

# -------------------------------------------------------
# Disable IZ's authentication
# -------------------------------------------------------

UPDATE profiles 
SET     
    password = 'password', 
    cryptpassword = encrypt('password');





@


1.1
log
@No need for this to be a .in file anymore.
@
text
@d1 1
a1 1
# $Id: TIGRIS_0_8_4.issuezilla.sql.in,v 1.2 2001/05/01 21:22:38 kmaples Exp $
d7 1
a7 1
# Change 'component' to 'subcomponent":
d24 5
d59 5
@

