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


1.2
date	2001.04.26.16.46.31;	author kmaples;	state dead;
branches;
next	1.1;

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


desc
@@


1.2
log
@moved the data validation scripts under the test/ dir.
@
text
@#!/bin/sh

# db to check:
DB=$1;

if [ -z "$DB" ]; then
    echo "No database specified!";
    echo "  usage: $0 {iz_database}";
    exit;
fi

MYSQLCMD="mysql -u${DATABASE_ADMIN_USER} -p${DATABASE_ADMIN_PASSWORD} -P${DATABASE_PORT} -h${DATABASE_HOST} --database=${DB}";

echo 
echo 'Make sure you have sourced in env.sh before running this.'
echo
echo 'Performing counts on altered data; all values should'
echo 'be zero if run against a properly upgraded 1.0 db:'

echo 'checking login_name from profiles ...'
$MYSQLCMD -e "select count(login_name) from profiles where login_name not like '%${DOMAIN}';"

echo 'checking password from profiles ...'
$MYSQLCMD -e "select count(password) from profiles where password != 'password';"

# This doesn't seem to work as anticipated; will have to look deeper into this:
#echo 'checking cryptpassword from profiles ...'
#$MYSQLCMD -e "select count(password) from profiles where cryptpassword != encrypt('password');"

echo 'checking issue_status from issues ...'
$MYSQLCMD -e "select count(issue_status) from issues where issue_status = 'ASSIGNED' or issue_status = '';"

echo 'checking oldvalue, newvalue in issues_activity ...'
$MYSQLCMD -e "select count(issue_id) from issues_activity where oldvalue = 'ASSIGNED' or newvalue = 'ASSIGNED';"

echo "Done"

@


1.1
log
@Dirty little shell script to perform column counts on columns that are
manipulated by schema upgrade scripts.
@
text
@@

