# Generated by Django 3.2.21 on 2023-09-14 12:11

from django.conf import settings
from django.db import migrations, models

from contribution.models import Premium


class Migration(migrations.Migration):
    dependencies = [
        ('contribution', '0005_alter_created_date'),
    ]

    # For MSSQL These changes were added through raw sql, to keep consistency with existing databases it couldn't be
    # changed in postgres sql script.
    operations = []
    try:
        Premium.objects.all().aggregate(sum=models.Count('source'))
    except:
        operations.append(
            migrations.AddField(
                model_name='premium',
                name='source',
                field=models.CharField(db_column="Source", max_length=50, blank=True, null=True),
            )
        )
    try:
        Premium.objects.all().aggregate(sum=models.Count('source_version'))
    except:
        operations.append(
            migrations.AddField(
                model_name='premium',
                name='source_version',
                field=models.CharField(db_column="SourceVersion", max_length=15, blank=True, null=True)
            )
        )
