# Generated by Django 3.1.2 on 2020-10-09 22:54

from django.db import migrations, models


def set_active(apps, schema_editor):
    Player = apps.get_model('loot', 'Player')
    db_alias = schema_editor.connection.alias
    # Player.Ranks.INACTIVE = 0
    Player.objects.using(db_alias).filter(rank=0).update(is_active=False)


class Migration(migrations.Migration):

    dependencies = [
        ('loot', '0010_auto_20201007_1921'),
    ]

    operations = [
        migrations.AddField(
            model_name='player',
            name='is_active',
            field=models.BooleanField(default=True),
        ),
        migrations.RunPython(set_active),
    ]
