Tim Graham
47fcbe506c
Fixed flake8 warnings on Python 3.
2015-06-15 11:27:09 -04:00
Brian King
bfb5b7150f
Fixed #24912 -- Fixed prefetch_related failure for UUIDField primary keys
...
This resolves a problem on databases besides PostgreSQL when using
prefetch_related with a source model that uses a UUID primary key.
2015-06-15 09:37:38 -04:00
Markus Holtermann
432623603c
Changed reduce method lookup in migration optimizer to dict
...
Thanks Andrew Godwin and Simon Charette for the review.
2015-06-14 20:44:22 +02:00
Markus Holtermann
4a7d374fd5
Explicitly imported migration operations in optimizer
...
Thanks Andrew Godwin for the review.
2015-06-14 20:34:54 +02:00
Markus Holtermann
128caa1e16
Optimized duplicate AlterModelTable/AlterFooTogether/AlterOWRT
...
Thanks Andrew Godwin for the review.
2015-06-14 20:34:48 +02:00
Markus Holtermann
5bc412c35a
Took AlterOrderWithRespectTo into account when optimizing migrations
...
Thanks Andrew Godwin for the review.
2015-06-14 20:34:34 +02:00
Cole Maclean
20ff296cb1
Fixed #24859 -- Made QuerySet.get() with UUIDField raise TypeError on bad value.
...
For consistency with AutoField.
2015-06-06 19:46:05 -04:00
Sagar Mittal
e5033dcbba
Imported sqlite3 instead of _sqlite3
...
adapt and ProgrammingError are both available on the
sqlite3 module. There's no need to import the internal
_sqlite3 module.
2015-06-06 11:35:02 -04:00
Andriy Sokolovskiy
08232ef84d
Fixed #24744 - Fixed relabeled_clone for the Transform
2015-06-06 09:04:53 -04:00
Mark Lavin
541f4ea546
Fixed #24924 -- Join promotion for multiple Case expressions
2015-06-05 12:22:43 -04:00
Tim Graham
6b41834855
Minor edits to Greatest/Least docs; refs #24767 .
2015-06-05 11:40:10 -04:00
Andriy Sokolovskiy
286d0e6ab1
Refs #24833 -- Forwardported some of "Fixed Case expressions with exclude()."
...
Partial forwardport of 469f1e362b
from stable/1.8.x
as the issue was already fixed in master.
2015-06-05 11:21:31 -04:00
Ian Foote
4ab53a558a
Fixed #24767 -- Added Greatest and Least expressions
...
Greatest and Least are row-level Function versions of Min and Max.
2015-06-05 11:15:33 +01:00
Shai Berger
35291df7f7
Fixed #19542 : Made mirroring databases for tests work with Oracle
...
No tests are provided because there is no sane way to test database
settings within the Django test suite.
Thanks Aymeric Augustin for review.
2015-06-05 12:29:15 +03:00
Steadman
ed63df3fc2
Fixed #24899 -- Split migrations autodetector._detect_changes() method
2015-06-04 22:35:33 -04:00
Matthew Somerville
2dc93bb10a
Fixed #22316 -- Added time filters to TimeField on SQLite.
...
This was implemented for non-SQLite backends in 1.7 (as a
side effect of #16187 ).
2015-06-04 22:27:13 -04:00
Rolo
19e67c6cd1
Fixed #24677 -- Made TextField.to_python() return a string.
...
This is consistent with CharField.
2015-06-04 09:02:54 -04:00
Carl Meyer
57dbc87ade
Cleaned up docstring style, per Tim Graham review.
2015-06-03 19:20:12 -06:00
Carl Meyer
5c085ea7b3
Refs #24628 -- Added a second test and a docstring comment to avoid regression.
2015-06-03 13:46:01 -06:00
Carl Meyer
492537ac18
Fixed #24628 -- Fixed applied status for squashed migrations.
2015-06-02 16:15:13 -06:00
Adam Chainz
23048d186c
Fixed #24866 -- Added Now() database function
2015-06-02 17:59:01 -04:00
Carl Meyer
84522c0d16
Fixed #24895 -- Fixed loading a pair of squashed migrations with a dependency.
2015-06-02 12:07:54 -06:00
Andriy Sokolovskiy
2913d6b77d
Fixed #24831 -- Fixed pickling queryset with prefetch_related() after deleting objects.
2015-06-02 09:54:53 -04:00
Tim Graham
e1e6399c2c
Fixed #24893 -- Fixed lack of unique constraint when changing a field from primary_key=True to unique=True
2015-06-02 09:25:47 -04:00
Tim Graham
5ab8680983
Fixed #24892 -- Fixed quoting of SQL when renaming a field to AutoField in PostgreSQL
2015-06-02 09:13:55 -04:00
Jon Dufresne
44f3ee7716
Fixed #9596 -- Added date transform for DateTimeField.
2015-06-02 08:49:10 -04:00
Yoong Kang Lim
076a63e672
Fixed #24883 -- Added MigrationGraph.__repr__()
2015-06-01 10:45:52 -04:00
Josh Smeaton
c7805ee214
Fixed #24699 -- Added aggregate support for DurationField on Oracle
2015-05-30 20:41:33 -04:00
Adam Chainz
e60cce4e40
Fixed #24846 -- Added support to MySQL SchemaEditor for all blob/text data types
2015-05-30 20:37:57 -04:00
Andriy Sokolovskiy
80ad5472ce
Fixed #24817 -- Prevented loss of null info in MySQL field renaming.
2015-05-28 10:07:52 -04:00
Matt Westcott
ff8a02ae0b
Fixed #24340 -- Added nested deconstruction for list, tuple and dict values
...
Nested deconstruction should recursively deconstruct items within list,
tuple and dict values.
2015-05-26 17:10:02 +02:00
Paweł Marczewski
801a84ae32
Fixed #24835 -- Fixed QuerySet.exists() after an annotation with Count()
...
QuerySet.exists() incorrectly handled query.group_by = True
case (grouping by all select fields), causing GROUP BY
expressions to be wiped along with select fields.
2015-05-25 20:46:20 -04:00
Marten Kenbeek
d73176a842
Fixed #24848 -- Fixed ValueError for faulty migrations module.
...
Added apps to unmigrated apps if the migrations module is a file
or a folder missing __init__.py.
Thanks to Ernest0x for the bug report.
2015-05-25 13:47:50 -04:00
Florian Apolloner
92f37e5f5f
Well, what should I say: UPS.
2015-05-24 17:33:44 +02:00
Andrea Grandi
43b2d88a5b
Fixed #24844 -- Corrected has_changed implementation for HStoreField.
2015-05-24 17:32:16 +02:00
Alexander Sosnovskiy
04e8d890ae
Fixed #16891 -- Made Model/QuerySet.delete() return the number of deleted objects.
2015-05-22 13:27:16 -04:00
Anssi Kääriäinen
bc87061a3c
Fixed #24705 -- Fixed negated Q objects in expressions.
...
Avoided split_exclude() for Q when used as an expression.
2015-05-20 09:41:04 -04:00
Alasdair Nicol
d091b75eef
Fixed #24818 -- Prevented models.CharField from accepting a string as max_length
2015-05-19 08:06:39 -04:00
Aymeric Augustin
da2c6959c8
Dropped the needs_datetime_string_cast feature.
...
It has been superseded by the converter infrastructure.
2015-05-17 10:23:13 +02:00
Aymeric Augustin
ed83881e64
Fixed #23820 -- Supported per-database time zone.
...
The primary use case is to interact with a third-party database (not
primarily managed by Django) that doesn't support time zones and where
datetimes are stored in local time when USE_TZ is True.
Configuring a PostgreSQL database with the TIME_ZONE option while USE_TZ
is False used to result in silent data corruption. Now this is an error.
2015-05-17 09:40:28 +02:00
Aymeric Augustin
54026f1e8d
Renamed value_to_db_xxx to adapt_xxxfield_value.
...
This mirrors convert_xxxfield_value nicely, taking advantage of the
adapter/converter terminology which is commonly used by DB-API modules.
2015-05-17 09:39:34 +02:00
Aymeric Augustin
d9521f66b1
Removed global timezone-aware datetime adapters.
...
Refs #23820 .
Fixed #19738 .
Refs #17755 . In order not to introduce a regression for raw queries,
parameters are passed through the connection.ops.value_to_db_* methods,
depending on their type.
2015-05-17 09:38:48 +02:00
Aymeric Augustin
fe6b5e62b1
Normalized the implementation of get_db_converters.
...
Put the types in the same order and checked for None consistently.
2015-05-17 09:36:27 +02:00
Aymeric Augustin
ec186572e6
Removed global timezone-aware datetime converters.
...
Refs #23820 .
2015-05-17 09:36:23 +02:00
Tim Graham
eda12ceef1
Removed redundant list() calls.
2015-05-16 10:44:07 -04:00
Claude Paroz
3226050358
Fixed #24791 -- Added fallback when 'postgres' database isn't available
...
Thanks Carl Meyer and Tim Graham for the reviews.
2015-05-15 18:44:20 +02:00
Claude Paroz
ae635cc365
Fixed #24757 -- Recreated MySQL index when needed during combined index removal
...
Thanks Thomas Recouvreux for the report and Tim Graham for the tests and
review.
2015-05-15 17:07:14 +02:00
Piotr Jakimiak
4157c502a5
Removed unnecessary arguments in .get method calls
2015-05-13 20:51:18 +02:00
Claude Paroz
f61c4f490d
Fixed #24742 -- Made runserver.check_migrations ignore read-only databases
...
Thanks Luis Del Giudice for the report, and Aymeric Augustin and Markus
Holtermann for the reviews.
2015-05-13 18:30:36 +02:00
Abhaya Agarwal
9de9c24017
Fixed #24105 -- Called Storage.get_valid_name() when upload_to is callable
2015-05-12 20:08:22 -04:00