Code for reverse-engineering a MySQL schema