Changes between Version 4 and Version 5 of MultipleDatabaseSupport

07/10/06 15:21:03 (9 years ago)

Updated current status.


  • MultipleDatabaseSupport

    v4 v5  
    33Work is underway on a patch for #1142, which will add support for multiple database connections. This page documents my current plan and progress towards a fully working patch.
     5=== Current status ===
     7Work is ongoing in the multiple-db-support branch, which you can check out thusly:
     10svn co
     13Most of the basic implementation is done, with the exception of the items in this todo list:
     16||Generate sql for dropping tables in django.db.backends.sql.ansi||||
     17||Generate sql for resetting sequences in postgres backend SchemaBuilder subclass||||
     18||Create mutliple_db.txt doc documenting use of settings, transactions, etc.||||
     19||Link to multiple db doc from other docs where appropriate||||
     20||Review tests and extend where appropriate||||
    522=== The plan ===
    5168 * Add methods to Manager to support per-model installation. This will enable each model to be installed using the connection that it specifies. It causes some complications, mainly in determining the correct order in which to install. My current solution is to depend on the developer already having figure that out by defining her models in a sensible order; and, when that fails, punting any unresolved  constraints to the end of the syncdb or install process. The manager methods will delegate to each model's backend to do the sql creation.
    53 === Current status ===
    55 Current patch is attached (p5.diff). It implements most of the model-level changes, a few manager-level changes, and table creation, including generation (but not execution) of many-many tables. Relative to p4.diff, this patch adds transaction support and many-many table creation and fixes a few bugs. Nothing has been removed yet from; the model table creation code there has just been adapted in django.db.backends.ansi.creation.
Back to Top