Tim Graham
74e7f91e6d
Fixed #23538 -- Added SchemaEditor for MySQL GIS.
...
Thanks Claude Paroz for suggestions and review.
2014-09-25 13:53:44 -04:00
Markus Holtermann
215aa4f53b
Fixed #23415 -- Added fields for unmanaged and proxy model migrations.
...
Thanks sky-chen for the report.
2014-09-25 10:25:03 -04:00
Tim Graham
d7ab2cefb7
Revert "Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations."
...
This reverts commit abcf28a076
.
2014-09-24 15:49:30 -04:00
Markus Holtermann
b9a670b227
Fixed #23426 -- Don't require double percent sign in RunSQL without parameters
2014-09-24 07:20:57 -04:00
Tim Graham
0aca91cf7f
Fixed flake8 warnings.
2014-09-24 06:32:42 -04:00
Shai Berger
d128eac316
Changed Oracle test-user creation to grant privileges instead of roles
...
because the roles (specifically RESOURCE) are deprecated.
Also added optional support for creating views in tests, and made an
introspection test fail (rather than skip) if a view cannot be created
due to lacking privileges.
Refs #18782
Thanks Tim Graham for review, and Josh Smeaton
2014-09-24 04:58:33 +03:00
Loic Bistuer
e043aae9bb
Fixed #23550 -- Normalized get_queryset() of RelatedObjectDescriptor
...
and ReverseSingleRelatedObjectDescriptor so they actually return QuerySet
instances.
Also ensured that SingleRelatedObjectDescriptor.get_queryset() accounts
for use_for_related_fields=True.
This cleanup lays the groundwork for #23533 .
Thanks Anssi Kääriäinen for the review.
2014-09-24 02:03:12 +07:00
Claude Paroz
2a1bdf5ced
Called table_names instead of get_table_list in migrations
2014-09-23 20:13:31 +02:00
Claude Paroz
ed297061a6
Fixed #18782 -- Prevented sql_flush to flush views
...
Thanks rodolfo_3 for the report and the initial patch, and
Josh Smeaton, Shai Berger and Tim Graham for the reviews.
2014-09-23 20:13:31 +02:00
Claude Paroz
b8cdc7dcc3
Made get_table_list return a TableInfo named tuple
2014-09-23 20:13:31 +02:00
Sergey Fedoseev
463952d940
Fixed #23503 -- Fixed renaming of model with self-referential m2m field.
2014-09-23 10:03:37 -04:00
Sergey Fedoseev
83cd18633f
Fixed #23065 -- Quoted constraint names in SQL generated by migrations.
2014-09-23 09:25:31 -04:00
Sergey Fedoseev
0bea6c8749
Factored create_fk_sql, create_unique_sql, and delete_constraint_sql.
2014-09-23 09:24:32 -04:00
Thomas Chaumeny
e008a10c2f
Fixed #23443 -- Corrected erroneous FieldError message.
...
Thanks Tim Graham for the review.
2014-09-19 01:01:31 +07:00
Josh Smeaton
0eb5cde9da
Fixed #21775 -- Allowed customization of datafile for Oracle tablespace
2014-09-17 09:55:33 -04:00
Baptiste Mispelon
d63ac5b595
Fixed #23492 -- Restored F.__deepcopy__.
...
This reverts commit 3a66035107
.
A regression test was also added.
2014-09-16 12:19:00 +02:00
Marc Tamlyn
ed7821231b
Fixed #19463 -- Added UUIDField
...
Uses native support in postgres, and char(32) on other backends.
2014-09-16 10:08:09 +01:00
valtron
abcf28a076
Fixed #23474 -- Prevented migrating backwards from unapplying the wrong migrations.
2014-09-15 14:56:59 -04:00
Claude Paroz
6072f17d09
Factorized create_index_sql expression
2014-09-13 21:34:37 +02:00
Carl Meyer
afa119918c
Fixed #23484 -- Add comment in AppConfigStub clarifying app name vs app label.
2014-09-12 15:45:08 -06:00
Szilveszter Farkas
5e32605ce9
Fixed #23483 -- Prevented ImproperlyConfigured with dotted app names
...
Made sure the app labels stay unique for the AppConfigStubs, so
migrations wouldn't fail if two dotted app names has the same last part
(e.g. django.contrib.auth and vendor.auth)
2014-09-12 14:58:54 -06:00
Markus Bertheau
61f56e239f
Corrected grammar in migrations error message.
2014-09-10 10:32:33 -04:00
Markus Holtermann
6d5958c7a3
Fixed #23452 -- Prevented infinite migrations for empty unique/index_together.
...
Thanks fwkroon for the report.
2014-09-10 07:54:16 -04:00
Tim Graham
c32bc1a7a7
Fixed #11775 -- Made ABSOLUTE_URL_OVERRIDES work with models that don't define get_absolute_url().
...
Thanks jukvalim for the report and initial patch,
and Preston Timmons for review.
2014-09-09 11:05:31 -04:00
Markus Holtermann
d4467ede77
Updated links to point to dev documentation.
2014-09-08 15:32:32 -04:00
Josh Smeaton
638d1393ee
Fixed #23434 -- Coerce Oracle bool params to int
2014-09-08 10:11:20 -04:00
Andrew Pinkham
4680d25df2
Fixed #22951 -- Checked for types during deep_deconstruct migration serialization process.
...
Thanks Sam Hartsfield for the report.
2014-09-08 07:39:09 -04:00
Marc Tamlyn
14c8456ffe
Fixed #23416 -- Make sure DatabaseCreation respects checks.
...
Migrations respected Field.db_parameters()['check'], but
DatabaseCreation was still using just Field.db_type().
2014-09-06 19:01:06 +01:00
Ben Reilly
b878c73fc3
switch out recursive dfs for stack based approach, to avoid possibly hitting the recursion limit
2014-09-05 15:26:05 -07:00
Claude Paroz
885ff6845e
Revert "Fixed #23384 -- Allowed overriding part of a dictionary-type setting"
...
This reverts commit 66757fee7e
.
Discussions have led to think that this functionality does not
bring significant benefits to justify the added complexity.
Read also discussions on ticket #22734 .
2014-09-05 20:06:02 +02:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -04:00
Marc Tamlyn
e9103402c0
Fixed #18757 , #14462 , #21565 -- Reworked database-python type conversions
...
Complete rework of translating data values from database
Deprecation of SubfieldBase, removal of resolve_columns and
convert_values in favour of a more general converter based approach and
public API Field.from_db_value(). Now works seamlessly with aggregation,
.values() and raw queries.
Thanks to akaariai in particular for extensive advice and inspiration,
also to shaib, manfre and timograham for their reviews.
2014-09-03 20:36:03 +01:00
Raffaele Salmaso
1435cfbe8d
Fixed #23302 -- Added --name/-n option to makemigrations command
2014-09-02 21:09:18 -04:00
Dave Hall
e03b7940e5
Fixed #22918 -- Fixed SeparateDatabaseAndState crash
2014-09-02 08:06:44 -04:00
Akis Kesoglou
6613ea6e3f
Fixed #23370 -- defer() + select_related() crashed with inherited models.
2014-08-30 07:14:44 -04:00
Claude Paroz
66757fee7e
Fixed #23384 -- Allowed overriding part of a dictionary-type setting
...
This change is needed for upcoming changes where settings might be
grouped in a parent dictionary.
Thanks Tim Graham for the review.
2014-08-30 12:37:10 +02:00
Andrew Torpedov
bc06d2c11c
Fixed #23313 -- Corrected repr(RawQuery) with dict parameters.
2014-08-29 07:22:08 -04:00
Thomas Chaumeny
191d953c99
Factorize some code using ContextDecorator.
2014-08-28 11:58:16 -04:00
Jon Dufresne
f0d3dd4f04
Fixed #23357 -- Added small int introspection support to MySQL backend.
...
In the MySQL backend, updated the can_introspect_small_integer feature
flag to True. In data_types_reverse, map FIELD_TYPE.SHORT to a
SmallIntegerField. Added test to verify introspecting SmallIntegerFields
and fixed existing tests influenced by this change.
2014-08-27 10:58:44 -04:00
Shai Berger
4c85a0d95f
Made main user disconnect after creating test user/tablespaces on Oracle
2014-08-25 20:20:10 +03:00
Raffaele Salmaso
abd640fbdf
Fixed #23341 -- Added migration name to nonexistent migration error in makemigrations.
2014-08-23 19:18:03 -04:00
Shai Berger
a6222af0ed
Added docstring forgotten in 56252e7
.
2014-08-22 05:37:36 +03:00
Shai Berger
56252e7f46
Fixed schema test for Oracle 11.2.0.1 which is used in Django Project's CI.
...
Refs #23073 Workaround.
Refs #22738 Repeats the mysql "offense". When the issue is solved, the
Oracle special case should be made to play with the solution (that is,
Oracle should be fixed the same way that mysql and the 3rd-party backneds
are).
2014-08-22 05:08:53 +03:00
Markus Holtermann
144cff3f51
Fixed #23322 -- Use resolved swappable model for dependency resolution during makemigrations
2014-08-20 16:04:21 -04:00
Andrew Godwin
9247da1032
Fixed #23315 : Operational dependency fail with mixed create/add
2014-08-19 19:51:12 -07:00
Lee Sanghyuck
11d9cbe2f4
Fixed #23316 -- Added datetime.time serialization in migrations.
2014-08-19 13:31:46 -04:00
Claude Paroz
6295ea0027
Replaced HAS_SPATIAL_DB by testing database feature
...
Refs #22632 . This should be the base for using more database
features to exclude specific backends in GIS tests.
Thanks Tim Graham for the review.
2014-08-19 17:57:01 +02:00
Andrew Godwin
4d2f9c38e8
Fixed #23288 : deconstruct() ignoring related_name
2014-08-14 19:47:22 -07:00
zsoldosp
01801edd37
Fixed #22646 : Added support for the MySQL ssl-ca option to dbshell.
2014-08-13 18:29:42 -04:00
Andrew Godwin
8f9862cd4d
Fixed #23275 : Unmanaged models kept by autodetector, ignored by ops
2014-08-12 12:49:20 -07:00
Anssi Kääriäinen
f7dba61881
Avoided creation of deferred model from another deferred model
...
Also never create deferred model when no attrs are deferred.
2014-08-12 14:58:10 +03:00
Josh Smeaton
5b0375ec3e
Fixed #23001 -- Fixed mixing defer and annotations
2014-08-12 14:58:10 +03:00
Anssi Kääriäinen
dfadbdac6a
Fixed #16426 -- deletion of 1000+ objects with relations on SQLite
...
SQLite doesn't work with more than 1000 parameters in a single query.
The deletion code could generate queries that try to get related
objects for more than 1000 objects thus breaking the limit. Django now
splits the related object fetching into batches with at most 1000
parameters.
The tests and patch include some work done by Trac alias NiGhTTraX in
ticket #21205 .
2014-08-11 12:47:37 +03:00
Anubhav Joshi
cdfdcf4b70
Fixed #23266 -- Prevented queries caused by type checking lookup values
...
Small modifications done by committer.
2014-08-11 09:51:57 +03:00
Rajiv Makhijani
f0b358880a
Fixed #23259 -- Corrected insertion order of extra() select_params
...
A regression caused queries to produce incorrect results for cases where
extra(select) is excluded by values() but included by extra(order_by)
The regression was caused by 2f35c6f10f
.
2014-08-11 09:33:18 +03:00
Florian Apolloner
61d783f3d7
Made sqlite's remove_field behave like the base backend.
2014-08-10 13:31:06 +02:00
Claude Paroz
dc462a8ed5
Removed unused migrate option
2014-08-09 17:13:00 +02:00
Andrew Godwin
27b6f28435
Fixed #23264 : Schema backends honour db_constraint
2014-08-09 17:50:00 +10:00
Andrew Godwin
51673c146e
Don't treat .pyc/pyo files as migrations. Refs #23237 among others.
2014-08-08 09:57:31 +10:00
Tim Graham
f9f9f3ad60
Fixed flake8 warning.
2014-08-07 10:11:15 -04:00
Andrew Godwin
157c42a976
Use smart_text rather than naive forcing-to-unicode for state reading
2014-08-07 22:34:07 +10:00
Andrew Godwin
5257b85ab8
Fixed #23226 : Model options appearing as bytes type in migrations
2014-08-07 12:13:37 +10:00
Andrew Godwin
8d93b21ec9
Moved index dropping after FK dropping to please MySQL and fix test
2014-08-07 11:59:11 +10:00
Andrew Godwin
dfe86449c9
Fixed #23244 : Error altering FK to non-FK in migrations
2014-08-07 11:52:31 +10:00
Alex Hill
938da36cb1
Fixed #21603 -- Fixed complex RawQuerySets queries on some versions of SQLite.
2014-08-06 08:41:34 -04:00
Tim Graham
fcd42a4819
Removed code that assumed BooleanField could be null.
...
Such a field will no longer pass model validation.
2014-08-05 07:49:53 -04:00
Shai Berger
746f2a4bed
Fixed #23061 : Avoided setting a limit on a query for get with select_for_update on Oracle
...
Thanks Michael Miller for reporting the issue.
2014-08-05 03:12:08 +03:00
Stanislas Guerra
98e8da3709
Fixed #16311 -- Added a RelatedOnlyFieldListFilter class in admin.filters.
2014-08-04 09:39:02 -04:00
Mihail Milushev
bf5382c6e5
Fixed #22234 -- Replaced OS-specific code with subprocess.call() in dbshell.
...
This fixes escaping of special characters on Windows.
2014-08-04 09:21:03 -04:00
Andrew Godwin
c06e124b5e
Fixed #23091 : CreateModel and AddField were clashing with deferred SQL
2014-08-04 11:59:29 +10:00
Simon Charette
cbb29af1aa
Fixed #23160 -- Correctly rename models with self referential fields.
...
Thanks to whitews AT gmail for the report.
2014-08-03 15:27:01 -04:00
Baptiste Mispelon
44169a00c1
Removed unnecessary code in ManyToManyField.deconstruct()
2014-08-03 15:15:24 +02:00
Baptiste Mispelon
7432533932
Added missing logic to TimeField.deconstruct().
...
If auto_now or auto_now_add was used then the serialized
field in the migration contained unnecessary `editable` and
`blank` arguments.
2014-08-03 14:02:21 +02:00
Baptiste Mispelon
72f1eb48df
Fixed #23156 -- Added missing BinaryField.deconstruct() method.
2014-08-03 13:02:31 +02:00
Tim Graham
d28396f526
Fixed #23144 -- Dropped support for MySQL 5.0, 5.1.
2014-08-02 10:28:40 -04:00
Tim Graham
8f9d6e83a0
Fixed #23145 -- Dropped support for Oracle < 11.1
2014-08-01 19:32:00 -04:00
Tim Graham
a9bdce7e55
Fixed #23108 -- Dropped support for PostgreSQL 8.4 & PostGIS 1.3, 1.4.
...
Thanks Claude Paroz for the review.
2014-08-01 10:26:00 -04:00
Mitar
1ed6fbcf44
Fixed #21940 -- Added kwargs to contribute_to_class() of model fields..
...
Thanks Kronuz for the suggestion.
2014-08-01 07:41:28 -04:00
Tim Graham
9a922dcad1
Fixed flake8 warnings.
2014-07-31 08:06:46 -04:00
areski
97a38de230
Fixed #23112 -- Field.get_choices tries to index an iterable
2014-07-30 21:35:02 +02:00
Andrew Godwin
096a5de5d2
Fixed #23092 : Squashing handles external dependencies
2014-07-29 10:22:00 -07:00
Andrew Godwin
a338e07735
Fixed #23101 : Prefer doing deletes before creates in autodetector.
...
Makes declined or missed renames still work (but drop data).
2014-07-29 09:38:51 -07:00
Andrew Godwin
4418559138
Fix soft_applied in a way that doesn't break tests
2014-07-29 09:24:07 -07:00
Andrew Godwin
5ed3834cbe
Make detect_soft_applied exit correctly on non-create migrations
2014-07-29 09:20:03 -07:00
Andrew Godwin
d6e73a876d
Fixed #23121 : AlterModelOptions operation not changing state right
2014-07-28 10:47:28 -07:00
Andrew Godwin
cb60d22bd9
Fixed #23100 : Individual FK creation missing dependencies
2014-07-28 10:32:43 -07:00
Aymeric Augustin
729e4ae4f0
Fixed #23074 -- Avoided leaking savepoints in atomic.
...
Thanks Chow Loong Jin for the report and the initial patch.
2014-07-28 14:30:41 +02:00
Florian Apolloner
2f73b527dd
Fixed #23098 -- Checked that lazy choices are not evaluated too soon
...
Thanks Matthieu Agopian for the report.
2014-07-27 13:31:25 +02:00
Abraham Martin
e1347e9253
Fixed #23101 db_table wasn't copied in deconstruct
...
Forward port of 999758fc7a
from
stable/1.7.x
2014-07-26 10:00:02 -07:00
Andrew Godwin
805774df1f
Fixed #22944 : Bad dependency on FK alteration in autodetector
2014-07-26 09:22:19 -07:00
areski
90faa196f6
Fixed #22873 -- Renamed use_debug_cursor to force_debug_cursor to clarify the behavior.
2014-07-26 10:38:46 -04:00
Federico Frenguelli
6eed751162
Fixed #22887 -- Added comment for translators on unique_for_date error message
2014-07-26 13:55:20 +02:00
Andrew Godwin
08681d7757
Fixed #23085 : Better error message for PostGIS 1.5/bad custom fields
2014-07-25 09:49:51 -07:00
Andrew Godwin
6f386b0acb
Restore support for reading __latest__ for compatability
2014-07-25 09:43:54 -07:00
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