#35763: Setting the auto increment value of a database model breaks when you 
add a
new field to the model
-------------------------------------+-------------------------------------
     Reporter:  Kevin Renskers       |                    Owner:  Sachin
                                     |  Kundalwal
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  5.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Natalia Bidart):

 Replying to [comment:5 Claude Paroz]:
 > I suspect that this issue could be related to the fact that SQLite AFAIR
 doesn't support adding columns, so Django is emulating that by deleting
 and recreating the entire table to add new columns. I also suppose that
 the sequence could be lost during that process. If that's correct, I guess
 that Django should ideally also restore any preexisting sequence on those
 tables. If those suppositions are confirmed by some test, then we should
 accept this ticket as a bug.

 If this would be the case (sequences are lost when columns are added),
 then this would be a issue affecting, for example, any primary key,
 wouldn't it? We should've had reports long time ago...

 (I have searched in the web and I couldn't find any similar report.)
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35763#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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701920a43f7c9-5ad3e3b1-1a54-4922-8554-41020b8ab693-000000%40eu-central-1.amazonses.com.

Reply via email to