Commit Graph

235 Commits

Author SHA1 Message Date
oliver 2aaabe2004 Used QuerySet.bulk_create() in a couple of postgres tests.
Follow up to 0ce2ad9ca4.
2019-03-21 18:05:29 -04:00
Simon Charette 386d89ab55
Fixed -- Adjusted postgres schema value quoting of ranges.
Thanks Tilman Koschnick for the report and patch.
2019-03-18 09:05:39 +01:00
Mariusz Felisiak f69c7bbdce
Refs -- Cosmetic edits for validation of related fields and lookups in model Meta.ordering.
Follow up to 440505cb2c.
2019-03-01 19:38:21 +01:00
Hasan Ramezani 440505cb2c Fixed -- Added validation of related fields and lookups in model Meta.ordering. 2019-03-01 17:09:33 +01:00
Vinay Karanam 5a36c81f58 Fixed -- Made PostgresSimpleLookup respect Field.get_db_prep_value(). 2019-02-09 18:05:50 -05:00
Jon Dufresne 099c36d546 Replaced manual current directory management with subprocess's cwd argument. 2019-02-05 11:01:36 -05:00
Tim Graham 39ebdf5a3c Fixed -- Dropped support for PostgreSQL 9.4 and PostGIS 2.1. 2019-02-04 18:07:02 -05:00
Tim Graham 2de7eb6f4d Refs -- Fixed test cleanup in postgres_tests/test_integration.py.
Fixed "ERROR: Step ‘Publish JUnit test result report’ failed: No test report
files were found. Configuration error?" on Jenkins because report files were
put in tests/postgres_tests.
2019-01-23 11:34:55 -05:00
Nasir Hussain 2804b8d215 Fixed -- Fixed AppRegistryNotReady error with django.contrib.postgres in INSTALLED_APPS.
Regression in e192223ed9.
2019-01-22 17:49:30 -05:00
Simon Charette b2c598e30d Removed unnecessary skipUnlessDBFeature.
None of the tests interact with the database.
2019-01-13 21:48:40 -05:00
can e192223ed9 Fixed -- Allowed serializing psycopg2 range types in migrations. 2019-01-11 19:32:26 -05:00
Jaap Roes 8a1a919468 Fixed -- Allowed combining SearchQuerys with different configs.
Seems to be a needless restriction in
978a00e39f.
2018-11-30 09:42:50 -05:00
Tim Graham 41db8cb252
Used assertCountEqual() in contrib.postgres.search tests. 2018-11-29 14:43:53 -05:00
Simon Charette 7f63b894c0 Adjusted code style of a few test data setup methods.
Thanks Mariusz for suggesting it.
2018-11-27 09:48:22 -05:00
Simon Charette 84e7a9f4a7 Switched setUp() to setUpTestData() where possible in Django's tests. 2018-11-27 09:35:17 -05:00
Tim Graham 193c109327 Switched TestCase to SimpleTestCase where possible in Django's tests. 2018-11-27 08:58:44 -05:00
Sergey Fedoseev 80ba7a881f Fixed cached_properties that share a common property.
The aliases aren't cached and thus the old usage will be an error after
refs .
2018-11-19 08:59:46 -05:00
Simon Charette 2f120ac517 Fixed -- Moved contrib.postgres uninstallation logic to the app config. 2018-11-12 11:15:48 -05:00
Jayantha Gumballi dfcdc8992f Fixed -- Fixed unaccent lookup when PostgreSQL's standard_conforming_strings option is off.
Thanks Tom McClure for the patch.
2018-11-01 11:14:34 -04:00
Mads Jensen a906c98982 Fixed -- Added support for partial indexes.
Thanks to Ian Foote, Mariusz Felisiak, Simon Charettes, and
Markus Holtermann for comments and feedback.
2018-10-29 19:34:54 -04:00
Jon Dufresne 31c0348687 Fixed postgres_tests.test_signals.OIDTests when run in isolation. 2018-10-09 09:23:36 -04:00
Stefano Chiodino 6de7f9ec60 Fixed -- Deprecated FloatRangeField in favor of DecimalRangeField. 2018-10-02 19:17:23 -04:00
Tom Forbes 9cbdb44014 Fixed -- Added QuerySet.bulk_update() to efficiently update many models. 2018-09-18 16:14:44 -04:00
Claude Paroz f5e347a640 Fixed -- Added support for phrase/raw searching in SearchQuery.
Thanks Tim Graham, Nick Pope, and Claude Paroz for contribution and review.
2018-09-17 12:03:52 -04:00
Tom Forbes a3df7574f9 Fixed -- Made SearchQuery.__str__() reflect negation and grouping. 2018-08-15 16:47:23 -04:00
Nick Pope 743d28f553 Refs -- Added PostgreSQL version check for GinIndex support. 2018-08-02 11:53:35 -04:00
Nick Pope ff9543b351 Refs , -- Added PostgreSQL version check for BrinIndex support. 2018-08-02 11:50:40 -04:00
Nick Pope 6b4d1ec8ff Fixed -- Added BTreeIndex to django.contrib.postres. 2018-08-02 11:42:57 -04:00
Nick Pope d6381d3559 Fixed -- Added autosummarize parameter to BrinIndex. 2018-08-02 11:26:58 -04:00
Nick Pope 4c36e9e492 Fixed -- Added SpGistIndex to django.contrib.postgres. 2018-08-02 11:08:08 -04:00
Nick Pope d526b07784 Fixed -- Added HashIndex to django.contrib.postgres.
Thanks Akshesh Doshi for the initial implementation.
2018-08-02 10:39:18 -04:00
Nick Pope fa54ebc722 Simplified tests for PostgreSQL indexes.
- Added mixin to make tests more DRY.
- Removed redundant equality tests.
2018-08-02 10:07:10 -04:00
vinay karanam 3af695eda2 Fixed , -- Fixed ArrayField with JSONField and RangeFields. 2018-07-27 11:35:54 -04:00
Simon Charette 1a28dc3887 Fixed -- Fixed a crash when using SearchVector with non text-fields.
The PostgreSQL concat() function handles nulls and non-text values better than
the || operator.
2018-07-21 21:32:21 -04:00
Floris den Hengst 96199e562d Fixed -- Added ordering support to ArrayAgg and StringAgg. 2018-06-28 20:29:33 -04:00
Hasan Ramezani b33f10d8cc Refs -- Made ArrayField error messages index from 1 instead of 0. 2018-04-22 22:18:46 -04:00
Alasdair Nicol 65c44a5c1d Fixed -- Fixed inspectdb import paths for django.contrib.postgres fields.
Thanks erindy for the report.
2018-04-10 09:33:05 -04:00
Vinay Karanam 6a1957bb98 Fixed -- Fixed ArrayField.has_changed() for empty values. 2018-04-07 17:53:33 -04:00
Vinay Karanam e67dc0fbb2 Added tests for ArrayField.has_changed(). 2018-04-07 17:48:29 -04:00
Dmitry Dygalo c979c0a2b8 Fixed -- Made a JSONField lookup value of None match keys that have a null value. 2018-04-04 10:53:46 -04:00
Tim Graham 4f7467b690
Refs -- Added check for HStoreField to prevent mutable default. 2018-04-03 11:12:56 -04:00
Tim Graham 623139b5d1 Refs --- Added JSONField serialization tests. 2018-03-21 20:11:06 -04:00
Tim Graham 5fa4f40f45 Fixed -- Allowed BooleanField to be null=True.
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-20 12:10:10 -04:00
Matthew Wilkes 2162f0983d Fixed -- Allowed transforms in QuerySet.order_by() and distinct(*fields). 2018-02-10 19:08:55 -05:00
Jon Dufresne ff05de760c Fixed -- Removed closing slash from HTML void tags. 2018-01-21 02:09:10 -05:00
Jon Dufresne 3c34452ab5 Refs -- Removed passing default argument of current TZ to make_aware()/naive. 2018-01-18 11:21:12 -05:00
Sergey Fedoseev 1490611038 Fixed -- Allowed ArrayField lookups on ArrayAgg annotations. 2017-12-30 14:46:52 -05:00
Mads Jensen f0a68c2511 Fixed -- Made query lookups for CIText fields use citext. 2017-11-29 10:35:37 -05:00
Tim Graham 9bea555d06 Fixed test failures due to ordering differences on PostgreSQL 10. 2017-11-15 09:37:18 -05:00
shanghui 1907fc9b12 Fixed -- Made JSONField.has_changed() ignore key order and consider True/1 values as different. 2017-11-11 19:45:23 -05:00
Imran Iqbal 3e7497a05e Fixed -- Fixed RangeMax/MinValueValidators crash with unbound ranges. 2017-11-07 15:07:03 -05:00
Michał Pasternak e554b72a2a Fixed -- Added subquery support for ArrayField's __in lookup. 2017-11-01 15:12:18 -04:00
Flávio Juvenal f6e1789654 Fixed -- Added checks for ArrayField and JSONField to prevent mutable defaults. 2017-10-20 13:17:22 -04:00
Tim Graham 1d8cfa3608 Fixed -- Dropped support for PostgreSQL 9.3.
Thanks Simon Charette for the introspection changes.
2017-09-27 11:00:04 -04:00
Tim Graham f7b0532ec0 Refs -- Fixed crash in hstore/citext oid caching during test db creation. 2017-09-19 07:04:31 -04:00
Tim Graham da1ba03f1d Added test skipping for a PostgreSQL JSONField test. 2017-09-18 09:19:26 -04:00
Igor Gumenyuk 86a18dc46a Fixed -- Added caching for hstore/citext OIDs. 2017-09-15 10:00:12 -04:00
Claude Paroz a599ae6018 Refs -- Added introspection support for PostgreSQL RangeField 2017-09-09 20:22:47 +02:00
Claude Paroz 0cbb6ac007 Refs -- Added introspection support for PostgreSQL JSONField
Thanks Adam Johnson and Tim Graham for the reviews.
2017-09-09 18:26:29 +02:00
Tim Graham 6e4c6281db Reverted "Fixed -- Replaced try/except/pass with contextlib.suppress()."
This reverts commit 550cb3a365
because try/except performs better.
2017-09-07 08:16:21 -04:00
Mads Jensen f4135783ad Fixed -- Added GistIndex to contrib.postgres.
Thanks to Marc Tamlyn for the initial patch.
2017-09-04 21:08:02 -04:00
Mads Jensen e016c4c65b Refs -- Omitted field kwargs from GinIndex.deconstruct() if they're None. 2017-08-26 10:32:03 -04:00
Mads Jensen fb42d02471 Refs -- Omitted pages_per_range from BrinIndex.deconstruct() if it's None. 2017-08-26 09:45:45 -04:00
Tim Graham 487362fa8f Fixed -- Deprecated the context arg of Field.from_db_value() and Expression.convert_value().
Unused since a0d166306f.
2017-07-20 16:30:08 -04:00
Mads Jensen 550cb3a365 Fixed -- Replaced try/except/pass with contextlib.suppress(). 2017-06-28 14:07:55 -04:00
Mads Jensen de42adf4ff Fixed -- Added fastupdate and gin_pending_list_limit params to GinIndex.
Thanks Tim Graham and Markus Holtermann for review.
2017-06-20 10:54:39 -04:00
Tim Graham d1d7348001 Refs -- Removed BrinIndex.__repr__().
In retrospect, implementing a __repr__() for index subclasses doesn't
seem worthwhile.
2017-06-17 18:41:53 -04:00
Romulo Furtado 9dd2443942 Fixed -- Fixed form validation when an ArrayField's base_field has choices. 2017-06-13 19:44:24 -04:00
Tim Graham 650bf6714d Refs -- Skipped RandomUUID test on PostgreSQL 9.3. 2017-05-15 09:26:38 -04:00
Simon Charette b91868507a Fixed -- Fixed return type of ArrayField(CITextField()).
Thanks Tim for the review.
2017-05-04 00:02:14 -04:00
Simon Charette f37467ec7a Added a test for ArrayField(HStoreField()). 2017-05-03 23:53:08 -04:00
Tim Graham 1ebd295082 Fixed -- Updated SplitArrayWidget to use template-based widget rendering.
Thanks Preston Timmons for review.
2017-04-29 19:00:21 -04:00
Paolo Melchiorre fcb5dbfec0 Fixed -- Added RandomUUID function and CryptoExtension to contrib.postgres. 2017-04-25 20:21:36 -04:00
Paolo Melchiorre a78fd2abd4 Alphabetized CITextExtension in test migration. 2017-04-25 19:32:39 -04:00
Simon Charette a354c69055 Fixed -- Restored casting to text of builtin lookups on PostgreSQL.
Reverted 658f1e8 which broke code using __icontains's implicit cast to ::text
on ArrayField.

Thanks Peter J. Farrell for the report.
2017-04-07 16:47:52 -04:00
Mads Jensen 82bb4e684f Fixed -- Fixed crash with BrinIndex name > 30 characters. 2017-03-18 08:12:10 -04:00
Tim Graham 6b4f018b2b Replaced type-specific assertions with assertEqual().
Python docs say, "it's usually not necessary to invoke these methods directly."
2017-03-17 07:51:48 -04:00
Claude Paroz 8346680e1c Refs -- Removed unneeded force_text calls
Thanks Tim Graham for the review.
2017-03-04 18:18:21 +01:00
Tim Graham b008f7cc56 Fixed -- Made index introspection return Index.suffix. 2017-02-15 20:15:02 -05:00
Mads Jensen fb5bd38e3b Refs -- Added CIText mixin and CIChar/Email/TextField. 2017-02-11 07:16:35 -05:00
Mariusz Felisiak 6b048b364c Fixed -- Fixed __contains lookup for Date/DateTimeRangeField.
Thanks Mariusz Felisiak and Tim Graham for polishing the patch.
2017-02-07 12:46:18 -05:00
orf b5393028bf Fixed -- Added distinct argument to ArrayAgg. 2017-02-04 13:57:39 -05:00
chillaranand d6eaf7c018 Refs -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Tim Graham 7aba69145d Refs -- Removed django.test.mock Python 2 compatibility shim. 2017-01-20 08:17:20 -05:00
Simon Charette cecc079168 Refs -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
Claude Paroz d7b9aaa366 Refs -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Mads Jensen 65e321b781 Refs -- Made a few late review comments for BrinIndex. 2017-01-16 13:23:20 -05:00
Mads Jensen e585c43be9 Fixed -- Added BrinIndex support in django.contrib.postgres.
Thanks Tim Graham and Markus Holtermann for review.
2017-01-15 13:37:18 +01:00
Simon Charette 2e55790838 Refs -- Cloned ArrayField.base_field on deconstruction.
This prevents the base_field from sharing attributes with the one used
during migrations.
2017-01-14 06:31:34 -05:00
Simon Charette d976760260 Fixed , Refs -- Fixed iexact lookup on JSONField keys.
Thanks Harris Lapiroff for the report.
2017-01-06 19:25:32 -05:00
David Hoffman bf84d042e0 Fixed -- Allowed HStoreField to store null values. 2016-12-15 10:35:44 -05:00
Mads Jensen aa2cb4c622 Refs -- Renamed JsonAgg to JSONBAgg.
Thanks to Christian von Roques for the report.
2016-11-28 06:57:01 -05:00
Brandon Chinn eed6150009 Refs -- Fixed JSONField crash on converted values. 2016-11-15 18:43:55 -05:00
Brandon Chinn 6573274161 Refs -- Fixed SimpleArrayField crash on converted values. 2016-11-15 18:10:45 -05:00
za 321e94fa41 Refs -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Mads Jensen 0a26f3c338 Fixed -- Added JsonAgg to contrib.postgres.
Thanks Tim Graham for review.
2016-10-07 07:52:03 -04:00
Simon Charette cecef94275 Fixed -- Fixed builtin text lookups on JSONField keys.
Thanks Nick Stefan for the report and Tim for the review.
2016-09-22 22:19:37 -04:00
Tim Graham 3507d4e773 Fixed -- Fixed model form default fallback for MultiWidget, FileInput, SplitDateTimeWidget, SelectDateWidget, and SplitArrayWidget.
Thanks Matt Westcott for the review.
2016-09-22 12:20:58 -04:00
Mads Jensen 094d630ae8 Fixed -- Added CITextField to contrib.postgres. 2016-09-21 12:11:37 -04:00
Tim Graham 3347dc6b4e Added tests for ArrayField lookup errors. 2016-09-20 10:14:47 -04:00