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


1.3
date	2001.08.28.21.46.30;	author kmaples;	state Exp;
branches;
next	1.2;

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

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


desc
@@


1.3
log
@Issue number: 4053
Removed 'platform' and 'operating system' from database enums(); both are
now abstracted into their own tables, though no interface is currently being
provided for making edits to these fields.
@
text
@#/bin/sh

DIR=__SANDBOX__/helm/scripts/migration/1.2.0

# Perform the issues-related upgrades:
IZDIR=__SANDBOX__/issuezilla

echo Determining issues databases to upgrade
if [ 'x__IZ_MULTIPLE_PROJECT_DATABASES__' = 'xtrue' ] 
then
  IZDBS=`mysql -u__DATABASE_USER__ -p__DATABASE_PASSWORD__ \
    --host=__DATABASE_HOST__ --port=__DATABASE_PORT__ \
    -e 'SHOW DATABASES' | egrep "^__IZ_DATABASE_NAME__[_][0-9]+$"`
else
  IZDBS='__IZ_DATABASE_NAME__'
fi

for db in $IZDBS
do
  for sql in `cat $DIR/LoadOrderIZ.lst`
  do
    echo Running $sql against database $db
    mysql -u__DATABASE_USER__ -p__DATABASE_PASSWORD__ \
        --host=__DATABASE_HOST__ --port=__DATABASE_PORT__ \
        -D $db < $DIR/$sql  
    
    if [ -f $IZDIR/data/$db/params ]
    then
      echo Deleting $IZDIR/data/$db/params
      rm $IZDIR/data/$db/params
    fi   

  done  
  echo Mapping Helm users to IZ
  $DIR/map_iz_to_helm.pl --issues_database=$db 

  echo Mapping platform and operating system to new tables
  $DIR/map_iz_to_helm.pl --issues_database=$db  

  echo Running checksetup.pl:  
  $IZDIR/checksetup.pl --database=$db --user=__DATABASE_ADMIN_USER__ \
    --password=__DATABASE_ADMIN_PASSWORD__   
done
echo Completed upgrading issues databases
@


1.2
log
@Populate the Helm id/IZ id mappings table on upgrade.
@
text
@d32 1
d36 7
@


1.1
log
@Sorting out migration of IZ user record data in the case of programmatic
users
@
text
@d25 1
a25 1
        $db < $DIR/$sql  
d33 2
@

