| Age | Commit message (Collapse) | Author |
|
Backport of f6018c1e63a04e0c12e2ca759e76e05ccf5e09de from main
|
|
values with Unicode chars.
Backport of 3c75f1f3cac7985e8a134fc1c33eb6e01639a04b from main
|
|
'postgres' database.
Thanks Kazantcev Andrey for the report.
Regression in f48f671223a20b161ca819cf7d6298e43b8ba5fe.
Backport of f131841c601b9d4884adcdb284b4213c2ad89231 from master
|
|
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.
Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
|
|
|
|
SQL keywords.
|
|
Test isolation failure observed on CockroachDB and PostgreSQL.
|
|
failures.
Co-authored-by: Tim Graham <timograham@gmail.com>
|
|
on SQLite.`
Regression in 6789ded0a6ab797f0dcdfa6ad5d1cfa46e23abcd.
Thanks Juan Garcia Alvite for the report.
|
|
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
|
|
|
|
|
|
are disabled.
Thanks Jaap Roes for the report.
|
|
|
|
on PostgreSQL.
Thanks Marc Debureaux for the report.
Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.
|
|
Fixed inner imports per isort 5.
isort 5.0.0 to 5.1.0 was unstable.
|
|
NO_AUTO_VALUE_ON_ZERO SQL mode is enabled.
|
|
This removes also unused DatabaseOperations.date_interval_sql().
|
|
The method has been available since Python 3.6. The shorter syntax is
also marginally faster.
|
|
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael
Michel for mentoring this Google Summer of Code 2019 project and
everyone else who helped with the patch.
Special thanks to Mads Jensen, Nick Pope, and Simon Charette for
extensive reviews.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
|
|
|
|
Using unittest.TestCase doesn't work properly when we perform db
queries. Moreover introspection is extremely slow on Oracle without
limiting models to a "backends" app.
Follow up to 8bcca47e8356521f52f0738d9633befd53007cae.
|
|
|
|
|
|
DatabaseOperations.execute_sql_flush().
|
|
execute_sql_flush().
|
|
PostgreSQL.
The sql_flush() positional argument sequences is replaced by the boolean
keyword-only argument reset_sequences. This ensures that the old
function signature can't be used by mistake when upgrading Django. When
the new argument is True, the sequences of the truncated tables will
reset. Using a single boolean value, rather than a list, allows making a
binary yes/no choice as to whether to reset all sequences rather than a
working on a completely different set.
|
|
|
|
|
|
and natural keys for tests.
Made deserialize_db_from_string() do not sort dependencies.
deserialize_db_from_string() doesn't use natural keys, so there is no
need to sort dependencies in serialize_db_to_string(). Moreover,
sorting models cause issues for circular dependencies.
|
|
objects.
|
|
|
|
|
|
|
|
Using Person in test_introspection caused removing constraints in
intermediate table for ManyToManyField in
VeryLongModelNameZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ that were
expected by other transaction tests. A model without any constraints
was used to prevent isolation issues.
|
|
Regression in 98f23a8af0be7e87535426c5c83058e2682bfdf8.
|
|
This caused misplacing parameters in logged SQL queries.
Regression in 79065b55a70cd220820a260a1c54851b7be0615a.
Thanks Hans Aarne Liblik for the report.
|
|
and no DISTINCT on SQLite.
Regression in bc05547cd8c1dd511c6b6a6c873a1bc63417b111.
Thanks Andy Terra for the report.
|
|
data for tests.
deserialize_db_from_string() loads the full serialized database
contents, which might contain forward references and cycles. That
caused IntegrityError because constraints were checked immediately.
Now, it loads data in a transaction with constraint checks deferred
until the end of the transaction.
|
|
|
|
It is now a method instead of a property and returns a context manager
that yields a cursor on entry and closes the cursor and connection upon
exit.
|
|
|
|
- Used selected "databases" instead of django.db.connections.
- Made routers in tests.migrations skip migrations on unexpected
databases.
- Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook
which properly asserts messages about skipped databases.
|
|
Previously, this test could modify global state by changing
connection.settings_dict. This dict is a reference to the same dict as
django.db.connections.databases['default'], which is thus also changed.
The cleanup of this test would replace connection.settings_dic` with a
saved copy, which would leave the dict itself modified.
Additionally, create_test_db() would also modify these same dicts, as
well as settings.databases['default']['NAME'] by adding a "test_"
prefix, which is what can cause problems later.
This patch:
- makes a complete copy of the connection and work on that, to improve
isolation.
- calls destroy_test_db() to let that code clean up anything done by
create_test_db().
|
|
|
|
|
|
name is provided.
Previously, the same signature was created for multiple in-memory
databases on SQLite when they had tests databases names
DATABASES['TEST']['NAME'].
|
|
database creation.
|
|
|
|
PostgreSQL.
Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and
Mariusz Felisiak for reviews.
|