On Mon, May 7, 2012 at 6: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)?
Hi all, Based on Andreas' work and discussion on this thread, I've: 1. If the user specifies the `reset_sequences` flag, what is performed during test case setup is actually that: A reset of DB sequences. There is no more flushing of tables. For this a method was added to DB backends DatabaseOperation classes. 2. Dropped resetting of sequences from the DB flush now performed during test case teardown code. For this, a stealth option was added to the `flush` management command. 3. Expanded and re-factored [related] documentation a bit. 1. and 2. mean that now: * Pre test case execution: There is no DB table flushing nor reset of sequences (the latter can be asked for the developer by using reset_sequences. * Post test case execution: Flushing of DB tables is performed. https://github.com/ramiro/django/compare/pr45_t18271 So far, I count two favorable from core devs: Karen and Anssi. Any further feedback about the proposed changes is welcome. Especially reports of results of people running their own test suites. I ran the Django test suite w/o against Postgres, MySQL and sqlite3 w/o problems. Hopefully I will be able to commit something along the lines soon. Regards, -- Ramiro Morales -- 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.
