mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-26 18:38:38 -06:00
Fix migrations for M2M relations to ObjectType
This commit is contained in:
parent
9ccc7d2474
commit
0b5561b391
@ -18,7 +18,7 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='customfield',
|
model_name='customfield',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='custom_fields', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='custom_fields', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='customfield',
|
model_name='customfield',
|
||||||
@ -45,7 +45,7 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='customlink',
|
model_name='customlink',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='custom_links', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='custom_links', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
migrations.RunSQL(
|
migrations.RunSQL(
|
||||||
'ALTER TABLE extras_customlink_content_types_id_seq RENAME TO extras_customlink_object_types_id_seq'
|
'ALTER TABLE extras_customlink_content_types_id_seq RENAME TO extras_customlink_object_types_id_seq'
|
||||||
@ -59,7 +59,7 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='eventrule',
|
model_name='eventrule',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='event_rules', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='event_rules', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
migrations.RunSQL(
|
migrations.RunSQL(
|
||||||
'ALTER TABLE extras_eventrule_content_types_id_seq RENAME TO extras_eventrule_object_types_id_seq'
|
'ALTER TABLE extras_eventrule_content_types_id_seq RENAME TO extras_eventrule_object_types_id_seq'
|
||||||
@ -73,7 +73,7 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='exporttemplate',
|
model_name='exporttemplate',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='export_templates', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='export_templates', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
migrations.RunSQL(
|
migrations.RunSQL(
|
||||||
'ALTER TABLE extras_exporttemplate_content_types_id_seq RENAME TO extras_exporttemplate_object_types_id_seq'
|
'ALTER TABLE extras_exporttemplate_content_types_id_seq RENAME TO extras_exporttemplate_object_types_id_seq'
|
||||||
@ -87,7 +87,7 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='savedfilter',
|
model_name='savedfilter',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='saved_filters', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='saved_filters', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
migrations.RunSQL(
|
migrations.RunSQL(
|
||||||
'ALTER TABLE extras_savedfilter_content_types_id_seq RENAME TO extras_savedfilter_object_types_id_seq'
|
'ALTER TABLE extras_savedfilter_content_types_id_seq RENAME TO extras_savedfilter_object_types_id_seq'
|
||||||
|
@ -11,6 +11,6 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='tag',
|
model_name='tag',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(blank=True, related_name='+', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(blank=True, related_name='+', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
42
netbox/extras/migrations/0131_concrete_objecttype.py
Normal file
42
netbox/extras/migrations/0131_concrete_objecttype.py
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
|
('extras', '0130_imageattachment_description'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='customfield',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(related_name='custom_fields', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='customlink',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(related_name='custom_links', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='eventrule',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(related_name='event_rules', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='exporttemplate',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(related_name='export_templates', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='savedfilter',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(related_name='saved_filters', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='tag',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(blank=True, related_name='+', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
]
|
@ -13,6 +13,6 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='objectpermission',
|
model_name='objectpermission',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='object_permissions', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='object_permissions', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
@ -27,6 +27,6 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='objectpermission',
|
model_name='objectpermission',
|
||||||
name='object_types',
|
name='object_types',
|
||||||
field=models.ManyToManyField(related_name='object_permissions', to='contenttypes.contenttype'),
|
field=models.ManyToManyField(related_name='object_permissions', to='core.objecttype'),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
17
netbox/users/migrations/0010_concrete_objecttype.py
Normal file
17
netbox/users/migrations/0010_concrete_objecttype.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
|
('users', '0009_update_group_perms'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='objectpermission',
|
||||||
|
name='object_types',
|
||||||
|
field=models.ManyToManyField(related_name='object_permissions', to='contenttypes.contenttype'),
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user