From 70228aa7368ab339eb51808a26a09f11b65b3ee4 Mon Sep 17 00:00:00 2001 From: Tanner Prestegard <tanner.prestegard@ligo.org> Date: Tue, 11 Jun 2019 15:05:06 -0500 Subject: [PATCH] Add SubGRB search for sub-threshold Fermi GRB triggers --- .../migrations/0034_add_subgrb_search.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gracedb/events/migrations/0034_add_subgrb_search.py 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 000000000..5c4b588b6 --- /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), + ] -- GitLab