# Generated by Django 3.2.12 on 2022-04-02 18:57

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import filer.fields.image
import mptt.fields


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
        ('contenttypes', '0002_remove_content_type_name'),
        ('simpel_pages', '0002_auto_20220402_0304'),
    ]

    operations = [
        migrations.RenameField(
            model_name='page',
            old_name='text',
            new_name='content',
        ),
        migrations.AddField(
            model_name='page',
            name='thumbnail',
            field=filer.fields.image.FilerImageField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='simpelpages', to=settings.FILER_IMAGE_MODEL),
        ),
        migrations.AddField(
            model_name='page',
            name='visitor_count',
            field=models.IntegerField(default=0),
        ),
        migrations.AlterField(
            model_name='page',
            name='category',
            field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='pages', to='simpel_pages.category', verbose_name='Category'),
        ),
        migrations.AlterField(
            model_name='page',
            name='parent',
            field=mptt.fields.TreeForeignKey(blank=True, help_text='Pages, unlike tags, can have a hierarchy. You might have a Index page, and under that have children pages for post and story. Totally optional.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='childs', to='simpel_pages.page'),
        ),
        migrations.CreateModel(
            name='Visitor',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.CharField(max_length=16, null=True)),
                ('url', models.CharField(max_length=255)),
                ('path', models.CharField(max_length=255)),
                ('referrer', models.CharField(max_length=255, null=True)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('content_id', models.CharField(max_length=255, null=True)),
                ('content_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='contenttypes.contenttype')),
            ],
        ),
    ]
