datatracker/ietf/doc/migrations/0004_add_draft_stream_replaced_states.py
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00

31 lines
916 B
Python

# Copyright The IETF Trust 2018-2020, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-03 11:50
from django.db import migrations
def forward(apps, schema_editor):
State = apps.get_model('doc','State')
for type_id in ('draft-stream-iab','draft-stream-ise','draft-stream-irtf'):
State.objects.create(type_id=type_id,
slug='repl',
name='Replaced',
desc='Replaced',
)
def reverse(apps, schema_editor):
State = apps.get_model('doc','State')
State.objects.filter(type_id__in=('draft-stream-iab','draft-stream-ise','draft-stream-irtf'), slug='repl').delete()
class Migration(migrations.Migration):
dependencies = [
('doc', '0003_auto_20180401_1231'),
]
operations = [
migrations.RunPython(forward,reverse)
]