mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when migrating away from AutoField.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b312421511
commit
ea880ec233
@@ -677,6 +677,11 @@ class SchemaTests(TransactionTestCase):
|
||||
new_field.model = Author
|
||||
with connection.schema_editor() as editor:
|
||||
editor.alter_field(Author, old_field, new_field, strict=True)
|
||||
# Now that ID is an IntegerField, the database raises an error if it
|
||||
# isn't provided.
|
||||
if not connection.features.supports_unspecified_pk:
|
||||
with self.assertRaises(DatabaseError):
|
||||
Author.objects.create()
|
||||
|
||||
def test_alter_auto_field_to_char_field(self):
|
||||
# Create the table
|
||||
|
||||
Reference in New Issue
Block a user