Commit Graph

4225 Commits

Author SHA1 Message Date
Tim Graham 7444f32527
Refs #30055 -- Added a helpful error when SQLite is too old. 2019-01-28 11:14:45 -05:00
Jon Dufresne 7e3bf2662b Removed default mode='r' argument from calls to open(). 2019-01-27 17:41:43 -05:00
Nick Pope bff748df3e Fixed #30115 -- Fixed SQLite introspection crash with a varchar primary key.
Removed obsolete max_length handling for CharField that caused the issue.
Regression in a35d2a4510.
2019-01-22 19:02:34 -05:00
Nick Pope e19f58fc01 Inlined DatabaseIntrospection._table_info() for SQLite. 2019-01-22 18:23:37 -05:00
Nasir Hussain 2804b8d215 Fixed #30111 -- Fixed AppRegistryNotReady error with django.contrib.postgres in INSTALLED_APPS.
Regression in e192223ed9.
2019-01-22 17:49:30 -05:00
Simon Charette 8d2dcc47cd Fixed #30106 -- Made order_with_respect_to updates use QuerySet.bulk_update(). 2019-01-21 17:02:20 -05:00
Simon Charette 65858119d2 Fixed #30120 -- Fixed invalid SQL in distinct aggregate.
Regression in bc05547cd8 (refs #28658).
2019-01-21 09:24:32 -05:00
Mariusz Felisiak 709a8b861d
Optimized Oracle PKs introspection by adding get_primary_key_column(). 2019-01-18 16:50:06 +01:00
Tim Graham da1de1615c Refs #28750 -- Removed suppport for model Meta.manager_inheritance_from_future. 2019-01-17 11:15:27 -05:00
Tim Graham 1fecde6be9 Refs #11557 -- Removed the field_name keyword argument to QuerySet.earliest() and latest().
Per deprecation timeline.
2019-01-17 10:52:19 -05:00
Tim Graham da5eb3d56c Refs #28370 -- Removed support for the context arg of Field.from_db_value() and Expression.convert_value().
Per deprecation timeline.
2019-01-17 10:52:19 -05:00
Tim Graham 944469939b Refs #25175 -- Removed db.backends.postgresql_psycopg2 per deprecation timeline. 2019-01-17 10:50:25 -05:00
Simon Charette 9e5e5a657b Fixed #30044 -- Raised a FieldError on inherited field update attempts. 2019-01-16 14:09:51 -05:00
Simon Charette dbcf2ffa77 Refs #9475 -- Simplified dictionary unpacking. 2019-01-16 09:20:15 -05:00
Nick Pope d212bc03ba Refs #9475 -- Fixed typo, used unpacking generalization, and made through_defaults kwarg-only. 2019-01-15 13:03:08 -05:00
Collin Anderson 769355c765 Fixed #9475 -- Allowed RelatedManager.add(), create(), etc. for m2m with a through model. 2019-01-15 11:12:17 -05:00
Nasir Hussain f021c110d0 Fixed #30099 -- Fixed invalid SQL when filtering a Subquery by an aggregate. 2019-01-15 07:22:59 -05:00
Jon Dufresne ad7aa02c1d Removed unnecessary string formatting of strings. 2019-01-14 21:04:00 -05:00
Simon Charette a96b901932 Refs #28478 -- Prevented timezone assignment for unusable PostgreSQL connections. 2019-01-14 16:05:00 -05:00
Nick Pope 846624ed08 Refs #28643 -- Extracted DurationField logic for Avg() and Sum() into mixin.
Also addresses Sum() not handling the filter option correctly.
2019-01-14 14:39:57 -05:00
Nick Pope 6d4efa8e6a Refs #28643 -- Changed Variance() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:39:46 -05:00
Nick Pope e85afa5943 Refs #28643 -- Changed StdDev() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:38:00 -05:00
Nick Pope c690afb873 Refs #28643 -- Changed Avg() to use NumericOutputFieldMixin.
Keeps precision instead of forcing DecimalField to FloatField.
2019-01-14 14:35:41 -05:00
Nick Pope 3d5e0f8394 Refs #28643 -- Moved db function mixins to a separate module. 2019-01-14 14:26:46 -05:00
Nick Pope 7f1577d1ef Avoided calling as_oracle() for SQLite in Left database function. 2019-01-14 13:02:58 -05:00
Nick Pope ae65eed68d Corrected comment in TruncTime database function. 2019-01-14 13:02:58 -05:00
Nick Pope 0d7ba0ff8b Simplified overriding source expressions in some database functions. 2019-01-14 13:02:58 -05:00
Sergey Fedoseev b86bb47818 Fixed #30093 -- Fixed ordering of combined queryset ordered by F expressions. 2019-01-14 10:28:11 -05:00
Tom Forbes c8720e7696 Fixed #27685 -- Added watchman support to the autoreloader.
Removed support for pyinotify (refs #9722).
2019-01-13 20:33:47 -05:00
Nick Pope abf8e390a4 Refs #28643 -- Added Reverse database function.
Thanks Mariusz Felisiak for Oracle advice and review.
2019-01-12 10:45:48 -05:00
Paveł Tyślacki b69f8eb04c Fixed #30062 -- Added support for unique conditional constraints. 2019-01-12 09:50:20 -05:00
Paveł Tyślacki 1e837c4b23 Used None as the empty value for condition in Index's SQL construction. 2019-01-12 09:34:10 -05:00
can 7d3b3897c1 Refs #29738 -- Allowed registering serializers with MigrationWriter. 2019-01-11 18:13:16 -05:00
Tim Graham 8f4eee1777
Moved django.db.migrations.writer.SettingsReference to django.conf.
Reduces the possibility of circular imports.
2019-01-11 15:28:22 -05:00
Paveł Tyślacki 647be06538 Renamed variables after generalization of constraints.
Follow up to 8eae094638.
2019-01-10 18:54:41 -05:00
Mads Jensen 4b9d72210f Refs #28643 -- Added NullIf database function.
Thanks Nick Pope, Mariusz Felisiak, and Tim Graham for reviews.
2019-01-10 12:10:12 -05:00
Simon Charette bc05547cd8 Fixed #28658 -- Added DISTINCT handling to the Aggregate class. 2019-01-09 17:52:36 -05:00
Benjy Weinberger 222caab68a Fixed #30071 -- Fixed error message when a 'default' database isn't provided. 2019-01-09 10:58:37 -05:00
Nick Pope a35d2a4510 Refs #23748 -- Added AutoField introspection for SQLite. 2019-01-09 09:59:15 -05:00
Nick Pope e7f0e9b704 Renamed import in MySQL introspection backend for consistency. 2019-01-09 08:12:45 -05:00
Nick Pope 99b3ab2781 Simplified some imports for database functions.
Used more specific modules to reduce the risk of circular imports.
2019-01-08 19:21:31 -05:00
Mariusz Felisiak 97844a3213
Fixed typo in django/db/backends/base/features.py. 2019-01-03 20:10:33 +01:00
Tim Graham 0004daa536
Used 4 space hanging indent for dictionaries.
Thanks Mariusz Felisiak for auditing.
2019-01-02 18:18:19 -05:00
Paveł Tyślacki 0123b67f6b Fixed #30060 -- Moved SQL generation for indexes and constraints to SchemaEditor. 2019-01-01 09:39:58 -05:00
Tim Graham 100b8dd163
Renamed QuerySet.earliest()/latest() helper method. 2018-12-30 11:43:39 -05:00
Mariusz Felisiak dd8ed64113
Fixed #29851 -- Fixed crash of annotations with window expressions in Subquery. 2018-12-27 20:21:57 +01:00
Tim Graham b74b6736d0
Refs #29547 -- Skipped an unsupported partial index test on older versions of SQLite.
Follow up to e5b8626c0e.
2018-12-26 11:20:11 -05:00
Simon Charette ec7bf6d826 Refs #20483 -- Cached Oracle references retrieval on sql_flush(). 2018-12-26 09:20:21 -05:00
Simon Charette 2b2ae4eeb7 Refs #30054, #20483 -- Cached SQLite references graph retrieval on sql_flush(). 2018-12-26 09:19:44 -05:00
Nick Pope 83677faf86 Fixed #30056 -- Added SQLite support for StdDev and Variance functions. 2018-12-24 11:14:58 -05:00