How to work with id in postgresql via django

I am learning django, making a video tutorial on creating a site on django + postgresql and ran into the following problem. When working with postgresql through django admin (model), I create products that are automatically assigned an id. At first everything goes correctly - products are created starting from id 1 and further on ascending. But if you delete the first product (which has id=1) through django admin, then the id of the remaining products does not change, that is, the product whose id was equal to 2 does not become a product whose id is equal to 1. Which looks extremely illogical. Tell me , please, how to make it so that when the first product is deleted, the id of all the rest logically changes (i.e. id=2 changes to id=1 and so on)?

Back to Top