On 8 May 2012 14:22, Karen Tracey <[email protected]> wrote: > On Mon, May 7, 2012 at 5:50 PM, Anssi Kääriäinen <[email protected]> > wrote: >> >> I would like to just get rid of the sequence resets. Oracle doesn't do >> it currently, TestCase doesn't do it, and IMO assuming the IDs are >> going to start from 1 is an assumption one should not make. >> >> Objections to just getting rid of the sequence resets altogether (with >> the opt-in flag)? > > > I did not realize Django code was doing something explicit to reset > sequences during the database flush between TransactionTestCases, I thought > it just happened as a side-effect of the method used to clear the DB.
Taking a quick look at the code, it is a side-effect in the sense that "manage.py flush" on PostgreSQL does that and TransactionTestCase uses exactly that command. Also, one might want to fix #10164 [1] first or the "reset_sequence" flag (which is missleading name for something that does an extra flush) will be a noop on SQLite. [1]: https://code.djangoproject.com/ticket/10164 -- Łukasz Rekucki -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
