Corrected sql generator for auto-increment int id column