Generate sql statements from Moodle install to be used in generating ER diagrams