Fixed errors when importing databases that contain foreign keys. At least for mysql.
Added three-digit zero padding to the automatic created revisions. That way its easier to manage for shell scripts etc.