from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('api_auth', '0001_initial'),
        ('alerts', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='alertflavor',
            name='allowed_tokens',
            field=models.ManyToManyField(help_text='Tokens that are permitted to emit this flavor', to='api_auth.Token'),
            preserve_default=True,
        ),
    ]

from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('api_auth', '0001_initial'),
        ('alerts', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='alertflavor',
            name='allowed_tokens',
            field=models.ManyToManyField(help_text='Tokens that are permitted to emit this flavor', to='api_auth.Token', blank=True),
            preserve_default=True,
        ),
    ]

Fix migration for fixing AlertFlavor.allowed_tokens
Fix migration for fixing AlertFlavor.allowed_tokens

Recently, I changed AlertFlavor.allowed_tokens so that you could create
a flavor without specifying the tokens that go with it (i.e. I added
blank=True).

The resulting migration for that change does a bunch of SQL, but doesn't
actually change the db.

So I'm tweaking the last exsiting migration rather than creating a new
migration that does a bunch of stuff to do nothing.

  from __future__ import unicode_literals
  
  from django.db import models, migrations
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('api_auth', '0001_initial'),
          ('alerts', '0001_initial'),
      ]
  
      operations = [
          migrations.AddField(
              model_name='alertflavor',
              name='allowed_tokens',
-             field=models.ManyToManyField(help_text='Tokens that are permitted to emit this flavor', to='api_auth.Token'),
+             field=models.ManyToManyField(help_text='Tokens that are permitted to emit this flavor', to='api_auth.Token', blank=True),
              preserve_default=True,
          ),
      ]
  
Fix migration for fixing AlertFlavor.allowed_tokens
## Code Before:
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('api_auth', '0001_initial'),
        ('alerts', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='alertflavor',
            name='allowed_tokens',
            field=models.ManyToManyField(help_text='Tokens that are permitted to emit this flavor', to='api_auth.Token'),
            preserve_default=True,
        ),
    ]

## Instruction:
Fix migration for fixing AlertFlavor.allowed_tokens
## Code After:
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

    dependencies = [
        ('api_auth', '0001_initial'),
        ('alerts', '0001_initial'),
    ]

    operations = [
        migrations.AddField(
            model_name='alertflavor',
            name='allowed_tokens',
            field=models.ManyToManyField(help_text='Tokens that are permitted to emit this flavor', to='api_auth.Token', blank=True),
            preserve_default=True,
        ),
    ]
