On Sat, 2010-12-04 at 11:56 +0800, Russell Keith-Magee wrote:

> Option 4: Introduce a per-database setting -- TEST_DEPENDENCIES --
> that allows the developer to explicitly encode the dependency between
> databases. This means the developer can explicitly encode the
> dependencies that exists in database creation order. We can default to
> assuming 'everything depends on default' (which is what the current
> trunk implements); but this gives end users the flexibility to define
> any dependency they need. The patch on #14799 implements this solution
> (although it needs some tests for the dependency resolution code and
> documentation for the setting itself)
> 
> My personal preference is for (4). I don't like the addition of a
> setting, but it's a setting that most users will be able to ignore
> (since there is a reasonably sensible default), and it is the most
> explicit and configurable option available.
> 
> Opinions? Alternatives?

pre-syncdb handler to check that it's valid to actually run a syncdb on
this database at this time?

Seems a lot more general than just test-related, anyway; I'd have
thought it would make more sense to see (and name, and document) it as a
general dependency of one database on the other - so
creation/updates/migrations should all always happen in an order which
takes any defined dependencies into account. I'm guessing that the test
setup just happens to be the only place (within Django itself) where any
of these processes are automated across multiple DBs at the moment?

FWIW I *always* forget that I have to explicitly call syncdb for each
database, and expect the one call with no db specified to have done the
lot.



Cheers,


Nick
-- 
Nick Phillips / +64 3 479 4195 / nick.phill...@otago.ac.nz
# these statements are my own, not those of the University of Otago

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@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.

Reply via email to