# Generated by Django 2.2.12 on 2020-05-19 00:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('builds', '0022_migrate_protected_versions'),
        ('projects', '0048_remove_version_privacy_field'),
    ]

    operations = [
        migrations.CreateModel(
            name='PageView',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('path', models.CharField(max_length=4096)),
                ('view_count', models.PositiveIntegerField(default=0)),
                ('date', models.DateField(db_index=True, default=datetime.date.today)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='page_views', to='projects.Project')),
                ('version', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='page_views', to='builds.Version', verbose_name='Version')),
            ],
            options={
                'unique_together': {('project', 'version', 'path', 'date')},
            },
        ),
    ]
