Commit 6ef216e0 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by gracedb-dev1

adding O2VirgoTest search for HLV events during ER12

parent b635135f
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
SEARCH = {'name': 'O2VirgoTest',
'description': 'Testing 3-IFO pipelines for adding Virgo in O2'
def add_search(apps, schema_editor):
Search = apps.get_model('gracedb','Search')
new_search, created = Search.objects.get_or_create(name=SEARCH['name'])
if created:
for key in SEARCH.keys():
setattr(new_search, key, SEARCH[key])
def remove_search(apps, schema_editor):
Search = apps.get_model('gracedb','Search')
class Migration(migrations.Migration):
dependencies = [
('gracedb', '0021_event_offline'),
operations = [
migrations.RunPython(add_search, remove_search),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment