Adding the incrementationof the id depending of the max id of the database.