Mariusz Felisiak
ff8020ed49
Fixed #29788 -- Added support for Oracle Managed File (OMF) tablespaces.
2018-11-13 18:22:41 -05:00
Simon Charette
db13bca60a
Fixed #29641 -- Added support for unique constraints in Meta.constraints.
...
This constraint is similar to Meta.unique_together but also allows
specifying a name.
Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13 17:57:27 -05:00
Simon Charette
dba4a634ba
Refs #29641 -- Refactored database schema constraint creation.
...
Added a test for constraint names in the database.
Updated SQLite introspection to use sqlparse to allow reading the
constraint name for table check and unique constraints.
Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13 15:25:44 -05:00
Tim Graham
f82be9ebc7
Fixed #29934 -- Added sqlparse as a require dependency.
2018-11-09 19:09:36 -05:00
Srinivas Reddy Thatiparthy
978ad6d4c0
Removed unused 'tz' variable in typecast_timestamp().
2018-11-09 12:47:02 -05:00
Tom Forbes
d5e52f2bef
Removed DatabaseOperation.savepoint_create/rollback_sql() on Oracle.
...
Obsolete since 918f44e3ae
.
2018-11-04 18:21:59 -05:00
Jayantha Gumballi
dfcdc8992f
Fixed #29886 -- 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 #29547 -- 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
thomazzo
9625d13f7b
Fixed #29882 -- Added events and stored routines to MySQL's cloned test databases.
2018-10-29 14:45:30 -04:00
Simon Charette
95bda03f2d
Fixed #29868 -- Retained database constraints on SQLite table rebuilds.
...
Refs #11964 .
Thanks Scott Stevens for testing this upcoming feature and the report.
2018-10-29 10:33:41 +01:00
Hampus Dunström
5e8a07d69d
Fixed #29763 -- Added support for column renaming on SQLite.
2018-10-27 20:26:39 -04:00
Tim Graham
717ee63e56
Refs #27025 -- Removed obsolete sqlite3 transaction management workaround for Python 3.6+.
...
Obsolete per https://bugs.python.org/issue10740#msg274816 .
2018-10-25 19:54:48 -04:00
Mariusz Felisiak
c6525bea9e
Fixed #29534 -- Made dbshell use rlwrap on Oracle if available.
2018-10-25 19:39:42 -04:00
Sergey Fedoseev
9a88c6dd6a
Fixed #29827 -- Fixed reuse of test databases with --keepdb on MySQL.
...
Regression in e1253bc26f
.
2018-10-25 19:37:41 -04:00
Tim Graham
f1d1634493
Removed useless check in sqlite's DatabaseWrapper._savepoint_allowed().
...
Obsolete since 27193aea00
.
2018-10-25 10:17:37 -04:00
Tim Graham
9b52bd6575
Made DatabaseFeatures.uses_savepoints default to True.
2018-10-25 10:02:47 -04:00
Mariusz Felisiak
641742528a
Fixed F841 flake8 warning.
2018-10-24 09:13:10 -04:00
Mariusz Felisiak
328f5627dd
Fixed #29870 -- Added DurationField introspection for Oracle and PostgreSQL.
...
Thanks Tim Graham for the review.
2018-10-21 09:08:05 +02:00
Florian Apolloner
bc7dd8490b
Fixed #21171 -- Avoided starting a transaction when a single (or atomic queries) are executed.
...
Checked the following locations:
* Model.save(): If there are parents involved, take the safe way and use
transactions since this should be an all or nothing operation.
If the model has no parents:
* Signals are executed before and after the previous existing
transaction -- they were never been part of the transaction.
* if `force_insert` is set then only one query is executed -> atomic
by definition and no transaction needed.
* same applies to `force_update`.
* If a primary key is set and no `force_*` is set Django will try an
UPDATE and if that returns zero rows it tries an INSERT. The first
case is completly save (single query). In the second case a
transaction should not produce different results since the update
query is basically a no-op then (might miss something though).
* QuerySet.update(): no signals issued, single query -> no transaction
needed.
* Model/Collector.delete(): This one is fun due to the fact that is
does many things at once.
Most importantly though: It does send signals as part of the
transaction, so for maximum backwards compatibility we need to be
conservative.
To ensure maximum compatibility the transaction here is removed only
if the following holds true:
* A single instance is being deleted.
* There are no signal handlers attached to that instance.
* There are no deletions/updates to cascade.
* There are no parents which also need deletion.
2018-10-17 12:19:02 +02:00
Mariusz Felisiak
f2e2a1bd4b
Fixed #29845 -- Fixed Cast crash on MySQL when casting to DecimalField.
2018-10-15 15:57:22 +02:00
Mariusz Felisiak
a3052c35d1
Fixed various comments in django/db/backends/oracle/base.py.
2018-10-13 20:25:23 +02:00
Mariusz Felisiak
52fec5d18f
Fixed #29836 -- Bumped required cx_Oracle to 6.0.
2018-10-11 11:43:16 +02:00
Sergey Fedoseev
3957f767bb
Simplified handling of DurationField values on MySQL/MariaDB.
2018-10-09 10:38:42 -04:00
Jon Dufresne
efd8a82e26
Refs #27795 -- Removed force_bytes() usage in MySQL backend.
...
The mysqlclient cursor attribute `_last_executed` is always stored as
bytes. Decode it.
TextField values are already type str. No need to decode.
2018-10-03 10:37:36 +02:00
Nick Pope
bf8b625a3b
Refs #29722 -- Added introspection of materialized views for PostgreSQL.
2018-10-02 14:02:04 -04:00
Nick Pope
45ef3df7d0
Fixed #29719 -- Added introspection of foreign tables for PostgreSQL.
...
Thanks infinite-l00p for the initial patch.
2018-10-02 14:01:24 -04:00
Jon Dufresne
0bf7b25f8f
Added django.db.backends.utils.names_digest() to remove redundant code.
2018-10-02 10:41:43 -04:00
Jon Dufresne
c37b844349
Fixed ResourceWarning in MySQL's _clone_test_db().
2018-10-02 10:23:21 -04:00
Claude Paroz
fc3a463048
Fixed #29767 -- Made date-related casts work on SQLite
...
Thanks Rémy Hubscher for the report and Tim Graham and Simon Charette for the reviews.
2018-10-01 13:27:30 +02:00
Mariusz Felisiak
024abe5b82
Fixed #29630 -- Fixed crash of sliced queries with multiple columns with the same name on Oracle 12.1.
...
Regression in 0899d583bd
.
Thanks Tim Graham for the review and Jani Tiainen for help.
2018-09-26 20:18:48 +02:00
Mariusz Felisiak
90d93a1b42
Made DatabaseWrapper.oracle_version() return a full version tuple.
2018-09-26 08:51:27 +02:00
Jon Dufresne
82f286cf6f
Refs #29784 -- Switched to https:// links where available.
2018-09-26 08:48:47 +02:00
Oleg
d1d5c97bc2
Fixed #29778 -- Fixed quoting of unique index names.
...
Regression in 3b429c9673
.
2018-09-25 16:00:20 -04:00
Jon Dufresne
abeed587b1
Refs #27795 -- Removed force_bytes() usage in db/backends/base/schema.py.
2018-09-25 09:54:06 -04:00
Jon Dufresne
1d65ddd9c3
Refs #27795 -- Removed force_bytes() usage in db/backends/utils.py.
2018-09-25 09:53:13 -04:00
Tom Forbes
9cbdb44014
Fixed #23646 -- Added QuerySet.bulk_update() to efficiently update many models.
2018-09-18 16:14:44 -04:00
Claude Paroz
f5e347a640
Fixed #27899 -- 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
Mariusz Felisiak
da92ec7962
Fixed #29759 -- Fixed crash on Oracle when fetching a returned insert id with cx_Oracle 7.
2018-09-16 12:45:34 +02:00
Nick Pope
f87f9c5f63
Simplified introspection methods for PostgreSQL.
2018-09-14 14:34:43 -04:00
Srinivas Reddy Thatiparthy
34d6bceec4
Fixed #29500 -- Fixed SQLite function crashes on null values.
...
Co-authored-by: Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2018-09-10 15:08:55 -04:00
Nick Pope
76dfa834e7
Combined two identical SQLite functions.
2018-09-10 14:41:58 -04:00
Nick Pope
af7a758dcb
Made some date parsing in SQLite functions more DRY.
2018-09-10 14:41:20 -04:00
Jon Dufresne
5311a36da5
Refs #29654 -- Replaced three dots with ellipsis in DB creation output strings.
2018-08-28 07:56:34 -04:00
Claude Paroz
50b8493581
Refs #29654 -- Replaced three dots with ellipsis character in output strings.
2018-08-22 09:13:58 -04:00
Sigurd Ljødal
3e09b37f80
Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.
2018-08-18 13:09:15 -04:00
Jon Dufresne
bf17f5e884
Refs #29015 -- Added database name to PostgreSQL database name too long exception.
2018-08-17 12:43:56 -04:00
Tom
f1fbef6cd1
Fixed #28668 -- Allowed QuerySet.bulk_create() to ignore insert conflicts.
2018-08-03 17:40:46 -04:00
Mariusz Felisiak
1a9cbf41a1
Fixed #29613 -- Fixed --keepdb on PostgreSQL if the database exists and the user can't create databases.
...
Regression in e776dd2db6
.
Thanks Tim Graham for the review.
2018-08-03 10:31:55 +02:00
Nick Pope
6b4d1ec8ff
Fixed #29614 -- Added BTreeIndex to django.contrib.postres.
2018-08-02 11:42:57 -04:00
Nick Pope
d6381d3559
Fixed #28990 -- Added autosummarize parameter to BrinIndex.
2018-08-02 11:26:58 -04:00