Claude Paroz
8d7a48027e
Fixed #23954 -- Added special text/varchar PostgreSQL indexes in migrations
...
Thanks adityagupta104 for the report and Tim Graham for the review.
2014-12-04 21:27:42 +01:00
Tim Graham
765fa36d57
Fixed #23920 -- Fixed MySQL crash when adding blank=True to TextField.
...
Thanks wkornewald for the report and Markus Holtermann for review.
2014-12-04 10:57:10 -05:00
Gavin Wahl
dee4d23f7e
Fixed #23950 -- Prevented calling deconstruct on classes in MigrationWriter.
2014-12-03 08:22:29 -05:00
Andriy Sokolovskiy
1739ae9edc
Fixed #23807 -- Ignored non-digits in psycopg2 version
2014-12-01 18:42:08 -05:00
Claude Paroz
e11c6fd218
Fixed #23909 -- Prevented crash when collecting SQL for RunSQL
...
Thanks James Rivett-Carnac for the report and Markus Holtermann
for the review.
2014-12-01 20:26:40 +01:00
Markus Holtermann
d2202ec2d4
Fixed #23880 -- Added missing index_together handling for SQLite
2014-12-01 11:30:33 +07:00
Shai Berger
88edce2abb
Restored the 'TEST_' prefix in the warning about deprecated test database settings
2014-12-01 02:12:19 +02:00
Anssi Kääriäinen
ab89414f40
Fixed #23853 -- Added Join class to replace JoinInfo
...
Also removed Query.join_map. This structure was used to speed up join
reuse calculation. Initial benchmarking shows that this isn't actually
needed. If there are use cases where the removal has real-world
performance implications, it should be relatively straightforward to
reintroduce it as map {alias: [Join-like objects]}.
2014-11-28 07:30:26 -05:00
Anssi Kääriäinen
c7175fcdfe
Fixed #901 -- Added Model.refresh_from_db() method
...
Thanks to github aliases dbrgn, carljm, slurms, dfunckt, and timgraham
for reviews.
2014-11-28 06:54:00 -05:00
Markus Holtermann
912ad03226
Fixed #23894 -- Made deconstruct methods favor kwargs over args
2014-11-28 06:05:56 -05:00
Thomas Chaumeny
6b5d82749c
Fixed #16731 -- Made pattern lookups work properly with F() expressions
2014-11-28 12:50:42 +02:00
Diego Guimarães
f39b0421b4
Fixed #23338 -- Added warning when unique=True on ForeigKey
...
Thanks Jonathan Lindén for the initial patch, and Tim Graham
and Gabe Jackson for the suggestions.
2014-11-27 19:42:30 -05:00
Anssi Kääriäinen
bd337184f1
Fixed #23877 -- aggregation's subquery missed target col
...
Aggregation over subquery produced syntactically incorrect queries in
some cases as Django didn't ensure that source expressions of the
aggregation were present in the subquery.
2014-11-27 06:50:08 -05:00
Anssi Kääriäinen
c7fd9b242d
Fixed #23875 -- cleaned up query.get_count()
2014-11-27 06:26:53 -05:00
MattBlack85
e9d1f1182a
Fixed #23801 -- Added warning when max_length is used with IntegerField
2014-11-26 18:41:54 -05:00
Anssi Kääriäinen
cbb5cdd155
Fixed #23867 -- removed DateQuerySet hacks
...
The .dates() queries were implemented by using custom Query, QuerySet,
and Compiler classes. Instead implement them by using expressions and
database converters APIs.
2014-11-26 17:49:25 -05:00
Simon Charette
9cebb95348
Adjusted a comment to reflect some app refactor changes.
2014-11-26 09:47:37 -05:00
Luke Plant
ff3d746e8d
Fixed bug in circular dependency algo for migration dependencies.
...
Previous algo only worked if the first item was a part of the loop,
and you would get an infinite loop otherwise (see test).
To fix this, it was much easier to do a pre-pass.
A bonus is that you now get an error message that actually helps you debug
the dependency problem.
2014-11-25 15:37:34 +00:00
Carl Meyer
bcb693ebd4
Revert "Fixed #23892 -- Made deconstructible classes forwards compatible"
...
This reverts commit f36151ed16
.
Adding kwargs to deconstructed objects does not achieve useful
forward-compatibility in general, since additional arguments are silently
dropped rather than having their intended effect. In fact, it can make the
failure more difficult to diagnose. Thanks Shai Berger for discussion.
2014-11-22 22:29:23 -07:00
Carl Meyer
f36151ed16
Fixed #23892 -- Made deconstructible classes forwards compatible
2014-11-22 14:30:14 -07:00
Collin Anderson
d4ea4eea79
Fixed #23889 -- Added more usage of quote_name_unless_alias() to avoid deprecation warnings.
2014-11-21 16:44:50 -05:00
Simon Charette
c7087bc777
Fixed #23862 -- Made ManyToManyRel.get_related_field() respect to_field.
2014-11-21 16:02:31 -05:00
Andrzej Pragacz
72729f844e
Fixed #23794 -- Fixed migrations crash when removing a field that's part of index/unique_together.
2014-11-21 10:55:19 -05:00
Brad Walker
cfa26f29bd
Reduced reduce() usage; refs #23796 .
...
django.core.exceptions.ValidationError.messages() and
django.db.backends.schema.BaseDatabaseSchemaEditor._alter_field():
Replaced reduce(operator.add, ...) w/uncoupled, explicit sum()
2014-11-20 14:31:14 -05:00
Anssi Kääriäinen
5c481db295
Fixed #23605 -- Fixed nested subquery regression
...
Added relabeled_clone() method to sql.Query to fix the problem. It
manifested itself in rare cases where at least double nested subquery's
filter condition might target non-existing alias.
Thanks to Trac alias ris for reporting the problem.
2014-11-20 13:38:08 -05:00
Patryk Zawadzki
21e21c7bc2
Fixed #23844 -- Used topological sort for migration operation dependency resolution.
...
This removes the concept of equality between operations to guarantee
compatilibity with Python 3.
Python 3 requires equality to result in identical object hashes. It's
impossible to implement a unique hash that preserves equality as
operations such as field creation depend on being able to accept
arbitrary dicts that cannot be hashed reliably.
Thanks Klaas van Schelven for the original patch in
13d613f800
.
2014-11-20 12:49:49 -05:00
Claude Paroz
1a63093e22
Added AutoField introspection for PostgreSQL
...
Refs #23748 .
2014-11-20 16:13:58 +01:00
Claude Paroz
11662022be
Added AutoField introspection for MySQL
...
Refs #23748 .
2014-11-20 16:13:58 +01:00
Carl Meyer
d6e2bbe734
Fixed #23876 -- Removed dead code in SQLAggregateCompiler.
2014-11-20 04:18:08 -07:00
Carl Meyer
ab2819aa7b
Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards.
2014-11-19 16:11:44 -07:00
Carl Meyer
e7b9a58b08
Fixed #21794 -- Removed deprecation warning for abstract models outside an app.
2014-11-19 15:56:04 -07:00
Tim Graham
5bcd292098
Fixed #23871 -- Removed promotion of MySQL warnings to errors in DEBUG mode.
2014-11-19 16:07:49 -05:00
Stratos Moros
cf7a2a000e
Fixed #22248 -- Made RenameModel reversible
2014-11-19 14:11:35 +02:00
Carl Meyer
08fbbaa45b
Deprecated calling a SQLCompiler instance.
2014-11-18 19:47:16 -07:00
Markus Holtermann
7b4a994599
Fixed #23859 -- Fixed a migration crash when a field is renamed that is part of an index_together
2014-11-17 19:15:07 +01:00
twidi
19ae13d9ed
Avoided unneeded calls to state.render() in migrations.
2014-11-17 18:44:09 +01:00
twidi
82aca216e1
Reordered condition to avoid calling allow_migrate() if unneeded.
2014-11-17 18:32:42 +01:00
Anssi Kääriäinen
4252a14c39
Moved bilateral transform fetching to models.lookups
2014-11-17 18:04:08 +01:00
Karen Tracey
dec93d8991
Fixed #21612 -- Made QuerySet.update() respect to_field
2014-11-16 15:44:13 +01:00
Josh Smeaton
f61256da3a
Renamed qn to compiler
2014-11-16 13:19:34 +01:00
Carl Meyer
1ed9b9e2e2
Merge pull request #3536 from Zweedeend/ticket_23837
...
Fixes #23837 : Replace list with deque in migration-planner for improved performance.
2014-11-15 18:56:52 +01:00
Andrew Godwin
c5def493d0
Fixed #23835 : Changed circular dependency in DFS to be less infinite
2014-11-15 17:39:02 +01:00
Niels Kouwenhoven
fefb77934e
Fixes #23837 : Replace list.pop(0) by deque.popleft() in dfs function in migrations
2014-11-15 16:34:20 +01:00
Tim Graham
83d104d61a
Revert "Use topological sort for migration operation dependency resolution"
...
This commit broke the tests on Python 3.
This reverts commit 13d613f800
.
2014-11-15 15:28:04 +01:00
Josh Smeaton
f59fd15c49
Fixed #14030 -- Allowed annotations to accept all expressions
2014-11-15 14:00:43 +00:00
Klaas van Schelven
13d613f800
Use topological sort for migration operation dependency resolution
...
rather than an ad-hoc algorithm
2014-11-15 14:45:42 +01:00
Tim Graham
aa77e90aa9
Remove Field.get_validator_unique_lookup_type()
...
Usage of this method was removed pre 1.0 (c2ba59fc
).
2014-11-12 20:11:40 +01:00
Anssi Kääriäinen
4e9a6c94e6
Removed extra enumerate() from Query.setup_joins()
2014-11-12 13:22:08 +02:00
Jozef Knaperek
c56c42b5c0
Fixed #22967 -- Made Model._do_update consistent
...
Made _do_update behave more strictly according to its docs,
including a corner case when specific concurent updates are
executed and select_on_save is set.
2014-11-12 12:53:30 +02:00
Anssi Kääriäinen
d647764a53
Improved Query.names_to_path docstring
2014-11-12 12:40:55 +02:00