Changes between Version 1 and Version 2 of Ticket #33932, comment 6


Ignore:
Timestamp:
Aug 17, 2022, 5:39:28 AM (20 months ago)
Author:
Mariusz Felisiak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33932, comment 6

    v1 v2  
    11Great!, I created a regression test inspired by your migrations:
    22{{{#!diff
     3diff --git a/tests/schema/tests.py b/tests/schema/tests.py
     4index 9e2385f5d8..c5beb18304 100644
     5--- a/tests/schema/tests.py
     6+++ b/tests/schema/tests.py
     7@@ -1588,6 +1588,28 @@ class SchemaTests(TransactionTestCase):
     8         # OneToOneField.
     9         self.assertEqual(counts, {"fks": expected_fks, "uniques": 1, "indexes": 0})
     10 
    311+    def test_autofield_to_o2o(self):
    412+        with connection.schema_editor() as editor:
     
    2230+            field_type, connection.features.introspected_field_types["IntegerField"]
    2331+        )
    24 
     32+
     33     def test_alter_field_fk_keeps_index(self):
     34         with connection.schema_editor() as editor:
     35             editor.create_model(Author)
    2536}}}
Back to Top