Hasan Ramezani
e3fc9af4ab
Refs #30593 -- Fixed introspection of check constraints columns on MariaDB.
2019-07-30 16:32:13 +02:00
Hasan Ramezani
b2aad9ad4d
Refs #30593 -- Added _parse_constraint_columns() hook to introspection on MariaDB.
2019-07-30 16:32:13 +02:00
Mariusz Felisiak
8d52a525c8
Refs #29548 -- Fixed DatabaseWrapper.display_name on MariaDB.
2019-07-23 13:34:06 +02:00
Georgi Yanchev
c6581a40be
Fixed #30644 -- Made introspection use pg_table_is_visible() instead of filtering by public schema on PostgreSQL.
2019-07-22 08:14:53 +02:00
Mariusz Felisiak
842fd620ff
Simplified get_key_columns()/get_relations() introspection methods for PostgreSQL.
2019-07-20 15:15:41 +02:00
Hasan Ramezani
1fc2c70f76
Fixed #30593 -- Added support for check constraints on MariaDB 10.2+.
2019-07-19 11:05:06 +02:00
Yann Sionneau
e47b8293a7
Fixed #30636 -- Fixed options ordering when cloning test database on MySQL.
...
--defaults-file must be given before other options.
2019-07-16 07:25:43 +02:00
Johannes Hoppe
bc91f27a86
Refs #29444 -- Added support for fetching a returned non-integer insert values on Oracle.
...
This is currently not actively used, since the ORM will ask the
SQL compiler to only return auto fields.
2019-07-08 08:53:08 +02:00
Min ho Kim
fbb83fefd4
Fixed typos in comments and docs.
2019-07-02 09:36:17 +02:00
Andrew Godwin
a415ce70be
Fixed #30451 -- Added ASGI handler and coroutine-safety.
...
This adds an ASGI handler, asgi.py file for the default project layout,
a few async utilities and adds async-safety to many parts of Django.
2019-06-20 12:29:43 +02:00
can
fde9b7d35e
Fixed #30128 -- Fixed handling timedelta timezone in database functions.
2019-06-13 09:29:43 +02:00
Mariusz Felisiak
b6c4766f53
Refs #29548 -- Updated docs for MariaDB support.
2019-05-27 19:59:49 +02:00
Hasan Ramezani
1378d665a1
Fixed #28816 -- Prevented silencing data loss when decreasing CharField.max_length on PostgreSQL.
2019-05-21 14:15:43 +02:00
Przemysław Suliga
af5ec222cc
Used time.monotonic() instead of time.time() where applicable.
...
time.monotonic() available from Python 3.3:
- Nicely communicates a narrow intent of "get a local system monotonic
clock time" instead of possible "get a not necessarily accurate Unix
time stamp because it needs to be communicated to outside of this
process/machine" when time.time() is used.
- Its result isn't affected by the system clock updates.
There are two classes of time.time() uses changed to time.monotonic()
by this change:
- measuring time taken to run some code.
- setting and checking a "close_at" threshold for for persistent db
connections (django/db/backends/base/base.py).
2019-05-08 18:34:22 +02:00
Rob Golding-Day
4043dc69cd
Fixed #30444 -- Moved SQL generation for tables to BaseDatabaseSchemaEditor.table_sql().
2019-05-07 10:28:14 +02:00
Daniel Hahler
6d37c089ae
Readded comment about the default params of cursor.execute().
...
It was removed in in 728548e483
.
2019-05-07 08:13:30 +02:00
Simon Charette
a8b3f96f6a
Fixed #30408 -- Fixed crash when adding check constraints with LIKE operator on Oracle and PostgreSQL.
...
The LIKE operator wildcard generated for contains, startswith, endswith and
their case-insensitive variant lookups was conflicting with parameter
interpolation on CREATE constraint statement execution.
Ideally we'd delegate parameters interpolation in DDL statements on backends
that support it but that would require backward incompatible changes to the
Index and Constraint SQL generating methods.
Thanks David Sanders for the report.
2019-04-30 07:38:22 +02:00
kingbuzzman
673fe2e3ec
Fixed #30148 -- Logged COPY ... TO statements in connection.queries on PostgreSQL.
2019-04-29 14:20:17 +02:00
kingbuzzman
f7408b49a5
Refs #30148 -- Moved logging queries in CursorDebugWrapper to debug_sql() contextmanager.
2019-04-29 13:34:32 +02:00
Jon Dufresne
8b3f1c35dd
Removed unnecessary assignments in various code.
2019-04-24 13:09:29 +02:00
Mariusz Felisiak
994a00eb70
Refs #30380 -- Used cursor._executed in DatabaseOperations.last_executed_query() on MySQL.
...
Regression in a41b09266d
.
Thanks Tobias Krönke for the report.
2019-04-21 12:17:05 +02:00
Mariusz Felisiak
a41b09266d
Fixed #30380 -- Handled bytes in MySQL backend for PyMySQL support.
...
This commit partly reverts efd8a82e26
.
2019-04-19 20:34:20 +02:00
Ville Skyttä
03db5fddfd
Fixed typos in docs, comments, and exception messages.
2019-04-18 09:33:53 +02:00
Oleh Mykytiuk
177fa08339
Fixed #30370 -- Added dbshell support for client TLS certificates on PostgreSQL.
2019-04-18 08:10:31 +02:00
Dolan Antenucci
f944cb3d3b
Fixed #30266 -- Kept a sequence owner when altering an AutoField/BigAutoField on PostgreSQL.
2019-04-08 22:24:18 +02:00
can
cef3f2d3c6
Fixed #28373 -- Used connection timezone instead of UTC when making dates timezone-aware on MySQL, SQLite, and Oracle.
...
Thanks vtalpaert for the initial patch.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-04-08 08:59:17 +02:00
Mariusz Felisiak
79065b55a7
Refs #20010 -- Unified DatabaseOperations.last_executed_query() on Oracle with other db backends.
...
Thanks Simon Charette for the review.
2019-04-05 21:35:51 +02:00
Mariusz Felisiak
5efaf078f7
Fixed #30331 -- Added support for psycopg2 2.8.
2019-04-05 11:05:53 +02:00
msg
755673e1bc
Fixed #30307 -- Fixed incorrect quoting of database user password when using dbshell on Oracle.
...
Regression in acfc650f2a
.
2019-04-04 08:33:28 +02:00
Nick Pope
198a2a9381
Removed unnecessary /static from links to PostgreSQL docs.
2019-03-29 21:49:44 -04:00
Mariusz Felisiak
881362986a
Fixed "byte string" typo in various docs and comments.
2019-03-28 10:00:12 +01:00
Nick Pope
d26b242443
Fixed #30271 -- Added the Sign database function.
2019-03-22 12:52:39 +01:00
Nick Pope
0b70985f42
Fixed #30240 -- Added SHA1, SHA224, SHA256, SHA384, and SHA512 database functions.
...
Thanks Mariusz Felisiak and Tim Graham for reviews.
2019-03-20 19:30:43 +01:00
Simon Charette
386d89ab55
Fixed #30258 -- Adjusted postgres schema value quoting of ranges.
...
Thanks Tilman Koschnick for the report and patch.
2019-03-18 09:05:39 +01:00
Paveł Tyślacki
5c17c273ae
Refs #30172 -- Prevented removing a model Meta's index/unique_together from removing Meta constraints/indexes.
2019-03-17 20:50:57 -04:00
Paveł Tyślacki
4bb859e246
Refs #30172 -- Prevented removing a field's check or unique constraint from removing Meta constraints.
2019-03-17 20:50:22 -04:00
Paveł Tyślacki
782d85b6df
Fixed #30183 -- Added introspection of inline SQLite constraints.
2019-03-13 10:24:28 -04:00
Hang Park
142e1ead76
Fixed #30242 -- Removed extra space before LIMIT/OFFSET SQL.
2019-03-09 21:32:20 +01:00
Paveł Tyślacki
4492be348a
Refs #30183 -- Moved SQLite table constraint parsing to a method.
2019-03-01 17:05:36 -05:00
Paveł Tyślacki
b777c0675e
Unified nonexistent foreign key introspection value for SQLite.
2019-03-01 15:51:37 -05:00
Mariusz Felisiak
9ff18c08c3
Refs #28643 -- Added MD5 database function.
...
Thanks Tim Graham, Nick Pope and Simon Charette for reviews.
2019-02-21 10:52:51 +01:00
Simon Charette
7071f8f272
Fixed #30193 , Refs #28478 -- Avoided PostgreSQL connection health checks on initialization.
...
This addressed a regression introduced by a96b901932
as identified by Ran Benita.
2019-02-20 10:59:40 +01:00
Jon Dufresne
76990cbbda
Fixed #30171 -- Fixed DatabaseError in servers tests.
...
Made DatabaseWrapper thread sharing logic reentrant. Used a reference
counting like scheme to allow nested uses.
The error appeared after 8c775391b7
.
2019-02-14 10:04:55 -05:00
Daniel Bowring
cf826c9a91
Fixed #30173 -- Simplified db.backends.postgresql.client.
2019-02-13 17:12:02 -05:00
Dan Davis
2bd8df243a
Fixed #30184 -- Removed ellipsis characters from shell output strings.
...
Partially reverted 50b8493581
(refs #29654 )
to avoid a crash when the user shell doesn't support non-ASCII characters.
2019-02-13 13:59:44 -05:00
Sergey Fedoseev
1933e56eca
Removed uneeded generator expressions and list comprehensions.
2019-02-09 09:18:48 -05:00
Simon Charette
b8c48d06fa
Refs #26608 -- Added a database feature for fixed frame range distance support.
2019-02-09 08:47:41 -05:00
Simon Charette
ebd2fe1861
Refs #30027 -- Enabled window function tests on SQLite 3.25+.
2019-02-09 08:47:40 -05:00
Mariusz Felisiak
759a9b710c
Updated Oracle docs links to Oracle 18c.
2019-02-07 09:59:47 +01:00
Tim Graham
77d25dbd0f
Refs #27753 -- Favored SafeString over SafeText.
2019-02-06 14:12:06 -05:00
Aymeric Augustin
3bb6a4390c
Refs #27753 -- Favored force/smart_str() over force/smart_text().
2019-02-06 14:12:06 -05:00
Mariusz Felisiak
21bb71ef0d
Fixed #30157 -- Dropped support for Oracle 12.1.
...
Thanks Tim Graham for the review.
2019-02-06 19:25:04 +01:00
Tim Graham
39ebdf5a3c
Fixed #30155 -- Dropped support for PostgreSQL 9.4 and PostGIS 2.1.
2019-02-04 18:07:02 -05:00
Mariusz Felisiak
85f924a9b9
Refs #28859 -- Simplified fetch_returned_insert_id() by using int data type for binding variable on Oracle.
2019-02-04 16:31:23 +01:00
Johannes Hoppe
b131f9c79f
Refs #29444 -- Renamed DatabaseFeatures.can_return_id* to be generic for other columns.
2019-01-30 15:31:56 -05:00
Tim Graham
7e6b214ed3
Fixed #30116 -- Dropped support for Python 3.5.
2019-01-30 10:19:48 -05:00
Dan Tao
738faf9da2
Fixed #30108 -- Allowed adding foreign key constraints in the same statement that adds a field.
2019-01-29 15:42:57 -05:00
Tim Graham
7444f32527
Refs #30055 -- Added a helpful error when SQLite is too old.
2019-01-28 11:14:45 -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
Mariusz Felisiak
709a8b861d
Optimized Oracle PKs introspection by adding get_primary_key_column().
2019-01-18 16:50:06 +01:00
Tim Graham
944469939b
Refs #25175 -- Removed db.backends.postgresql_psycopg2 per deprecation timeline.
2019-01-17 10:50:25 -05:00
Simon Charette
a96b901932
Refs #28478 -- Prevented timezone assignment for unusable PostgreSQL connections.
2019-01-14 16:05:00 -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
Paveł Tyślacki
647be06538
Renamed variables after generalization of constraints.
...
Follow up to 8eae094638
.
2019-01-10 18:54:41 -05:00
Simon Charette
bc05547cd8
Fixed #28658 -- Added DISTINCT handling to the Aggregate class.
2019-01-09 17:52:36 -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
Mariusz Felisiak
97844a3213
Fixed typo in django/db/backends/base/features.py.
2019-01-03 20:10:33 +01: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
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
Nick Pope
e626a3f993
Renamed Sqlite and Sqlite3 references to SQLite.
2018-12-22 18:52:54 -05:00
Simon Charette
ce8b65ac5e
Fixed #30054 -- Implemented cascaded flush on SQLite.
...
This is required to maintain foreign key integrity when using
TransactionTestCase.available_apps.
Refs #30033 , #14204 , #20483 .
2018-12-22 17:47:48 -05:00
Tim Graham
d5af14aa84
Fixed #30055 -- Dropped support for SQLite < 3.8.3.
2018-12-22 16:59:28 -05:00
Simon Charette
790d108c97
Refs #30033 -- Checked constraints before committing SQLite schema changes.
...
This order of operations is more in line with SQLite's documented table
rebuild procedure and ensures that changes aren't committed if foreign key
integrity is broken.
2018-12-22 15:26:46 -05:00
Simon Charette
6b9bd0933e
Refs #29928 -- Added supports_pragma_foreign_key_check SQLite feature flag.
2018-12-22 15:14:33 -05:00
Simon Charette
f3eb1cfb58
Refs #29928 -- Corrected SQLite's can_defer_constraint_checks feature flag.
2018-12-22 15:13:46 -05:00
Simon Charette
25a0781a16
Refs #29182 -- Corrected SQLite's supports_atomic_references_rename feature flag.
2018-12-22 14:58:08 -05:00
Simon Charette
e5b8626c0e
Refs #29547 -- Corrected SQLite's supports_partial_indexes feature flag.
2018-12-22 14:51:59 -05:00
Simon Charette
20f6f9eaa1
Renamed SQLite3 references to to SQLite.
...
The version suffix isn't part of the product name.
2018-12-22 14:20:43 -05:00
Simon Charette
1939dd49d1
Fixed #29928 -- Enabled deferred constraint checks on SQLite 3.20+.
...
Refs #11665 , #14204 .
Thanks Michel Samia for the report.
2018-12-17 11:03:44 +01:00
Simon Charette
894cb13779
Refs #29182 -- Stopped relying on legacy alter table semantic on SQLite 3.26+.
...
SQLite 3.26 changed the behavior of table and column renaming operations to
repoint foreign key references even if foreign key checks are disabled.
This makes the workarounds in place to simulate this behavior unnecessary on
SQLite 3.26+. Refs #30033 .
2018-12-17 10:44:05 +01:00
Simon Charette
7289874adc
Fixed #30033 -- Conformed to the recommended table alterations procedure on SQlite3.
...
Refs #29182 .
The previous implementation was following a procedure explicitly documented
as incorrect and was the origin of the breakage experienced on SQLite 3.26
release that were addressed by c8ffdbe514
.
Thanks to Richard Hipp for pointing out the usage of the incorrect procedure.
2018-12-17 10:44:05 +01:00
Simon Charette
a939d630a4
Refs #29928 -- Implemented fast constraint checking on SQLite 3.20+.
2018-12-17 10:44:05 +01:00
Simon Charette
315357ad25
Fixed #30023 -- Prevented SQLite schema alterations while foreign key checks are enabled.
...
Prior to this change foreign key constraint references could be left pointing
at tables dropped during operations simulating unsupported table alterations
because of an unexpected failure to disable foreign key constraint checks.
SQLite3 does not allow disabling such checks while in a transaction so they
must be disabled beforehand.
Thanks ezaquarii for the report and Carlton and Tim for the review.
2018-12-15 18:51:59 -05:00
Mariusz Felisiak
f0082b9a77
Refs #28670 -- Fixed DatabaseFeatures.supports_slicing_ordering_in_compound on Oracle.
2018-12-10 12:56:09 +00:00
Simon Charette
c8ffdbe514
Fixed #29182 -- Fixed schema table alteration on SQLite 3.26+.
...
SQLite 3.26 repoints foreign key constraints on table renames even when
foreign_keys pragma is off which breaks every operation that requires
a table rebuild to simulate unsupported ALTER TABLE statements.
The newly introduced legacy_alter_table pragma disables this behavior
and restores the previous schema editor assumptions.
Thanks Florian Apolloner, Christoph Trassl, Chris Lamb for the report and
troubleshooting assistance.
2018-12-07 13:32:37 -05:00
Mariusz Felisiak
f9a33e3c3f
Fixed #29932 -- Fixed combining compound queries with sub-compound queries on SQLite and Oracle.
2018-12-06 15:31:33 -05:00
Tim Graham
88619e6129
Bumped mysqlclient requirement to >= 1.3.13.
...
There are test failures with older versions.
2018-12-06 14:49:27 -05:00
Tim Graham
284b3221a2
Fixed #30013 -- Fixed DatabaseOperations.last_executed_query() with mysqlclient 1.3.14+.
2018-12-05 14:46:23 -05:00
Mariusz Felisiak
f091ea3515
Refs #29722 -- Added introspection of materialized views for Oracle.
...
Thanks Tim Graham for the review.
2018-11-26 19:45:05 +01:00
Mariusz Felisiak
d5f4ce9849
Fixed #29949 -- Refactored db introspection identifier converters.
...
Removed DatabaseIntrospection.table_name_converter()/column_name_converter()
and use instead DatabaseIntrospection.identifier_converter().
Removed DatabaseFeatures.uppercases_column_names.
Thanks Tim Graham for the initial patch and review and Simon Charette
for the review.
2018-11-21 09:06:50 +01:00
Tim Graham
acdd18dffc
Changed BaseDatabaseSchemaEditor._effective_default() to staticmethod.
...
Follow up to 9cac10eee4
.
2018-11-20 18:01:18 -05:00
Nick Pope
ebd270627c
Refs #29722 -- Added introspection of partitions for PostgreSQL.
2018-11-19 14:06:01 -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 #29478 .
2018-11-19 08:59:46 -05:00
Tim Graham
9cac10eee4
Added BaseDatabaseSchemaEditor._effective_default() to allow testing without a connection.
2018-11-17 19:27:53 -05:00
Tim Graham
e62f6e0968
Fixed #29505 -- Removed SchemaEditor's calling of callable defaults.
...
Thanks Eugene Pakhomov for the suggested fix.
2018-11-17 19:27:53 -05:00
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