summaryrefslogtreecommitdiff
path: root/django/db/backends/creation.py
Commit message (Collapse)AuthorAgeFilesLines
* [soc2010/app-loading] merged trunkarchive/soc2010/app-loadingsoc2010/app-loadingArthur Koziel2010-09-131-7/+10
| | | | git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12164 -- Removed the Python 2.3 compatibility imports and ↵Russell Keith-Magee2010-05-041-5/+0
| | | | | | workarounds. Thanks to timo and claudep for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12977 -- Ensure that indexes don't exceed character limits on MySQL. ↵Russell Keith-Magee2010-04-281-1/+4
| | | | | | Thanks to carljm for the original report, and hgeerts@osso.nl for the patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #13328 -- Ensured that querysets on models with callable defaults can ↵Russell Keith-Magee2010-04-211-3/+0
| | | | | | be pickled. No, really this time. Thanks to Alex for his help brainstorming the solution. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12850 -- Ensured that constraint names are quoted when they are ↵Russell Keith-Magee2010-03-201-1/+1
| | | | | | removed. Thanks to Tim Kersten for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #12633 -- Modified some old m2m attribute use in deprecated m2m table ↵Russell Keith-Magee2010-01-191-2/+26
| | | | | | creation methods. Also added PendingDeprecation warnings to those methods. Thanks to Alex for the suggestion, and Ramiro for the report and fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12262 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #1142 -- Added multiple database support.Russell Keith-Magee2009-12-221-19/+15
| | | | | | | | | | | | | | | | | This monster of a patch is the result of Alex Gaynor's 2009 Google Summer of Code project. Congratulations to Alex for a job well done. Big thanks also go to: * Justin Bronn for keeping GIS in line with the changes, * Karen Tracey and Jani Tiainen for their help testing Oracle support * Brett Hoerner, Jon Loyens, and Craig Kimmerer for their feedback. * Malcolm Treddinick for his guidance during the GSoC submission process. * Simon Willison for driving the original design process * Cal Henderson for complaining about ponies he wanted. ... and everyone else too numerous to mention that helped to bring this feature into fruition. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11952 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11428 -- Ensured that SQL generating commands and dumpdata don't ↵Russell Keith-Magee2009-07-271-5/+5
| | | | | | include proxy models in their output. Thanks to Anssi Kaariainen for the report. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11343 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11316 -- Fixed a Python 2.3 compatibilty issue with [10966] (in ↵Gary Wilson Jr2009-06-141-2/+5
| | | | | | Python 2.3 on 32-bit machines, 1<<32 is 0). Thanks to kylef for the report and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9253 -- Modified the method used to generate constraint names so that ↵Russell Keith-Magee2009-06-091-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it is consistent regardless of machine word size. NOTE: This change is backwards incompatible for some users. If you are using a 32-bit platform, you will observe no differences as a result of this change. However, users on 64-bit platforms may experience some problems using the `reset` management command. Prior to this change, 64-bit platforms would generate a 64-bit, 16 character digest in the constraint name; for example: ALTER TABLE `myapp_sometable` ADD CONSTRAINT `object_id_refs_id_5e8f10c132091d1e` FOREIGN KEY ... Following this change, all platforms, regardless of word size, will generate a 32-bit, 8 character digest in the constraint name; for example: ALTER TABLE `myapp_sometable` ADD CONSTRAINT `object_id_refs_id_32091d1e` FOREIGN KEY ... As a result of this change, you will not be able to use the `reset` management command on any table created with 64-bit constraints. This is because the the new generated name will not match the historically generated name; as a result, the SQL constructed by the `reset` command will be invalid. If you need to reset an application that was created with 64-bit constraints, you will need to manually drop the old constraint prior to invoking `reset`. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #10647: intermediary tables between two umanaged models are no longer ↵Jacob Kaplan-Moss2009-04-091-1/+2
| | | | | | created. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed the django.contrib.gis test database creation as well.Malcolm Tredinnick2009-03-111-2/+3
| | | | | | Refs r10026 and r10027. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10028 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed some breakages in the test database handling from r10026.Malcolm Tredinnick2009-03-111-0/+3
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@10027 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #3163 -- Add a "Meta.managed" option to models.Malcolm Tredinnick2009-03-091-0/+10
| | | | | | | | | | | This allows a model to be defined which is not subject to database table creation and removal. Useful for models that sit over existing tables or database views. Thanks to Alexander Myodov, Wolfgang Kriesing and Ryan Kelly for the bulk of this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10008 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Changed the way cache specifiers are parsed.Malcolm Tredinnick2009-03-011-4/+5
| | | | | | | | Allows us to reuse the same code in multiple places, avoiding new and interesting bugs (the testing framework had a DIY version that was slightly wrong, for example). Fixed #9833. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9936 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8138 -- Changed django.test.TestCase to rollback tests (when the ↵Karen Tracey2009-01-161-2/+15
| | | | | | | | | | | | | | | | database supports it) instead of flushing and reloading the database. This can substantially reduce the time it takes to run large test suites. This change may be slightly backwards incompatible, if existing tests need to test transactional behavior, or if they rely on invalid assumptions or a specific test case ordering. For the first case, django.test.TransactionTestCase should be used. TransactionTestCase is also a quick fix to get around test case errors revealed by the new rollback approach, but a better long-term fix is to correct the test case. See the testing doc for full details. Many thanks to: * Marc Remolt for the initial proposal and implementation. * Luke Plant for initial testing and improving the implementation. * Ramiro Morales for feedback and help with tracking down a mysterious PostgreSQL issue. * Eric Holscher for feedback regarding the effect of the change on the Ellington testsuite. * Russell Keith-Magee for guidance and feedback from beginning to end. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9862 -- For better SQL portability, don't specify "NULL" on nullableMalcolm Tredinnick2009-01-061-3/+3
| | | | | | | | | columns when creating tables. Patch from Ian Kelly. Columns are NULL by default, so we only need to use "NOT NULL" when we want non-default behaviour. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #9736 -- Added quoting to the SQL constraint names generated during ↵Russell Keith-Magee2008-12-021-2/+2
| | | | | | table creation. This is to accommodate primary keys with spaces. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9543 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed a group of missing imports, aliases and parameter passings from theMalcolm Tredinnick2008-08-121-25/+28
| | | | | | | db.backend.creation refactoring. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8328 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #8228: fixed a Python 2.3 compatibility from [8296].Jacob Kaplan-Moss2008-08-111-0/+5
| | | | git-svn-id: http://code.djangoproject.com/svn/django/trunk@8303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5461 -- Refactored the database backend code to use classes for the ↵Russell Keith-Magee2008-08-111-3/+392
| | | | | | creation and introspection modules. Introduces a new validation module for DB-specific validation. This is a backwards incompatible change; see the wiki for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Added django/db/backends/creation.py, with BaseCreation. Refs #5461Adrian Holovaty2007-09-141-0/+7
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6192 bcc190cf-cafb-0310-a4f2-bffc1f526a37