mirror of
https://github.com/django/django.git
synced 2025-07-20 01:29:11 +00:00
Backport of d81d02d449edd046a94de5f171f4ae87fa331c7d from master
This commit is contained in:
parent
9956d89fa2
commit
5c1944f918
@ -1819,15 +1819,13 @@ class SchemaTests(TransactionTestCase):
|
|||||||
['schema_tag_slug_2c418ba3_like', 'schema_tag_slug_key']
|
['schema_tag_slug_2c418ba3_like', 'schema_tag_slug_key']
|
||||||
)
|
)
|
||||||
|
|
||||||
@unittest.skipIf(
|
|
||||||
connection.vendor == 'mysql' and connection.mysql_version < (5, 6, 6),
|
|
||||||
'Skip known bug renaming primary keys on older MySQL versions (#24995).'
|
|
||||||
)
|
|
||||||
def test_alter_pk_with_self_referential_field(self):
|
def test_alter_pk_with_self_referential_field(self):
|
||||||
"""
|
"""
|
||||||
Changing the primary key field name of a model with a self-referential
|
Changing the primary key field name of a model with a self-referential
|
||||||
foreign key (#26384).
|
foreign key (#26384).
|
||||||
"""
|
"""
|
||||||
|
if connection.vendor == 'mysql' and connection.mysql_version < (5, 6, 6):
|
||||||
|
self.skipTest('Skip known bug renaming primary keys on older MySQL versions (#24995).')
|
||||||
old_field = Node._meta.get_field('node_id')
|
old_field = Node._meta.get_field('node_id')
|
||||||
new_field = AutoField(primary_key=True)
|
new_field = AutoField(primary_key=True)
|
||||||
new_field.set_attributes_from_name('id')
|
new_field.set_attributes_from_name('id')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user