Branches

attic/multiple-db-support

View source
attic/multiple-db-support
Author Commit Message Labels Comments Date
250+ commits behind default.
uber...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Move the (old, not Alex's current SoC one) multiple-db-support branch into the attic.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [4188]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [4158]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [4100]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [4050]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [4000]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to 3950. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [3900]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated install() to send post_syncdb when called outside of syncdb()
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged trunk to [3890]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3875]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3850]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3825]. Some tests still failing. (previous commit was from tests/ dir only)
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3825]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3812]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3764]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bug in execution of pending references in install.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] For all backends: commit only when a connection exists.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bug in manager.get_installed_models() that caused installed models list to always have only one model.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bug in handling of inter-app pending statements on syncdb.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed another typo in get_sql_create for pending references.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bug in get_sql_create() where builder was looked up incorrectly for pending statements.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Fixed bug where assigning a connection though Class.objects.db would raise a NameError.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bugs in connection handling and test database setup. All tests now pass for postgres backend. Still failures for mysql and sqlite3, others unknown.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed orphan pending error message. Changed get_create_table to only fill pending if backend supports constraints.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[mult-db] Removed debug print.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bugs in handling of pending references. Fixed dropping of test database, and ensured that it drops even if syncdb() fails.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed scoping bug that caused pending statements to execute too soon in install.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed psycopg2 backend. Removed inheritence from local from all backend DatabaseWrappers.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3754]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3737]. Some tests still failing.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Minor documentation updates
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3661]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed unused functions from django.core.management. Updated django.core.managment.get_sql_create to allow it to work without an active db connection.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Implemented django.core.managment.syncdb using db access through managers. This required changing the progress messages from prospective ('Installing... ') to retrospective ('Installed ... ').
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3660].
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3659].
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3658].
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3657].
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed typo in doc for django.db.connect.
adr...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merged to [3646]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3620]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3578]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3522]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added first, incomplete draft of multiple db doc.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3501]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed unused drop() method from Manager.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added check in model validation for models related to other
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added ``__str__`` to _default connection singleton.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated django.core.management to use SchemaBuilder for each model to create sequence reset statements.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated django.db.backends.postgresql.creation to use postgres-specific SchemaBuilder subclass.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added postgresql-specific SchemaBuilder subclass that includes method for sequence resets.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Backed out settings access through conf.settings, which was based on an incorrect understanding of settings implementation.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Corrected settings handling in isolation tests.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed debug print that should not have been checked in.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3426]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed unneed import.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Expanded request-isolation tests.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added tests for thread isolation of db-related settings.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Reimplemented local proxying django.db.connection et al to be
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated runshell() calls to accept settings.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Moved DateTimeField and TimeField microsecond adjustments
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added first request isolation tests (testing that database settings can safely change between requests).
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed bug in request isolation of ConnectionInfoDescriptor.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Integrated drop table generation from ansi sql, updated model
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated ansi sql test to reflect that drop table output is
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed reverse() from drop table output.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Moved ConnectionInfoDescriptor to django.db, updated imports
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Moved ConnectionInfoDescriptor() from manager to django.db,
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added workarounds for model-loading to allow in-module models to appear in get_models().
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Made some minor formatting/line-length adjustments
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed broken tests.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated runtests.py to load TEST_DATABASE_MODEL settings into
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated query builder functions to use
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added weakref to model in Options (self._model) and method
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated tests/othertests/manager_schema_manipulation to use OTHER_DATABASES settings and access db connection through model._default_manager.db.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated tests/othertests/ansi_sql.py to access db connection info through model._default_manager.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Began updating models.db.query to access connection through manager (work in progress).
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated multiple_databases tests to use OTHER_DATABASES setting.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added MODELS settings to TEST_DATABASES.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Updated ansi sql schema builder to access db connection through model._default_manager.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated related fields to get db connection from model._default_manager.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated Model and its utility functions to access the db connection through the default manager.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed connection information and db_connection from model Meta.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added basic tests for Manager.db attribute.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added ConnectionInfoDescriptor and attached it as db attribute in Manager class.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3354]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Changed name of optional named databases setting to
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Refactored connection handling to correct bugs in original
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added preliminary drop-table generation to django.db.backends.ansi.sql.SchemaBuilder.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Removed sql functions that have been moved to django.db.backends.ansi.sql.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated django.core.management.get_sql_initial_data to use each model's connection info. Removed unused style argument from builder.get_initialdata.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Minor refactoring: moved collation of sql statements by connection name to function.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated django.core.management.get_sql_indexes to use each model's connection info.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3302]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated tests to expect pendings in dict format instead of
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated django.core.management to use pending dicts
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated Manager to use pendings dicts correctly, and added
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added _app_model_order to django.db.models.loading, a dict of
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated ansi sql SchemaBuilder to track pendings as dicts
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fixed dummy backend DatabaseWrapper(): needs to accept settings argument like real backends.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added transaction and relation usage tests to multiple
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Began integrating Manager schema manipulation methods into django.core.management. Updated multiple db models test to include operations on installed models.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added install() and other schema manipulation methods to Manager. Fixed bug in manager assignment for inherited classes (objects and _default_manager in child class were still those belonging to parent class).
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added builder property to creation module of all backends. Currently for all backends builder is a django.db.backends.ansi.sql.SchemaBuilder.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Made minor formatting updates. Added basic support for drop table, still needs to handle cascade.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added TEST_DATABASES tuple to runtests.py. Now, databases in TEST_DATABASES will be created (if they don't exist or if the user accepts) at the start of the test run and dropped at the end. Those databases will be assigned to settings.DATABASES, with settings other than the database name inherited either from the DATABASES property in the active settings file (if it is present and contains a matching key) or from the default database settings.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Fix style handling: don't use mutable default style argument.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added django.db.backends.ansi.sql, with BoundStatement and SchemaBuilder classes that are used to construct the SQL for creating tables, indexes, etc. Added tests for basic table, relationship, index and initial data creation. Added supports_compound_statements flag to backends to avoid splitting initial data when not needed.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Merge trunk to [3257]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added initialization code to runtests.py that creates
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Cleaned up settings access in ConnectionInfo.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added DATABASES = {} to global_settings
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Updated tests/runtests.py to create test databases for all
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added optional db_connection property to model Meta classes,
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
[multi-db] Added connections parameter to transaction
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Added basic tests for settings.DATABASES populating
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Removed redundant error check.
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added connect() function and ConnectionInfo class to abstract
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Merge trunk to [3226]
jpel...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Merge trunk to [3216]
ja...@bcc190cf-cafb-0310-a4f2-bffc1f526a37
Created branch for MultipleDatabaseSupport. Refs #1142.