Commit Graph

2376 Commits

Author SHA1 Message Date
Matthew Schinckel bb39037fcb Fixed #22788 -- Ensured custom migration operations can be written.
This inspects the migration operation, and if it is not in the
django.db.migrations module, it adds the relevant imports to the
migration writer and uses the correct class name.
2014-06-16 12:28:52 -04:00
Andrew Godwin c8c79367a2 Fixed #22844: Duplicate SQL for SQLite FKs 2014-06-16 00:27:32 -07:00
Alex Gaynor d17a4cb037 Fixed several flake8 errors 2014-06-15 20:45:15 -04:00
Andrew Godwin c1276785f9 Fixed #22568: Better proxy model support in migrations 2014-06-15 16:01:49 -07:00
Andrew Godwin a8ce5fdc28 Fixed #22470: Full migration support for order_with_respect_to 2014-06-15 14:56:51 -07:00
Andrew Godwin a58f49d104 Persist non-schema-relevant Meta changes in migrations 2014-06-15 12:34:02 -07:00
Andrew Godwin f717ef083a Fixed #22833: Autodetector not doing through mapping correctly 2014-06-15 12:06:48 -07:00
Andrew Godwin edd9f8a7b2 Fixed #22563: Added migration to admin, fixed a few more loader issues. 2014-06-15 11:25:39 -07:00
Andrew Godwin 1e5c01c26e Improve error message for missing migrations in an app 2014-06-15 11:05:40 -07:00
Marc Tamlyn dd57b89fcb Merge pull request #2806 from jorgecarleitao/issue22826
Fixed #22826 -- Improved internal usage of Query.setup_joins.
2014-06-15 10:16:33 +01:00
Jorge C. Leitão d2cbcbcc76 Improved code style of Query.table_alias() usage. 2014-06-14 15:14:13 +02:00
Jorge C. Leitão 0b980ef857 Removed unnecessary attribute assigment to SQLCompiler. 2014-06-14 15:14:12 +02:00
Jorge C. Leitão e66896226a Fixed #22826 -- Improved internal usage of Query.setup_joins. 2014-06-14 15:14:12 +02:00
Shai Berger 612290400f Fixed #22816 -- Corrected Oracle feature flag and fixed introspection test 2014-06-14 00:43:49 +03:00
Shai Berger 06c0e740a4 Added django.utils.six.buffer_types
and used it in the Oracle SchemaEditor. Refs #22715.
2014-06-13 13:09:51 -04:00
Andrew Godwin 386166970c Fix test breakage from previous state fix 2014-06-12 11:12:07 -07:00
Andrew Godwin 7b17350a1b Fixed #22823 (and partly #22563) - FKs from unmigrated apps breaking state.
Thanks to bendavis78 for the test and diagnostic work.
2014-06-12 10:22:43 -07:00
Tim Graham a2cd0e12c9 Silenced deprecation warnings for refs #22811 and fixed build. 2014-06-12 09:28:36 -04:00
Tim Graham 1c58cabad7 Fixed #22811 -- Allowed setting both the old and new TEST database settings.
An ImproperlyConfigured exception will be raised they mismatch.
2014-06-12 08:17:49 -04:00
Anubhav Joshi 42736ac8e8 Fixed #21430 -- Added a RuntimeWarning when unpickling Models and QuerySets from a different Django version.
Thanks FunkyBob for the suggestion, prasoon2211 for the initial patch,
and akaariai, loic, and charettes for helping in shaping the patch.
2014-06-11 10:03:34 -04:00
Tim Graham bc0aba7786 Dropped support for SpatiaLite < 2.4. 2014-06-09 17:53:25 -04:00
Aymeric Augustin 40bfd8561d Fixed #20420 -- Normalized query counts on Oracle.
This is achieved by inserting a fake entry in connection.queries when
not releasing a savepoint (since Oracle doesn't support that operation.)

Also removed the can_release_savepoints feature that was recently added,
but is superseded by this solution.
2014-06-09 21:38:10 +02:00
Aymeric Augustin 127218b92b Simplified handling of use_debug_cursor.
Turned it from a tri-valued boolean into a regular boolean.
2014-06-09 21:35:17 +02:00
Tim Graham 3a926c0778 Tweaked order of create_test_db arguments for backwards compatibility.
Since `serialize` was backported to 1.7, it should appear before `keepdb`.
2014-06-09 11:12:28 -04:00
Andrew Godwin 8c12d51ea2 Fixed #22487: Optional rollback emulation for migrated apps 2014-06-08 19:30:15 -07:00
Andrew Godwin 3f91238adf Fixed #22777: Add dependency on through for autodetected M2M adds 2014-06-08 17:12:59 -07:00
Andrew Godwin 4ce7a6bc84 Fixed #22750, #22248: Model renaming now also alters field FKs 2014-06-07 18:18:02 -07:00
Tim Graham 1e84d261d6 Removed usage of deprecated django.utils.importlib. 2014-06-07 21:10:44 -04:00
Andrew Godwin 6fd455adfc Fixed #22436: More careful checking on method ref'ce serialization 2014-06-07 17:05:51 -07:00
Aymeric Augustin 58de495c54 Fixed #17427 -- Removed dubious definition of connections equality. 2014-06-07 17:04:10 +02:00
Aymeric Augustin cfcca7ccce Fixed #3711, #6734, #12581 -- Bounded connection.queries.
Prevented unlimited memory consumption when running background tasks
with DEBUG=True.

Thanks Rob, Alex, Baptiste, and others.
2014-06-07 14:37:43 +02:00
Tim Graham b5a54168f9 Fixed flake8 errors. 2014-06-06 08:29:27 -04:00
Aymeric Augustin 1181b8a4a9 Merge pull request #2764 from gchp/ticket-20550
Fixed #20550 -- Added keepdb argument to destroy_test_db
2014-06-06 14:05:41 +02:00
Andrew Godwin 1fe941adb0 Prevent operation pollution by later operations of fields 2014-06-05 23:34:13 -07:00
Andrew Godwin aa12ea05ce Rewrote migration autodetector to involve actual computer science.
Fixes #22605, #22735; also lays the ground for some other fixes.
2014-06-05 23:25:35 -07:00
Andrew Godwin 5826dc5282 Merge pull request #2736 from SmileyChris/migration-run_before
Fixed #22725 - Migration.run_before does nothing
2014-06-05 20:29:26 -07:00
Aymeric Augustin e071f67b7f Replaced an explicit vendor check by a feature flag.
Forward-port of c9aedce0 from stable/1.7.x.
2014-06-06 00:32:13 +02:00
Greg Chapple 72f055e535 Fixed #20550 -- Added keepdb argument to destroy_test_db 2014-06-05 23:17:27 +01:00
Anubhav Joshi 5643a3b51b Fixed #10811 -- Made assigning unsaved objects to FK, O2O, and GFK raise ValueError.
This prevents silent data loss.

Thanks Aymeric Augustin for the initial patch and Loic Bistuer for the review.
2014-06-05 13:12:01 -04:00
Aymeric Augustin a03d38ddd4 Added a flag for the ability to introspect nullable fields.
Previously this was conflated with another Oracle-specific behavior.
2014-06-05 17:56:56 +02:00
Craig de Stigter ce993efda8 Fixed #22690 -- Added a check for proxy models containing fields.
Removed the FieldError raised by ModelBase.__new__ in this case.
2014-06-02 09:32:38 -04:00
Claude Paroz 5a504a5311 Fixed #22744 -- Fixed sqlite3 get_relations introspection with views
Thanks Tim Graham for the report and Simon Charette for the review.
2014-06-01 22:03:33 +02:00
Vincent-Vega d04e730224 Fixed #22711 -- Adjusted ordering checks to allow implicit relation fields.
refs #19195.
2014-06-01 15:36:25 -04:00
Simon Charette 7a38f88922 Fixed #22659 -- Prevent model states from sharing field instances.
Thanks to Trac alias tbartelmess for the report and the test project.
2014-06-01 15:10:38 -04:00
Aymeric Augustin 2a5c750ad1 Merge pull request #2726 from gchp/ticket-20550
Fixed #20550 -- Added ability to preserve test db between runs
2014-06-01 17:26:56 +02:00
Moayad Mardini 56cfa508c7 Fixed #22682 -- `makemigrations` will create `MIGRATION_MODULES` package
`makemigrations` will automatically create the package specified
in `MIGRATION_MODULES` if it doesn't already exist.

Thanks ovidiuc4 for the report.
2014-05-30 01:23:09 +03:00
Chris Beaven 45fa520187 Implement Migration.run_before
This attribute (used for reverse dependencies) was previously declared
and mentioned in the code, but never actually used.
2014-05-29 22:42:11 +12:00
Alex Gaynor 1dcc603eff Fixed several typos in Django 2014-05-28 17:39:14 -07:00
Alex Gaynor e79725cdf9 Simplified, very slightly, some code in the oracle backend 2014-05-28 17:17:58 -07:00
Andrew Godwin 61185bba72 Merge pull request #2734 from valberg/double_order_trouble
Fixed #22720 -- Migrations attempt to create _order twice.
2014-05-28 17:12:01 -07:00