mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
#10560: Build search index as part of migration
This commit is contained in:
parent
1b707e07f2
commit
94dd07e1e6
@ -10,7 +10,7 @@ class Migration(migrations.Migration):
|
|||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('ipam', '0063_standardize_description_comments'),
|
('ipam', '0063_standardize_description_comments'),
|
||||||
('extras', '0083_savedfilter'),
|
('extras', '0082_savedfilter'),
|
||||||
('tenancy', '0009_standardize_description_comments'),
|
('tenancy', '0009_standardize_description_comments'),
|
||||||
('dcim', '0165_standardize_description_comments'),
|
('dcim', '0165_standardize_description_comments'),
|
||||||
]
|
]
|
||||||
|
@ -12,7 +12,7 @@ class Migration(migrations.Migration):
|
|||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
('extras', '0080_search'),
|
('extras', '0079_jobresult_scheduled_time'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -12,7 +12,7 @@ class Migration(migrations.Migration):
|
|||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
('extras', '0081_customlink_content_types'),
|
('extras', '0080_customlink_content_types'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -10,7 +10,7 @@ class Migration(migrations.Migration):
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
('extras', '0082_exporttemplate_content_types'),
|
('extras', '0081_exporttemplate_content_types'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
@ -1,13 +1,28 @@
|
|||||||
from django.db import migrations, models
|
import sys
|
||||||
import django.db.models.deletion
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
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')
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
('circuits', '0041_standardize_description_comments'),
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
('extras', '0079_jobresult_scheduled_time'),
|
('dcim', '0166_virtualdevicecontext'),
|
||||||
|
('extras', '0082_savedfilter'),
|
||||||
|
('ipam', '0063_standardize_description_comments'),
|
||||||
|
('tenancy', '0009_standardize_description_comments'),
|
||||||
|
('virtualization', '0034_standardize_description_comments'),
|
||||||
|
('wireless', '0008_wirelesslan_status'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
@ -32,4 +47,8 @@ class Migration(migrations.Migration):
|
|||||||
'ordering': ('weight', 'object_type', 'object_id'),
|
'ordering': ('weight', 'object_type', 'object_id'),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
migrations.RunPython(
|
||||||
|
code=reindex,
|
||||||
|
reverse_code=migrations.RunPython.noop
|
||||||
|
),
|
||||||
]
|
]
|
@ -8,7 +8,7 @@ class Migration(migrations.Migration):
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
('contenttypes', '0002_remove_content_type_name'),
|
('contenttypes', '0002_remove_content_type_name'),
|
||||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
('extras', '0083_savedfilter'),
|
('extras', '0083_search'),
|
||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
|
Loading…
Reference in New Issue
Block a user