add production sql before replace