mirror of
https://github.com/django/django.git
synced 2025-08-03 02:23:12 +00:00
Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when migrating away from AutoField.
This commit is contained in:
parent
b312421511
commit
ea880ec233
3 changed files with 29 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue