head	1.14;
access;
symbols
	TIGRIS_1_1_0RC2:1.11.6.5
	TIGRIS_1_1_0RC1:1.11.6.5
	TIGRIS_1_1:1.11.6.5.0.2
	TIGRIS_1_0_8:1.11.6.3
	TIGRIS_1_0_8RC3:1.11.6.3
	TIGRIS_1_0_8RC2:1.11.6.3
	TIGRIS_1_0_8RC1:1.11.6.3
	TIGRIS_1_0_7:1.11.6.3
	TIGRIS_1_0_7RC3:1.11.6.3
	TIGRIS_1_0_7RC2:1.11.6.3
	TIGRIS_1_0_7RC1:1.11.6.3
	TIGRIS_1_0_6:1.11.6.3
	TIGRIS_1_0_6RC5:1.11.6.3
	TIGRIS_1_0_6RC4:1.11.6.2
	TIGRIS_1_0_6RC3:1.11.6.2
	TIGRIS_1_0_6RC2:1.11.6.2
	TIGRIS_1_0_6RC1:1.11.6.2
	TIGRIS_1_0_5:1.11.6.1
	TIGRIS_1_0_5RC6:1.11.6.1
	TIGRIS_1_0_5RC5:1.11.6.1
	TIGRIS_1_0_5RC4:1.11.6.1
	TIGRIS_1_0_5RC3:1.11.6.1
	TIGRIS_1_0_5RC2:1.11.6.1
	TIGRIS_1_0_5RC1:1.11.6.1
	TIGRIS_1_0_4:1.11.6.1
	TIGRIS_1_0_3:1.11
	TIGRIS_1_0_2:1.11
	TIGRIS_1_0_1:1.11
	TIGRIS_1_0:1.11.0.6
	TIGRIS_1_0_0:1.11
	TIGRIS_1_0_0_RC1:1.11.0.2;
locks; strict;
comment	@# @;


1.14
date	2001.06.28.00.35.15;	author ms;	state dead;
branches;
next	1.13;

1.13
date	2001.06.13.21.57.07;	author kmaples;	state Exp;
branches;
next	1.12;

1.12
date	2001.05.02.04.02.49;	author kmaples;	state Exp;
branches;
next	1.11;

1.11
date	2001.03.23.21.28.59;	author kmaples;	state Exp;
branches
	1.11.6.1;
next	1.10;

1.10
date	2001.03.23.03.05.38;	author kmaples;	state Exp;
branches;
next	1.9;

1.9
date	2001.03.23.01.25.40;	author kmaples;	state Exp;
branches;
next	1.8;

1.8
date	2001.03.23.00.12.36;	author kmaples;	state Exp;
branches;
next	1.7;

1.7
date	2001.03.19.18.30.14;	author edk;	state Exp;
branches;
next	1.6;

1.6
date	2001.03.18.04.36.11;	author edk;	state Exp;
branches;
next	1.5;

1.5
date	2001.03.18.01.22.40;	author jrobbins;	state Exp;
branches;
next	1.4;

1.4
date	2001.03.18.01.21.55;	author jrobbins;	state Exp;
branches;
next	1.3;

1.3
date	2001.03.18.01.15.03;	author jrobbins;	state Exp;
branches;
next	1.2;

1.2
date	2001.03.17.21.30.35;	author dlr;	state Exp;
branches;
next	1.1;

1.1
date	2001.03.17.07.50.48;	author leonardr;	state Exp;
branches;
next	;

1.11.6.1
date	2001.05.02.19.54.30;	author kmaples;	state Exp;
branches;
next	1.11.6.2;

1.11.6.2
date	2001.06.07.05.12.47;	author edk;	state Exp;
branches;
next	1.11.6.3;

1.11.6.3
date	2001.06.13.22.02.05;	author kmaples;	state Exp;
branches;
next	1.11.6.4;

1.11.6.4
date	2001.08.02.00.30.40;	author edk;	state Exp;
branches;
next	1.11.6.5;

1.11.6.5
date	2001.08.02.15.19.22;	author edk;	state Exp;
branches;
next	;


desc
@@


1.14
log
@Factored out the migrate scripts in each migration path into master migrate.
upgrade_tigris calls migrate which in turn does the proper actions for the migration path to upgrade.
Added ScriptOrder.lst to each migration path which lists scripts to run, takes relative or full paths.
migrateIZ is the script I wasnt easily able to factor away from the old classic-1.0.0/migrate script so it gets called in the ScriptOrder.lst.
@
text
@#!/bin/sh

SBX=__SANDBOX__
DIR=__SANDBOX__/helm/scripts/migration/classic-1.0.0

IZDB=__IZ_DATABASE_NAME__
DBUSR=__DATABASE_USER__
DBPW=__DATABASE_PASSWORD__
DB=__DATABASE_NAME__

DBADMIN=__DATABASE_ADMIN_USER__
DBADMINPW=__DATABASE_ADMIN_PASSWORD__

if [ -z "$IZDB" ]; then
    IZDB='issues'
fi

echo "Setting the issues database to '${IZDB}'"

# Upgrade the issues database: 
# NOTE: it is assumed that this upgrade is a special case (classic 
# to 1.0), and that therefore there is only a single issues database
# to upgrade. 

if [ ! -d /var/lib/mysql/${IZDB} ]; then 
 
  echo "/var/lib/mysql/${IZDB} not found; looking for bugzilla"

  # There are two kinds of 'classic' here - classic with bugzilla
  # (with tables in the tigris database), and classic with issuezilla
  # (with a free-standing 'issues' database).  In the case of the 
  # former, we need to take special steps first to isolate and upgrade
  # the db to 'issues' before proceeding:

  # Remove all the bugzilla-related table from the old database,
  # and put them in their own database (before dropping them from
  # tigris database):

  echo "Extracting bugzilla from ${DB} to ${IZDB}"
  $DIR/bugzilla_extract_from_joist.pl -t ${DB} \
    -u ${DBADMIN} -p ${DBADMINPW} -i ${IZDB}

  echo "Upgrading bugzilla to issuezilla"
  # Upgrade to issuezilla:
  mysql -u${DBUSR} -p${DBPW} ${IZDB} \
    < $DIR/BZ_TO_IZ.issuezilla.sql 
fi

# Upgrade the tigris database: 
for i in `cat $DIR/LoadOrder.lst`
do
 echo "Running $i"
 mysql -u${DBUSR} -p${DBPW} ${DB} < $DIR/$i
done

# Upgrade the IZ database:
for i in `cat $DIR/LoadOrderIZ.lst`
do 
 echo "Running $i"
 mysql -u${DBUSR} -p${DBPW} ${IZDB} < $DIR/$i
done

$DIR/move_tigrisq

echo "Running issuzilla_helm_user_reconcile.pl against issues databases";
$DIR/issuzilla_helm_user_reconcile.pl 

echo "Running checksetup.pl against issues database - this may take a minute:";
(cd $SBX/issuezilla ; ./checksetup.pl --user ${DBADMIN} --password ${DBADMINPW} --database ${IZDB} )

 
@


1.13
log
@Swapped cmd-line switches for posix-style args.
@
text
@@


1.12
log
@Added script which tries to enable as many old bugzilla/issuezilla user
accounts as it can based on info from the HELM_USER table.
@
text
@d69 1
a69 1
(cd $SBX/issuezilla ; ./checksetup.pl -u ${DBADMIN} -p ${DBADMINPW} -d ${IZDB} )
@


1.11
log
@Fixed some rough spots with bugzilla->issuezilla migration
@
text
@d65 3
@


1.11.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
@a64 3
echo "Running issuzilla_helm_user_reconcile.pl against issues databases";
$DIR/issuzilla_helm_user_reconcile.pl 

@


1.11.6.2
log
@allow instances to install migration sql scripts to be run during specific
migrations (eg. for adding root/guest or adjusting instance tables as
needed).
@
text
@a48 1
INSTANCE_SQL_DIR="$SANDBOX/site/migration/$INSTANCE/classic-1.0.0"
d52 2
a53 6
  echo "Running $i"
  mysql -u${DBUSR} -p${DBPW} ${DB} < $DIR/$i
  if [ -e "$INSTANCE_SQL_DIR/$i" ] ; then
    echo "Running $i from the instance $INSTANCE";
    mysql -u${DBUSR} -p${DBPW} ${DB} < $INSTANCE_SQL_DIR/$i
  fi
@


1.11.6.3
log
@Reviewed by:  leonardr@@collab.net
Swapped cmd-line args for posix-style args.
@
text
@d74 1
a74 1
(cd $SBX/issuezilla ; ./checksetup.pl --user ${DBADMIN} --password ${DBADMINPW} --database ${IZDB} )
@


1.11.6.4
log
@allow instances to provide additional LoadOrder.lst files during
migrations
@
text
@a67 7
if [ -f "$INSTANCE_SQL_DIR/LoadOrder.lst" ] ; then
  for i in `cat $INSTANCE_SQL_DIR/LoadOrder.lst`
  do
    mysqltigris < $INSTANCE_SQL_DIR/$i
  done
fi

@


1.11.6.5
log
@switch back from posix style arguments because they're not supported by
1.0.x issuezilla code, and this was breaking migrations.
@
text
@d81 1
a81 1
(cd $SBX/issuezilla ; ./checksetup.pl -u ${DBADMIN} -p ${DBADMINPW} -d ${IZDB} )
@


1.10
log
@Working to address cases where classic has issuezilla or bugzilla.
@
text
@d1 1
a1 1
#/bin/sh
d3 1
d18 1
a18 6
# Upgrade the tigris database: 
for i in `cat $DIR/LoadOrder.lst`
do
 echo "Running $i"
 mysql -u${DBUSR} -p${DBPW} ${DB} < $DIR/$i
done 
d26 3
d39 1
d43 1
d49 8
d65 2
a66 2
echo "Running checksetup.pl against issues database - this may take a minute:\n";
(cd $DIR/issuezilla ; ./checksetup.pl -u ${DBADMIN} -p ${DBADMINPW} -i ${IZDB} )
@


1.9
log
@added call to checksetup for issues database.
@
text
@d2 1
d5 11
a15 6
# Remove all the bugzilla-related table from the old database,
# and put them in their own database (before dropping them from
# tigris database):

$DIR/bugzilla_extract_from_joist.pl -t __DATABASE_NAME__ \
  -u __DATABASE_USER__ -p __DATABASE_PASSWORD__ -i __IZ_DATABASE_NAME__
d21 1
a21 1
 mysql -u__DATABASE_USER__ -p__DATABASE_PASSWORD__ __DATABASE_NAME__ < $DIR/$i
d28 20
d51 1
a51 1
 mysql -u__DATABASE_USER__ -p__DATABASE_PASSWORD__ __IZ_DATABASE_NAME__ < $DIR/$i
d57 1
a57 2
(cd $DIR/issuezilla ; ./checksetup.pl -u __DATABASE_USER__ -p __DATABASE_PASSWORD__ \
  -d __IZ_DATABASE_NAME__ )
@


1.8
log
@Added the relevant scripts for the issuezilla portion of upgrade.  These
scripts superceede those previously locted in issuezilla/patches/
@
text
@d29 6
@


1.7
log
@call move_tigrisq, and provide a README with instructions as to how to
do this migration.
@
text
@d3 9
d17 10
@


1.6
log
@* lowercase stuff from db (so we know whether or not it exists)
* use either create or update for mailing lists depending on which is
  appropriate
@
text
@d9 1
a9 1
$SANDBOX/helm/scripts/anzu_admin --op=update
@


1.5
log
@corrected syntax error
@
text
@d8 2
@


1.4
log
@specified full path
@
text
@d2 1
a2 1
$DIR=__SANDBOX__/helm/scripts/migration/classic-1.0.0
@


1.3
log
@specified full path
@
text
@d3 1
a3 1
for i in `cat LoadOrder.lst`
@


1.2
log
@These hook scripts should be directly invokable.
@
text
@d2 1
d6 1
a6 1
 mysql -u__DATABASE_USER__ -p__DATABASE_PASSWORD__ __DATABASE_NAME__ < $i
@


1.1
log
@Added scripts to convert from Tigris Classic (tm) to Tigris 1.0.0 (tm). Lovely. A few TODOs: 1) Convert project_mlists into Anzu options. 2) Figure out what to do with the domain_config table. 3) Put in the Eyebrowse tables. 4) Plug in the Bugzilla -> Issuezilla conversion script (yet to be written). That's all for today, I'm going home.
@
text
@d1 1
@

