diff --git a/docs/user_docs/source/models.rst b/docs/user_docs/source/models.rst index 96825c0efab7d8361542b3e13affbd644678a7c6..66fa0ddfd5da41288c0fdfca43fa79220c758ba7 100644 --- a/docs/user_docs/source/models.rst +++ b/docs/user_docs/source/models.rst @@ -14,7 +14,7 @@ The different types of events in GraceDB are distinguished by the following para - ``Pipeline``: the data analysis software tool used make the detection - values: ``MBTAOnline``, ``CWB``, ``CWB2G``, ``gstlal``, ``spiir``, ``HardwareInjection``, ``Fermi``, ``Swift``, ``SNEWS``, ``oLIB`` - ``Search``: the search activity which led to the detection - - values: ``AllSky``, ``AllSkyLong``, ``LowMass``, ``HighMass``, ``GRB``, ``Supernova``, ``MDC`` + - values: ``AllSky``, ``AllSkyLong``, ``LowMass``, ``HighMass``, ``GRB``, ``Supernova``, ``MDC``, ``BBH`` An individual "event stream" is specified by setting the values of these three parameters. For example, choosing ``Group=CBC``, ``Pipeline=gstlal``, and ``Search=LowMass`` selects the event stream consisting of low-mass inspiral events detected by the gstlal pipeline from the CBC group. diff --git a/gracedb/events/migrations/0029_create_bbh_search.py b/gracedb/events/migrations/0029_create_bbh_search.py new file mode 100644 index 0000000000000000000000000000000000000000..29e9d63f215a670db9fedbb9f0301800aeb58ada --- /dev/null +++ b/gracedb/events/migrations/0029_create_bbh_search.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.16 on 2018-12-12 16:48 +from __future__ import unicode_literals + +from django.db import migrations + + +SEARCH_NAME = 'BBH' + +def create_search(apps, schema_editor): + Search = apps.get_model('events', 'Search') + + # Use get_or_create so that if the migration is unapplied + # then reapplied, we don't end up with multiples, since the + # name doesn't have to be unique (??, probably should be) + Search.objects.get_or_create(name=SEARCH_NAME) + + +class Migration(migrations.Migration): + + dependencies = [ + ('events', '0028_make_labels_protected'), + ] + + operations = [ + migrations.RunPython(create_search, migrations.RunPython.noop), + ]