Add missing migration for tags fields

The initial migrations declared tags as a plain ManyToManyField, while NetBoxModel uses a TaggableManager via extras.TaggedItem. Align the migration state. Verified with NetBox 4.7.2. Bump version to 0.12.1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
MrBlakeandClaude Opus 5.5 committed 2026-10-13 14:13:27 +02:00
1 parent f7e1e21c24
commit 80a0e44bad
3 files changed
+52 -2

No files matched your search

@@ -0,0 +1,50 @@
# Generated by Django 6.1.1 on 2026-10-13 12:06
import taggit.managers
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('netbox_documentation', '0005_document_tenancy'),
]
operations = [
migrations.RemoveField(
model_name='document',
name='tags',
),
migrations.RemoveField(
model_name='documentassignment',
name='tags',
),
migrations.RemoveField(
model_name='documentattachment',
name='tags',
),
migrations.RemoveField(
model_name='documentcategory',
name='tags',
),
migrations.AddField(
model_name='document',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
migrations.AddField(
model_name='documentassignment',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
migrations.AddField(
model_name='documentattachment',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
migrations.AddField(
model_name='documentcategory',
name='tags',
field=taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag'),
),
]