1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #15605: Account for older sequence name in migration

This commit is contained in:
Jeremy Stretch
2024-04-08 09:59:24 -04:00
parent c7f6c206cf
commit 89453a49d6

View File

@ -27,7 +27,11 @@ class Migration(migrations.Migration):
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='core.objecttype'), field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='core.objecttype'),
), ),
migrations.RunSQL( migrations.RunSQL(
"ALTER TABLE extras_customfield_content_types_id_seq RENAME TO extras_customfield_object_types_id_seq" "ALTER TABLE IF EXISTS extras_customfield_content_types_id_seq RENAME TO extras_customfield_object_types_id_seq"
),
# Pre-v2.10 sequence name (see #15605)
migrations.RunSQL(
"ALTER TABLE IF EXISTS extras_customfield_obj_type_id_seq RENAME TO extras_customfield_object_types_id_seq"
), ),
# Custom links # Custom links