Claude Paroz
1aa3e09c20
Fixed #23745 -- Reused states as much as possible in migrations
...
Thanks Tim Graham and Markus Holtermann for the reviews.
2015-01-02 15:37:10 +01:00
Claude Paroz
2a9c4b4901
Passed around the state between migrations
...
Refs #23745 .
2015-01-02 15:37:10 +01:00
Markus Holtermann
057305e588
Added ignore_swappable to StateApps
...
Refs #23745 .
2015-01-02 15:37:09 +01:00
Claude Paroz
a159b1facd
Replaced migration state render() by apps cached property
...
Refs #23745 .
2015-01-02 15:19:36 +01:00
Tim Graham
40a8504357
Fixed #23891 -- Moved deprecation of IPAddressField to system check framework.
...
Thanks Markus Holtermann for review.
2015-01-01 13:30:52 -05:00
Piotr Pawlaczek
41fc1c0b5e
Fixed #23758 -- Allowed more than 5 levels of subqueries
...
Refactored bump_prefix() to avoid infinite loop and allow more than
than 5 subquires by extending the alphabet to use multi-letters.
2014-12-31 08:48:28 -05:00
Tim Graham
478d6a9503
Copied BaseDatabaseCreation._digest() to SchemaEditor to remove dependency.
...
refs #22340 .
2014-12-31 08:33:34 -05:00
Tim Graham
93d73dac91
Moved DatabaseCreation.data_types properties to DatabaseWrapper.
...
refs #22340 .
2014-12-31 08:29:17 -05:00
Russell Keith-Magee
013c2d8d02
Renamed variables to avoid name collision with import of django.db.models.
2014-12-31 13:21:32 +08:00
Tim Graham
8082c75d18
Removed db.backends methods which only call super().
2014-12-30 11:53:59 -05:00
Andriy Sokolovskiy
8c99b7920e
Fixed #12118 -- Added shared cache support to SQLite in-memory testing.
2014-12-30 10:14:33 -05:00
Tim Graham
ab4f709da4
Fixed #23581 -- Prevented extraneous DROP DEFAULT statements.
...
Thanks john_scott for the report and Markus Holtermann for review.
2014-12-30 07:54:05 -05:00
Markus Holtermann
623ccdd598
Fixed #23938 -- Added migration support for m2m to concrete fields and vice versa
...
Thanks to Michael D. Hoyle for the report and Tim Graham for the review.
2014-12-29 13:41:12 -05:00
Claude Paroz
3c5d1edb39
Fixed #22279 -- Prevented dummy backend going through DatabaseErrorWrapper
...
Thanks Daniel Hahler for the report and Tim Graham for the review.
2014-12-29 19:06:28 +01:00
Claude Paroz
1d24f073e6
Fixed #21255 -- Closed connections after management command ran
...
Thanks kabakov.as@gmail.com for the report, and Aymeric Augustin,
Simon Charette for the reviews.
2014-12-29 19:02:45 +01:00
Josh Smeaton
1cdfbde4db
Fixed #23753 -- Oracle failure with Coalesce
2014-12-29 19:44:13 +11:00
Claude Paroz
2ceb10f3b0
Fixed #14180 -- Prevented unneeded index creation on MySQL-InnoDB
...
Thanks zimnyx for the report and Simon Charette, Tim Graham for
the reviews.
2014-12-27 12:52:44 +01:00
Josh Smeaton
4718296546
Fixed #23753 -- Added a suite of SQL Functions
...
Added functions and tests
Added docs and more tests
Added TextField converter to mysql backend
Aliased Value as V in example docs and tests
Removed unicode_compatible in example
Fixed console emulation in examples
2014-12-27 15:27:27 +11:00
Claude Paroz
234a2e0b6b
Fixed #23866 -- Harmonized refs to Django documentation from code
2014-12-25 13:53:13 +01:00
Niclas Olofsson
3daa9d60be
Fixed #10414 -- Made select_related() fail on invalid field names.
2014-12-24 14:54:30 -05:00
Tim Graham
061caa5b38
Fixed #24037 -- Prevented data loss possibility when changing Meta.managed.
...
The migrations autodetector now issues AlterModelOptions operations for
Meta.managed changes instead of DeleteModel + CreateModel.
Thanks iambibhas for the report and Simon and Markus for review.
2014-12-23 14:25:31 -05:00
Tim Graham
69ee7c8d76
Removed models.Field.bind() -- unused/undocumented since at least 1.0.
2014-12-23 14:23:58 -05:00
Claude Paroz
30cbd5d360
Replaced DatabaseCreation sql methods by schema editor equivalents
...
Also used schema editor in migrate to sync unmigrated apps (sync_apps).
Refs #22340 . Thanks Tim Graham for the review.
2014-12-23 19:35:01 +01:00
Anssi Kääriäinen
f233bf47dd
Fixed #21414 -- Removed RelatedObject and deprecated Field.related.
2014-12-23 10:54:25 -05:00
Anssi Kääriäinen
227a4c48be
Refs #2443 -- fixed format_dtdelta on SQLite
...
A test failed on Python 2 32-bit.
2014-12-23 07:05:44 -05:00
Marc Tamlyn
962bb9b6bd
Refs #2443 -- Move the durationfield converter logic.
...
This reduces how frequently this logic is run significantly.
Thanks to Anssi for the suggestion.
2014-12-23 10:41:42 +00:00
Marc Tamlyn
5ca82e710e
Fixed #24033 -- Use interval type on Oracle.
...
Use INTERVAL DAY(9) TO SECOND(6) for Durationfield on Oracle rather than
storing as a NUMBER(19) of microseconds.
There are issues with cx_Oracle which require some extra data
manipulation in the database backend when constructing queries, but it
handles the conversion back to timedelta objects cleanly.
Thanks to Shai for the review.
2014-12-23 10:38:32 +00:00
Oscar Ramirez
54085b0f9b
Fixed #23998 -- Added datetime.time support to migrations questioner.
2014-12-22 07:24:54 -05:00
Josh Schneier
9a23470072
Fixed #24017 -- Added python_2_unicode_compatible in db/migrations
2014-12-21 16:10:43 -05:00
Marc Tamlyn
07728a2c2c
Refs #2443 -- Fix Oracle tests for DurationField.
...
It helps if there are the correct number of microseconds in a second.
2014-12-20 22:04:07 +00:00
Marc Tamlyn
57554442fe
Fixed #2443 -- Added DurationField.
...
A field for storing periods of time - modeled in Python by timedelta. It
is stored in the native interval data type on PostgreSQL and as a bigint
of microseconds on other backends.
Also includes significant changes to the internals of time related maths
in expressions, including the removal of DateModifierNode.
Thanks to Tim and Josh in particular for reviews.
2014-12-20 18:28:29 +00:00
Anssi Kääriäinen
4a2a433e7d
Refs #24020 -- return expressions from get_group_by_cols()
2014-12-18 06:01:07 -07:00
Claude Paroz
108b8bf852
Fixed #24007 -- Ensure apps registry's ready before unpickling models
...
This prevents AppRegistryNotReady errors when unpickling Django
models from an external script.
2014-12-17 18:33:32 +01:00
Andriy Sokolovskiy
3dbbb8a89c
Fixed #23983 -- Fixed a crash in migrations when adding order_with_respect_to to non-empty table.
2014-12-16 10:48:49 -05:00
Andriy Sokolovskiy
d8f3b86a76
Fixed #23405 -- Fixed makemigrations prompt when adding Text/CharField.
...
A default is no longer required.
2014-12-15 14:41:52 -05:00
Andriy Sokolovskiy
089047331d
Fixed #23987 -- Made SQLite SchemaEditor always use effective_default().
2014-12-15 13:40:24 -05:00
Markus Holtermann
aa5ef0d4fc
Fixed #23822 -- Added support for serializing model managers in migration
...
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
2014-12-15 08:34:15 -05:00
Markus Holtermann
e37ab311fc
Changed internal storing of abstract and concrete managers to be in a single list.
...
This commit prepares the internal manager layout to be serialized by
migrations; refs #23822 .
2014-12-15 08:32:47 -05:00
Shai Berger
7c1f3901bc
Fixed #23991 -- Apparently, Oracle doesn't need the decimal field converter
...
Thanks Josh Smeaton for review.
2014-12-15 00:07:10 +02:00
Michael Hall
895dc880eb
Fixed #23812 -- Changed django.utils.six.moves.xrange imports to range
2014-12-13 12:45:58 -05:00
Carl Meyer
c72eb80d11
Fixed #23455 -- Accept either bytes or text for related_name, convert to text.
2014-12-12 12:50:39 -07:00
Carl Meyer
8aaf51f94c
Revert "Fixed #23455 -- Forced related_name to be a unicode string during deconstruction."
...
This reverts commit 45bd7b3bd9
.
2014-12-12 12:50:39 -07:00
Claude Paroz
df30ae07fc
Fixed postgis test database initialization
...
Refs #20968 . Allow querying template_postgis presence without
existing test database.
Thanks Tim Graham for the review.
2014-12-12 20:08:07 +01:00
Josh Smeaton
267a1dcd9b
Fixed #23941 -- Removed implicit decimal formatting from expressions.
2014-12-12 10:17:48 -05:00
Markus Holtermann
44927ba817
Fixed #23956 -- Fixed migration creation for multiple table inheritance
2014-12-11 13:28:21 -05:00
Marc Tamlyn
6b2d3f9206
Remove text-mangling of default values.
2014-12-09 09:10:51 +00:00
Claude Paroz
8f97413fae
Fixed #20968 -- Checked Spatialite metadata before migrations
...
Thanks Kenial S. Lee for the initial patch and Tim Graham for
the review.
2014-12-08 22:22:53 +01:00
Jon Dufresne
4468c08d70
Fixed #23968 -- Replaced list comprehension with generators and dict comprehension
2014-12-08 07:58:23 -05:00
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