Fix sql migration update/export tool