diff --git a/gracedb/events/migrations/0034_add_subgrb_search.py b/gracedb/events/migrations/0034_add_subgrb_search.py new file mode 100644 index 0000000000000000000000000000000000000000..5c4b588b6b0e433dffa4508425b72e3a165ed9df --- /dev/null +++ b/gracedb/events/migrations/0034_add_subgrb_search.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.20 on 2019-06-11 20:04 +from __future__ import unicode_literals + +from django.db import migrations + +# Creates initial search instances + +# Search names and descriptions +SEARCH = { + 'name': 'SubGRB', + 'description': 'Sub-threshold GRB events', +} + +def add_search(apps, schema_editor): + Search = apps.get_model('events', 'Search') + + # Create search + Search.objects.create(**SEARCH) + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0033_pipelinelog_and_pipeline_enabled'), + ] + + operations = [ + migrations.RunPython(add_search, migrations.RunPython.noop), + ]