fix autoincrement for postgres