summaryrefslogtreecommitdiff
path: root/django/db/backends/base/creation.py
AgeCommit message (Collapse)Author
2026-01-14Fixed #35402 -- Fixed crash in DatabaseFeatures.django_test_skips when ↵Jacob Walls
running a subset of tests. Thanks Tim Graham for the report and the review.
2026-01-03Added DatabaseCreation.destroy_test_db_connection_close_method hook.Tim Graham
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-03-17Fixed #34865 -- Released memory earlier than garbage collection on database ↵fowczrek
wrapping layers. Thank you Florian Apolloner, Jake Howard and Patryk Zawadzki for the clarifying comments and reviews.
2025-02-16Refs #35967 -- Deprecated BaseDatabaseCreation.create_test_db(serialize).Simon Charette
Given there are no longer any internal usages of serialize=True and it poses a risk to non-test databases integrity it seems appropriate to deprecate it.
2024-02-20Fixed #35238 -- Fixed database serialization crash when base managers use ↵AlexCLeduc
prefetch_related(). Regression in 139135627650ed6aaaf4c755b82c3bd43f2b8f51 following deprecation in eedbf930287cb72e9afab1f7208c24b1146b0c4ec.
2023-02-01Refs #33476 -- Applied Black's 2023 stable style.David Smith
Black 23.1.0 is released which, as the first release of the year, introduces the 2023 stable style. This incorporates most of last year's preview style. https://github.com/psf/black/releases/tag/23.1.0
2022-03-04Refs #31169 -- Prevented infinite loop in tests on failures.Mariusz Felisiak
Regression in ae91ecf6a1037fb67d14841b66ac19d4c2ccc4ac.
2022-02-23Refs #31169 -- Added DatabaseCreation.setup_worker_connection() hook.Valz
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2022-01-25Refs #20349 -- Avoided loading testing libraries when not needed.Collin Anderson
2020-12-10Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani
failures. Co-authored-by: Tim Graham <timograham@gmail.com>
2020-11-11Fixed #31762 -- Made reloading the database for tests use the base manager.Hasan Ramezani
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
2020-09-23Fixed #32012 -- Made test database creation sync apps models when migrations ↵Mariusz Felisiak
are disabled. Thanks Jaap Roes for the report.
2020-04-17Refs #26552 -- Made reloading the database for tests check only loaded ↵Mariusz Felisiak
tables constraints.
2020-04-02Refs #31051 -- Optimized serialize_db_to_string() by avoiding creation of ↵Matthijs Kooijman
models list.
2020-04-02Refs #31051 -- Fixed reloading the database with circular related objects ↵Matthijs Kooijman
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.
2020-02-14Fixed #26552 -- Deferred constraint checks when reloading the database with ↵Matthijs Kooijman
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.
2020-02-06Refs #31233 -- Changed DatabaseWrapper._nodb_connection to _nodb_cursor().Jon Dufresne
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.
2019-11-20Fixed #25388 -- Added an option to allow disabling of migrations during test ↵Jon Dufresne
database creation.
2019-02-13Fixed #30184 -- Removed ellipsis characters from shell output strings.Dan Davis
Partially reverted 50b8493581fea3d7137dd8db33bac7008868d23a (refs #29654) to avoid a crash when the user shell doesn't support non-ASCII characters.
2018-08-28Refs #29654 -- Replaced three dots with ellipsis in DB creation output strings.Jon Dufresne
2018-08-22Refs #29654 -- Replaced three dots with ellipsis character in output strings.Claude Paroz
2018-07-19Fixed #29040 -- Made test database creation messages use a consistent output ↵Claude Paroz
stream.
2018-02-26Refs #28909 -- Simplifed code using unpacking generalizations.Mariusz Felisiak
2017-09-11Fixed #28578 -- Renamed DatabaseCreation number arguments to suffix.Jon Dufresne
2017-04-10Fixed #25406 -- Removed exception hiding in PostgreSQL test database ↵Mariusz Felisiak
creation during --keepdb. Thanks Markus Holtermann and Tim Graham for reviews.
2017-02-28Refs #27656 -- Updated django.db docstring verbs according to PEP 257.Anton Samarchyan
2017-02-23Refs #23919 -- Used yield from.Vytis Banaitis
2017-01-19Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette
2017-01-18Refs #23919 -- Removed most of remaining six usageClaude Paroz
Thanks Tim Graham for the review.
2017-01-06Fixed #27690 -- Removed time.sleep(1) before dropping the test database.David Szotten
Uncertain if this is needed, but no failures have appeared so far.
2016-05-17Fixed #14415 -- Used the test database name in ↵boaz85@gmail.com
BaseDatabaseCreation.test_db_signature().
2015-09-25Fixed #25196 -- Normalized database representations in test database messages.Ville Skyttä
Left over Oracle mostly as-is since it's more complicated.
2015-09-09Cloned databases for running tests in parallel.Aymeric Augustin
2015-09-05Updated references to the TEST_* database settings.Aymeric Augustin
They were removed in Django 1.9. I could leave the reference to TEST_DEPENDENCIES in the 1.2.4 release notes because the link points to the right location and the name was accurate at the time.
2015-06-05Fixed #19542: Made mirroring databases for tests work with OracleShai Berger
No tests are provided because there is no sane way to test database settings within the Django test suite. Thanks Aymeric Augustin for review.
2015-05-15Fixed #24791 -- Added fallback when 'postgres' database isn't availableClaude Paroz
Thanks Carl Meyer and Tim Graham for the reviews.
2015-04-18Fixed #23879 -- Allowed model migration skip based on feature/vendorClaude Paroz
Thanks Carl Meyer for the report and review, and Tim Graham for the review.
2015-02-20Fixed #24351, #24346 -- Changed the signature of allow_migrate().Loic Bistuer
The new signature enables better support for routing RunPython and RunSQL operations, especially w.r.t. reusable and third-party apps. This commit also takes advantage of the deprecation cycle for the old signature to remove the backward incompatibility introduced in #22583; RunPython and RunSQL won't call allow_migrate() when when the router has the old signature. Thanks Aymeric Augustin and Tim Graham for helping shape up the patch. Refs 22583.
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-20Fixed typos in code comments.Adam Taylor
2015-01-18Removed obsolete SQL generation methods.Tim Graham
2015-01-18Removed support for syncing apps without migrations per deprecation timeline.Tim Graham
Kept support for creating models without migrations when running tests (especially for Django's test suite).
2015-01-17Removed support for custom SQL per deprecation timeline.Tim Graham
2015-01-14Fixed #22603 -- Reorganized classes in django.db.backends.Tim Graham