initial auto-generation sql script edited