ID field doesn't reset after delete

You can invoke it in afterDelete lifecycle. Make a findOne request sorted by ID descendent and reset AUTO_INCREMENT to that id + 1.
In case if there are no results returned then reset it to 1.

3 Likes