#!/bin/bash -e

# Technical Preview
if [ "$oldversion" -eq 3995 ]; then

    echo "Found version RC1..."
    echo "Fixing ignore_xi_meta bug..."
    echo "If you had set any server to ignore XI meta data, you'll need to re-enable that feature!"
    sleep 4

    echo "UPDATE servers SET ignore_xi_meta = 0;" > fix.sql
    mysql -h $cfg__database__fusion__host -u $cfg__database__fusion__user --password="$cfg__database__fusion__pass" $cfg__database__fusion__dbname < fix.sql

fi