On Wed, Nov 30, 2011 at 5:22 PM, Jeremy Dunck <jdu...@gmail.com> wrote:
> Hi all, > I've got a codebase with a fair bit of fixtures and have been > experiencing some pain around it. One of the pains is migrating the > format of fixtures when a schema change occurs. > > I posted a thread to south-users to discuss the idea of adding a > feature to aid applying migrations to fixture data: > > http://groups.google.com/group/south-users/browse_thread/thread/e358d13a55545082 > > Evgeny responded that perhaps scripting generation of the fixture > was a good approach, and Carl responded that he thinks that generating > the needed test data in the TestCase itself is preferable. Both > approaches avoid the immediate problem of wishing I could migrate > fixture data, because generating the data under their approaches > avoids having fixtures as an authoritative source of data. > > That surprised me a bit since I generally have viewed fixtures as > things to set up once. Have others on the list tried these approaches > (or other approaches) and have any thoughts you'd like to share on it? > > In any case, I think it would be good to do one or both of the following: > > 1) expand on the testing guide to present fixtures as one option > for test data and point out the options to script fixture generation > or avoiding fixtures in favor of TestCase-called generation, > discussing tradeoffs in the approaches > 2) add a django-admin testshell command which would act like > testserver - loading fixtures into a test DB and dropping you into the > shell to munge it as needed; this would be paired with a south feature > for applying migration fixtures. > > Feedback, please? > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > I basically agree with what Carl said, but if you want to use fixture files, I highly reccomend: https://github.com/alex/django-fixture-generator Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Evelyn Beatrice Hall (summarizing Voltaire) "The people's good is the highest law." -- Cicero -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.