#30681: SQL script from sqlsequencereset doesn't work on Postgres 11.3.
-------------------------------------+-------------------------------------
Reporter: Iwan Paolucci | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bluppfisk):
* status: closed => new
* resolution: worksforme =>
Comment:
I find the same results on PostgreSQL 13 (Debian 11 bullseye) with PostGIS
extension.
After migrating my database from another server with pg_dump/psql, I found
that some sequences were no longer in order.
Using ./manage.py sqlsequencereset myapp | psql did not work and I found
that some guides tell you to:
`SELECT setval('load_load_id_seq', (SELECT MAX(load_id) FROM load));` (in
my case)
instead of `pg_get_serial_sequence()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/30681#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/061.9dc6d2e094153a1aa38feecd17d94af1%40djangoproject.com.