Andrew Godwin
a64bc3df77
Fixed #23093 : soft application detection for swapped models
2014-07-25 09:35:38 -07:00
Andrew Godwin
ed4812692e
Merge pull request #2938 from dekkers/ticket_23071
...
Fixed #23071 -- Use last migration's name in dependency to other app
2014-07-25 08:53:57 -07:00
Tim Graham
64e75c47ef
Fixed #23014 -- Infinite migration regression with unique/index_together.
2014-07-24 14:27:10 -04:00
Claude Paroz
8c30df15f1
Fixed #23030 -- Properly handled geometry columns metadata during migrations
...
Thanks kunitoki for the report and initial patches.
2014-07-23 12:10:23 +02:00
Jeroen Dekkers
3582698c13
Fixed #23071 -- Use last migration's name in dependency to other app
...
Changed the autodetector to lookup the name of the other app's last
migration in the graph and use that as dependency instead of using
__latest__.
2014-07-22 01:03:02 +02:00
Andrew Godwin
e24e9e0438
Fixed #23014 : Renaming not atomic with unique together
2014-07-21 11:36:34 +01:00
Andrew Godwin
7dacc6ae46
Fixed #23009 : Shorten FK identifiers in add_field and make consistent
2014-07-21 10:50:21 +01:00
Andrew Godwin
dcb4ed5170
Fixed #22975 : Don't call rename SQL if not needed
2014-07-21 10:14:00 +01:00
Andrew Godwin
2984b30ce8
Fixed #23039 : Don't try to serialize unmanaged models in tests
2014-07-21 10:09:31 +01:00
Andrew Godwin
5875b8d133
Fixed #23043 : alter_field drops defaults too
2014-07-21 10:04:36 +01:00
Andrew Godwin
145d231782
Fixed #23041 : Bad base dependencies for proxy models
2014-07-16 09:59:08 -07:00
Gavin Wahl
6e2b82fdf6
Fixed #22998 -- Updated the fast_delete logic for GFKs
2014-07-16 12:28:00 +03:00
Tim Graham
0154965392
Fixed #23013 -- Fixed removing unique_together/index_together constraints in migrations.
...
Thanks melinath for the report.
2014-07-15 15:20:59 -04:00
Tim Graham
9a2ab62977
Fixed #23008 -- Fixed typo causing bad migration dependencies.
...
Thanks semenov for the report and Florian for investigation.
2014-07-15 08:48:29 -04:00
Shai Berger
dd9b3312d0
Fixed name of database connection feature
2014-07-14 19:23:57 +03:00
Anssi Kääriäinen
9cd5201abd
Fixed #22994 -- regression with generic FK + admin list_view
...
The reason for the regression was that the GenericForeignKey field isn't
something meta.get_field_by_name() should return. The reason is that a
couple of places in Django expects get_field_by_name() to work this way.
It could make sense to return GFKs from get_field_by_name(), but that
should likely be done as part of meta refactoring or virtual fields
refactoring patches.
Thanks to glicerinu@gmail.com for the report and to Tim for working on
the issue.
2014-07-14 10:50:41 -04:00
Andrew Godwin
ebb13bbd88
Fixed #22983 : Alert when squashing RunPython operations with referred functions.
2014-07-11 19:00:39 -07:00
Andrew Godwin
b02abd688a
Fixed #22922 : Better error message for InvalidBasesError.
2014-07-09 23:57:35 -07:00
Andrew Godwin
008bff92b7
Fixed #22970 : Incorrect dependencies for existing migrated apps
2014-07-09 23:53:43 -07:00
Anubhav Joshi
011abb7d96
Fixed #19671 -- Added warnings that null and validators are ignored for ManyToManyField.
...
Thanks Loic Bistuer and Tim Graham for help and review.
2014-07-09 16:01:09 -04:00
Loic Bistuer
2572c07cc6
Fixed #22906 -- Added a more helpful repr to migrations' ModelState.
...
Thanks Collin Anderson for the report and original patch.
2014-07-06 14:56:18 +07:00
Daniel Hahler
67f9f385aa
Fixed various minor doc typos / references.
2014-07-05 20:26:26 -04:00
Tim Graham
ab431fbd4f
Fixed flake8 indentation.
2014-07-05 20:24:00 -04:00
Andrew Godwin
f751109cb2
Merge pull request #2881 from charettes/ticket-22943-compiled-regex-deconstruction
...
Fixed #22943 -- Correctly serialize compiled regexes.
2014-07-05 16:37:10 -07:00
Andrew Godwin
80a12f21e3
Fixed #22960 : Bad handling of relations as PKs in autodetector
2014-07-05 16:33:03 -07:00
Tim Graham
7fd55c3481
Fixed #20631 -- Increased the default EmailField max_length to 254.
...
Thanks pmartin for the report.
2014-07-04 14:15:00 -04:00
Simon Charette
35c2c37041
Fixed #22943 -- Correctly serialize compiled regexes.
...
Thanks to antialiasis at gmail dot com for the patch.
2014-07-04 13:34:20 -04:00
Anubhav Joshi
9bc2d766a0
Fixed #21755 -- Added ForeignKey support to REQUIRED_FIELDS.
...
This allows specifying ForeignKeys in REQUIRED_FIELDS when using a
custom User model.
Thanks cjerdonek and bmispelon for suggestion and timgraham for review.
2014-07-03 07:42:52 -04:00
Anubhav Joshi
10e83d48a3
Fixed #22935 -- Changed ForeignKey.default_error_messages['invalid'] to refer to correct field.
...
Thanks Tim Graham for suggestion and review.
2014-07-02 13:01:36 -04:00
Colin Wood
27ee608b55
Fixed #22940 -- Added missing string iterpolation parameters in migrations.writer error.
...
Forwardport of f5740af868
from stable/1.7.x
2014-07-02 12:45:02 -04:00
Anssi Kääriäinen
0b6f05ede6
Fixed #19501 -- added Model.from_db() method
...
The Model.from_db() is intended to be used in cases where customization
of model loading is needed. Reasons can be performance, or adding custom
behavior to the model (for example "dirty field tracking" to issue
automatic update_fields when saving models).
A big thank you to Tim Graham for the review!
2014-07-01 16:31:01 +03:00
Anubhav Joshi
34ba86706f
Fixed #14334 -- Query relation lookups now check object types.
...
Thanks rpbarlow for the suggestion; and loic, akaariai, and jorgecarleitao
for reviews.
2014-07-01 06:12:58 -04:00
Anubhav Joshi
fd5897193f
Fixed problem with refs #10811 .
...
When 'to_field' is specified with a FK, then we need to check the pk value
the object.
2014-06-30 10:25:57 -04:00
Tim Graham
70576740b0
Fixed #22917 -- Fixed typo in AlterIndexTogether.describe().
2014-06-27 10:34:48 -04:00
Tim Graham
e0cd07ec2f
Fixed #22903 -- Fixed migration generation if index_together or unique_together is removed from a model.
2014-06-25 10:02:12 -04:00
Lovas Bence
9385aa3198
Fixed #22050 -- Fixed defer fields on proxy related models.
2014-06-25 07:20:18 -04:00
Andrew Godwin
fe262c0b84
Fixed #22708 : Typo in autodetector base dependency gen
2014-06-23 20:48:33 -07:00
Andrew Godwin
0b571753a8
Fixed #22889 : Unneeded to_field in fk.deconstruct causing swap issues
2014-06-23 20:39:17 -07:00
Andrew Godwin
0fba4c0ed7
Fixed #22487 : Don't flush out data from before normal TestCases
2014-06-23 20:25:09 -07:00
Anubhav Joshi
1c50d6ae2b
Fixed problem introduced with #refs 13711.
2014-06-23 19:36:40 +03:00
Chris Beaven
21c496ea52
Fixed #22881 -- Better soft_applied migration detection
2014-06-23 13:36:22 +12:00
Andrew Godwin
8b878c7a64
Include swapped apps in autodetector state
2014-06-22 13:00:49 -07:00
Andrew Godwin
b30d32ff24
Fixed #22875 : Optimizer did not take through= into account.
2014-06-22 11:23:45 -07:00
Vlastimil Zíma
78c32f1caa
Fixed #22514 -- Prevented indexes on virtual fields [postgres].
2014-06-20 11:59:02 -04:00
Renaud Parent
87d0a3384c
Fixed #22778 -- Added a model Meta option to define default_related_name.
...
Thanks jorgecarleitao and mmardini for reviews.
2014-06-18 13:53:07 -04:00
Andrew Godwin
2cee1d4642
Fixed #22861 : Internal migrations done first so __first__ works
...
Thanks to Chris Beaven.
2014-06-17 23:28:35 -07:00
Andrew Godwin
09b63a7cce
Fix __latest__ to actually resolve to the latest migration
2014-06-17 22:12:31 -07:00
Andrew Godwin
8d2ac948a9
Fixed #22853 : Swapped models are now ignored for migration operations.
2014-06-17 17:45:38 -07:00
Anubhav Joshi
91f1b6dcdc
Fixed #13711 -- Model check added to ensure that auto-generated column name is within limits of the database.
...
Thanks russellm for report and Tim Graham for review.
2014-06-17 16:16:02 -04:00
Andrew Godwin
66a99fa210
Merge pull request #2824 from valberg/22577
...
Fixed #22577 : Python 3 broke on non-module migrations directory
2014-06-17 09:54:39 -07:00
Víðir Valberg Guðmundsson
3a6cb9f497
Fixed #22577 : Python 3 broke on non-module migrations directory
2014-06-17 18:21:38 +02:00
Tim Graham
95cc0e15b4
Fixed #22819 -- Renamed output_type -> output_field in query expression API.
...
Thanks jorgecarleitao for the suggestion.
2014-06-17 11:57:16 -04:00
Andrew Godwin
b22917bd50
Fixed #22851 : BinaryView wasn't getting a binary default
2014-06-16 18:44:08 -07:00
Tim Graham
82c935d44c
Renamed DatabaseFeature.supports_check_constraints to supports_column_check_constraints.
...
Thanks maxi for the suggestion.
2014-06-16 19:25:13 -04:00
Andrew Godwin
4169d4694a
Ignore more blank throughs on swapped-out M2Ms
2014-06-16 15:09:27 -07:00
Andrew Godwin
fa9a26745f
Ignore through being None on some special cases of fields.
2014-06-16 14:58:35 -07:00
Tim Graham
a96dbda6d3
Fixed flake8 error.
2014-06-16 15:45:07 -04:00
Andrew Godwin
6e3ac5f474
Fixed #22847 : Optimizer wasn't expecting unresolved FKs
2014-06-16 10:28:31 -07:00
Andrew Godwin
067b9668fb
Fixed #22783 : Make sure swappable models come first in creation
2014-06-16 10:20:05 -07:00
Andrew Godwin
2b79be2bee
Fixed #22848 : Ignore no-migrations errors during makemigrations only
2014-06-16 09:58:35 -07:00
Andrew Godwin
f047dd2f3e
Use __first__ not __latest__ for unknown app dependencies
2014-06-16 09:54:43 -07:00
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