|
|
If you manually register user's id, as an example in a migration, Django will not automatically increment the id counter in PostgreSQL. However, `manage.py` has a command which can show you the SQL queries to run in order to fix the issue.
|
|
|
|
|
|
```bash
|
|
|
python3 manage.py sqlsequencereset application
|
|
|
```
|
|
|
|
|
|
Where `application` is the application you want to fix. Thus, you can directly fix the issue with :
|
|
|
|
|
|
```bash
|
|
|
python3 manage.py sqlsequencereset cotisations | python3 manage.py dbshell
|
|
|
``` |
|
|
\ No newline at end of file |