Fix database bugs

This makes the installation abort on DB errors & fixes the DB error in the JobDB table which was causing the initial problem. After merging this the rel-v6r12 branch should be installable again.