Assignments for fixing bugs 596, 688, and 785

Bug 596: domains are treated case-sensitive (JIRA: https://sbforge.org/jira/browse/NAS-1315)

Bug 688: hosts-report should be IDNA decoded when writing harvestInfo to the DB (JIRA: https://sbforge.org/jira/browse/NAS-1316)

Bug 785: invalid domains in PROD system (JIRA: https://sbforge.org/jira/browse/NAS-1322)

These bugs are all related to how domains are ingested, and represented in the DB, and should be fixed at the same time, and bug 785 should be fixed first of all.

Assignment A - Remove invalid domains from the DB (bug 785)

Subtasks:

DOMAIN=$1
if [ -z "$DOMAIN" ]; then
    echo "Must give domain id as argument"
    exit 1
fi
echo "Note: Some warnings will probably appear."
java org.apache.derby.tools.ij <<EOF
connect 'jdbc:derby:fullhddb';
delete from job_configs where config_id in ( select config_id from configurations where domain_id = '$DOMAIN' ) ;
delete from harvest_configs where config_id in ( select config_id from configurations where domain_id = '$DOMAIN' ) ;
delete from job_configs where config_id in ( select config_id from configurations where domain_id = '$DOMAIN' ) ;
delete from config_passwords where config_id in ( select config_id from configurations where domain_id = '$DOMAIN' ) ;
delete from config_seedlists where config_id in ( select config_id from configurations where domain_id = '$DOMAIN' ) ;
delete from historyinfo where config_id in ( select config_id from configurations where domain_id = '$DOMAIN' ) ;
delete from seedlists where domain_id='$DOMAIN'  ;
delete from passwords where domain_id='$DOMAIN'  ;
delete from ownerinfo where domain_id='$DOMAIN'  ;
delete from configurations where domain_id='$DOMAIN';
delete from domains where domain_id='$DOMAIN';
EOF

AssignmentIdnaDecoding (last edited 2011-08-11 13:19:52 by SoerenCarlsen)