1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00
Commit Graph

32 Commits

Author SHA1 Message Date
Jacob Walls
58cc91275a
Fixed #35308 -- Handled OSError when launching code formatters.
Co-authored-by: Natalia <124304+nessita@users.noreply.github.com>
2024-11-29 09:04:48 -03:00
Adam Johnson
f5ddd54986 Fixed #35704 -- Fixed reduction for AddIndex subclasses. 2024-09-03 12:51:06 +02:00
Sarah Boyce
3dac3271d2 Reverted "Fixed #28646 -- Prevented duplicate index when unique is set to True on PostgreSQL."
This reverts commit 9cf9c796be due to a crash on Oracle
as it didn't allow multiple indexes on the same field.
2024-08-01 09:25:33 +02:00
Ben Cail
9cf9c796be Fixed #28646 -- Prevented duplicate index when unique is set to True on PostgreSQL. 2024-07-30 17:27:10 +02:00
Mariusz Felisiak
2abf417c81 Refs #27236 -- Removed Meta.index_together per deprecation timeline. 2023-09-18 22:12:40 +02:00
Ian Foote
7414704e88 Fixed #470 -- Added support for database defaults on fields.
Special thanks to Hannes Ljungberg for finding multiple implementation
gaps.

Thanks also to Simon Charette, Adam Johnson, and Mariusz Felisiak for
reviews.
2023-05-12 19:11:40 +02:00
kimsoungryoul
78f163a4fb Fixed #18468 -- Added support for comments on columns and tables.
Thanks Jared Chung, Tom Carrick, David Smith, Nick Pope, and Mariusz
Felisiak for reviews.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
2022-12-28 06:28:07 +01:00
David Wobrock
a6385b382e
Fixed #27236 -- Deprecated Meta.index_together in favor of Meta.indexes.
This also deprecates AlterIndexTogether migration operation.
2022-07-12 09:04:31 +02:00
David Wobrock
aca9bb2a12 Fixed #33413 -- Made migrations propage collations to related fields. 2022-05-02 08:13:38 +02:00
Mariusz Felisiak
a65547c04a
Fixed tests on databases that don't support introspecting foreign keys. 2022-04-13 11:52:40 +02:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Hannes Ljungberg
83fcfc9ec8 Fixed #26167 -- Added support for functional indexes.
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.

Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2021-01-13 11:47:50 +01:00
Tim Graham
84ca7b8602
Removed hardcoded pks in migrations' test_alter_order_with_respect_to. 2020-11-07 20:26:01 +01:00
David Wobrock
533b208775 Fixed #29224 -- Fixed removing index_together indexes if exists unique_together constraint on the same fields. 2020-04-23 12:28:51 +02:00
Matthijs Kooijman
2a2ea4ee18 Refs #31117 -- Made various tests properly handle unexpected databases aliases.
- 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.
2020-01-20 14:39:02 +01:00
Nick Pope
7552de7866 Used more specific unittest assertions in tests.
* assertIsNone()/assertIsNotNone() instead of comparing to None.
* assertLess() for < comparisons.
* assertIs() for 'is' expressions.
* assertIsInstance() for isinstance() expressions.
* rounding of assertAlmostEqual() for round() expressions.
* assertIs(..., True/False) instead of comparing to True/False.
* assertIs()/assertIsNot() for ==/!= comparisons.
* assertNotEqual() for == comparisons.
* assertTrue()/assertFalse() instead of comparing to True/False.
2019-10-29 12:37:30 +01:00
Mads Jensen
85ac838d9e Fixed #21039 -- Added AddIndexConcurrently/RemoveIndexConcurrently operations for PostgreSQL.
Thanks to Simon Charettes for review.

Co-Authored-By: Daniel Tao <daniel.tao@gmail.com>
2019-08-21 13:10:06 +02:00
Mads Jensen
b10d322c41 Moved migrations.test_operations.OperationTestBase to migrations.test_base.
Co-Authored-By: Daniel Tao <daniel.tao@gmail.com>
2019-08-19 16:06:14 +02:00
Simon Charette
8c775391b7 Refs #28478 -- Deprecated TestCase's allow_database_queries and multi_db in favor of databases. 2019-01-10 19:11:21 -05:00
Ian Foote
952f05a6db Fixed #11964 -- Added support for database check constraints. 2018-07-10 15:32:33 -04:00
Tim Graham
ab83d4d8fe Added multi_db=True to test cases that access the 'other' db connection.
Fixed a failure in the context processors tests when running in
reverse on MySQL due to an extra query after refs #27683.
2017-02-10 08:19:32 -05:00
Chillar Anand
6478e07a62 Refs #23919 -- Replaced tempfile.mkdtemp() with TemporaryDirectory() context manager. 2017-01-26 13:54:16 -05:00
Mads Jensen
ebf34c3cdc Removed unused variables that are overwritten. 2017-01-25 09:14:05 -05:00
Scott Sexton
fc584f0685 Fixed #26117 -- Consulted database routers in initial migration detection.
Thanks Simon Charette for help.
2016-02-25 09:56:00 -05:00
Carl Meyer
335fc44f68 Improved isolation of applied-migrations table in migration tests. 2015-06-02 16:14:02 -06:00
Aymeric Augustin
903d1a57ab Made migrations tests write to a temporary directory.
This is preferrable to writing in the current working directory because
it eliminates the risk to leak unwanted files, which can result in very
weird test failures.

Also this will help if we ever try to run these tests concurrently.
2015-02-23 22:22:58 +01:00
Carl Meyer
47b7f601ee Fixed #23872 -- Removed sensitivity of migrations tests to CWD. 2014-11-19 15:03:47 -07:00
Claude Paroz
2a1bdf5ced Called table_names instead of get_table_list in migrations 2014-09-23 20:13:31 +02:00
Andrew Godwin
4ce7a6bc84 Fixed #22750, #22248: Model renaming now also alters field FKs 2014-06-07 18:18:02 -07:00
Michael Manfre
3ffeb93186 Ensure cursors are closed when no longer needed.
This commit touchs various parts of the code base and test framework. Any
found usage of opening a cursor for the sake of initializing a connection
has been replaced with 'ensure_connection()'.
2014-02-02 12:47:21 -05:00
Andrew Godwin
ac45f9c9c5 Fix some small errors in the tests 2013-08-23 12:07:43 +01:00
Andrew Godwin
00276e0414 Add tests for the migrate command and fix a bug they exposed 2013-07-25 13:52:35 +01:00