generate sql scripts for repo model