# Generated by Django 4.1.3 on 2023-02-15 15:07

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='MaterializedViewRefreshLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('updated_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('duration', models.DurationField(null=True)),
                ('failed', models.BooleanField(default=False)),
                ('view_name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='MaterializedViewMigrations',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('applied', models.DateTimeField(auto_now_add=True)),
                ('app', models.CharField(max_length=255)),
                ('view_name', models.CharField(max_length=255)),
                ('hash', models.CharField(max_length=255)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.AddConstraint(
            model_name='materializedviewmigrations',
            constraint=models.UniqueConstraint(condition=models.Q(('deleted', False)), fields=('app', 'view_name'), name='one_active_view_per_model'),
        ),
    ]
