|
|
@@ -1,27 +1,10 @@
|
|
|
-import sys
|
|
|
import uuid
|
|
|
|
|
|
import django.db.models.deletion
|
|
|
import django.db.models.lookups
|
|
|
-from django.core import management
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
|
|
|
-def reindex(apps, schema_editor):
|
|
|
- # Build the search index (except during tests)
|
|
|
- if 'test' not in sys.argv:
|
|
|
- management.call_command(
|
|
|
- 'reindex',
|
|
|
- 'circuits',
|
|
|
- 'dcim',
|
|
|
- 'extras',
|
|
|
- 'ipam',
|
|
|
- 'tenancy',
|
|
|
- 'virtualization',
|
|
|
- 'wireless',
|
|
|
- )
|
|
|
-
|
|
|
-
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
dependencies = [
|
|
|
@@ -57,8 +40,4 @@ class Migration(migrations.Migration):
|
|
|
'ordering': ('weight', 'object_type', 'object_id'),
|
|
|
},
|
|
|
),
|
|
|
- migrations.RunPython(
|
|
|
- code=reindex,
|
|
|
- reverse_code=migrations.RunPython.noop
|
|
|
- ),
|
|
|
]
|