dr.botzo/dr_botzo/dispatch/migrations/0002_auto_20150619_1124.py
Brian S. Stephan 4f717cb1c2 dispatch: break Dispatcher actions into 2nd model
decouple the dispatcher (a key, basically) with the actions to take upon
receiving such a message. allows us to have multiple actions for one key
without weird hacks
2015-06-19 11:29:00 -05:00

36 lines
1.0 KiB
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dispatch', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='DispatcherAction',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('type', models.CharField(max_length=16, choices=[(b'privmsg', b'IRC privmsg'), (b'file', b'Write to file')])),
('destination', models.CharField(max_length=200)),
],
),
migrations.RemoveField(
model_name='dispatcher',
name='destination',
),
migrations.RemoveField(
model_name='dispatcher',
name='type',
),
migrations.AddField(
model_name='dispatcheraction',
name='dispatcher',
field=models.ForeignKey(to='dispatch.Dispatcher'),
),
]