#29841: Fixtures counting backward
-------------------------------------+-------------------------------------
Reporter: Victor Porton | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 2.1
(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 Victor Porton):
* status: closed => new
* resolution: invalid =>
Comment:
I am dissatisfied with your solution.
First, it prints SQL code, while I need to execute it. I need to write
custom code which would execute this SQL, in order to be able to execute
it portable for any Django installation. I should not have to write such
code, it should be builtin in Django (or at least in some Django
extension).
Second (more importantly), it prints SQL to reset counters in all models
of an app. I need to reset it only in one model, not all models. Again I
can manually extract this code from `sqlsequencereset` output. It is
manual work, all it should be done automatically and portably.
Third, I want the counter to be reset automatically every time a certain
fixture is loaded. The fixture and its autoincrement are one object not
two. (Loading one without other creates inconsistent data, hard to debug.)
They should be done together. We should devise a backward-compatible
syntax of fixtures to store the counter in the fixture file.
So I have three(!) reasons not to close the bug. I am reopening it again.
--
Ticket URL: <https://code.djangoproject.com/ticket/29841#comment:6>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.4d4c8e5efb6b0d200d1f8d841d7e3ae2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.