Fix deployment SQL error