# Generated by Django 4.2.4 on 2023-09-05 04:29

import django.utils.timezone
from django.db import migrations, models

from promptgame.gameui.restrictions import migration_refresh_all_account_restrictions


class Migration(migrations.Migration):
    dependencies = [
        ("gameui", "0042_alter_account_restriction_id"),
    ]

    operations = [
        migrations.AddField(
            model_name="account",
            name="restriction_id_updated_at",
            field=models.DateTimeField(
                auto_now_add=True, default=django.utils.timezone.now
            ),
            preserve_default=False,
        ),
        # This commit also introduces a new restriction weighting system, so we want to
        # refresh all account restrictions to ensure they match the expected distribution.
        migrations.RunPython(
            migration_refresh_all_account_restrictions,
            reverse_code=lambda *args: None,
        ),
    ]
