Loading tests/schema/tests.py +2 −1 Original line number Diff line number Diff line Loading @@ -722,7 +722,7 @@ class SchemaTests(TransactionTestCase): editor.create_model(Author) old_field = Author._meta.get_field("id") new_field = IntegerField(primary_key=True) new_field = AutoField(primary_key=True) new_field.set_attributes_from_name("id") new_field.model = Author with connection.schema_editor() as editor: Loading @@ -730,6 +730,7 @@ class SchemaTests(TransactionTestCase): # This will fail if DROP DEFAULT is inadvertently executed on this # field which drops the id sequence, at least on PostgreSQL. Author.objects.create(name='Foo') Author.objects.create(name='Bar') def test_alter_int_pk_to_autofield_pk(self): """ Loading Loading
tests/schema/tests.py +2 −1 Original line number Diff line number Diff line Loading @@ -722,7 +722,7 @@ class SchemaTests(TransactionTestCase): editor.create_model(Author) old_field = Author._meta.get_field("id") new_field = IntegerField(primary_key=True) new_field = AutoField(primary_key=True) new_field.set_attributes_from_name("id") new_field.model = Author with connection.schema_editor() as editor: Loading @@ -730,6 +730,7 @@ class SchemaTests(TransactionTestCase): # This will fail if DROP DEFAULT is inadvertently executed on this # field which drops the id sequence, at least on PostgreSQL. Author.objects.create(name='Foo') Author.objects.create(name='Bar') def test_alter_int_pk_to_autofield_pk(self): """ Loading