updated SQL generation script to include Settings module