# Generated by Django 3.1.7 on 2023-10-04 06:17

import django.db.models.deletion
from django.db import migrations, models

import django_extrafields.models


class Migration(migrations.Migration):

    dependencies = [
        ("community", "0023_add_decompilation_visibility_option"),
    ]

    operations = [
        migrations.CreateModel(
            name="CommunityAggregatedFields",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("datetime_created", models.DateTimeField(auto_now_add=True)),
                ("datetime_updated", models.DateTimeField(auto_now=True)),
                ("download_count", models.PositiveIntegerField(default=0)),
                ("package_count", models.PositiveIntegerField(default=0)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.AddField(
            model_name="community",
            name="aggregated_fields",
            field=django_extrafields.models.SafeOneToOneOrField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="community.communityaggregatedfields",
            ),
        ),
    ]
