<reponame>katajakasa/aetherguild4
# Generated by Django 2.1 on 2018-08-05 21:10

import aether.forum.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import precise_bbcode.fields
import timezone_field.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='ForumBoard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('description', models.TextField()),
                ('sort_index', models.IntegerField(default=0)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ForumLastRead',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
            ],
        ),
        migrations.CreateModel(
            name='ForumPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_message_rendered', models.TextField(blank=True, editable=False, null=True)),
                ('message', precise_bbcode.fields.BBCodeTextField(no_rendered_field=True)),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ForumPostEdit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('editor', models.CharField(max_length=32)),
                ('message', models.CharField(blank=True, max_length=255)),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
            ],
        ),
        migrations.CreateModel(
            name='ForumSection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('sort_index', models.IntegerField(default=0)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ForumThread',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
                ('modified_at', models.DateTimeField(default=aether.forum.models.utc_now)),
                ('views', models.IntegerField(default=0)),
                ('sticky', models.BooleanField(default=False)),
                ('closed', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
                ('board', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='threads', to='forum.ForumBoard')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ForumUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alias', models.CharField(max_length=32)),
                ('_signature_rendered', models.TextField(blank=True, editable=False, null=True)),
                ('signature', precise_bbcode.fields.BBCodeTextField(blank=True, default='', no_rendered_field=True)),
                ('timezone', timezone_field.fields.TimeZoneField(default='Europe/Amsterdam')),
                ('message_limit', models.PositiveIntegerField(default=25)),
                ('thread_limit', models.PositiveIntegerField(default=25)),
                ('avatar', models.ImageField(blank=True, upload_to='avatars')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddIndex(
            model_name='forumsection',
            index=models.Index(fields=['sort_index', 'deleted'], name='forum_forum_sort_in_f79027_idx'),
        ),
        migrations.AddIndex(
            model_name='forumsection',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_f21cca_idx'),
        ),
        migrations.AddField(
            model_name='forumpostedit',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='edits', to='forum.ForumPost'),
        ),
        migrations.AddField(
            model_name='forumpost',
            name='thread',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='posts', to='forum.ForumThread'),
        ),
        migrations.AddField(
            model_name='forumpost',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='forumlastread',
            name='thread',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='last_reads', to='forum.ForumThread'),
        ),
        migrations.AddField(
            model_name='forumlastread',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='last_reads', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='forumboard',
            name='read_perm',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='readable_boards', to='auth.Permission'),
        ),
        migrations.AddField(
            model_name='forumboard',
            name='section',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='boards', to='forum.ForumSection'),
        ),
        migrations.AddField(
            model_name='forumboard',
            name='write_perm',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='writable_boards', to='auth.Permission'),
        ),
        migrations.AddIndex(
            model_name='forumthread',
            index=models.Index(fields=['board', 'sticky', 'modified_at', 'deleted'], name='forum_forum_board_i_7f8da0_idx'),
        ),
        migrations.AddIndex(
            model_name='forumthread',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_91065e_idx'),
        ),
        migrations.AddIndex(
            model_name='forumpostedit',
            index=models.Index(fields=['post', 'created_at'], name='forum_forum_post_id_ca52d1_idx'),
        ),
        migrations.AddIndex(
            model_name='forumpost',
            index=models.Index(fields=['thread', 'created_at', 'deleted'], name='forum_forum_thread__4d1b9f_idx'),
        ),
        migrations.AddIndex(
            model_name='forumpost',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_7379a1_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='forumlastread',
            unique_together={('thread', 'user')},
        ),
        migrations.AddIndex(
            model_name='forumboard',
            index=models.Index(fields=['section', 'sort_index', 'deleted'], name='forum_forum_section_fb8305_idx'),
        ),
        migrations.AddIndex(
            model_name='forumboard',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_e11d82_idx'),
        ),
    ]

# Generated by Django 2.1 on 2018-08-05 21:10

import aether.forum.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import precise_bbcode.fields
import timezone_field.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='ForumBoard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('description', models.TextField()),
                ('sort_index', models.IntegerField(default=0)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ForumLastRead',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
            ],
        ),
        migrations.CreateModel(
            name='ForumPost',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('_message_rendered', models.TextField(blank=True, editable=False, null=True)),
                ('message', precise_bbcode.fields.BBCodeTextField(no_rendered_field=True)),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ForumPostEdit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('editor', models.CharField(max_length=32)),
                ('message', models.CharField(blank=True, max_length=255)),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
            ],
        ),
        migrations.CreateModel(
            name='ForumSection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('sort_index', models.IntegerField(default=0)),
                ('deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='ForumThread',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128)),
                ('created_at', models.DateTimeField(default=aether.forum.models.utc_now)),
                ('modified_at', models.DateTimeField(default=aether.forum.models.utc_now)),
                ('views', models.IntegerField(default=0)),
                ('sticky', models.BooleanField(default=False)),
                ('closed', models.BooleanField(default=False)),
                ('deleted', models.BooleanField(default=False)),
                ('board', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='threads', to='forum.ForumBoard')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ForumUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('alias', models.CharField(max_length=32)),
                ('_signature_rendered', models.TextField(blank=True, editable=False, null=True)),
                ('signature', precise_bbcode.fields.BBCodeTextField(blank=True, default='', no_rendered_field=True)),
                ('timezone', timezone_field.fields.TimeZoneField(default='Europe/Amsterdam')),
                ('message_limit', models.PositiveIntegerField(default=25)),
                ('thread_limit', models.PositiveIntegerField(default=25)),
                ('avatar', models.ImageField(blank=True, upload_to='avatars')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddIndex(
            model_name='forumsection',
            index=models.Index(fields=['sort_index', 'deleted'], name='forum_forum_sort_in_f79027_idx'),
        ),
        migrations.AddIndex(
            model_name='forumsection',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_f21cca_idx'),
        ),
        migrations.AddField(
            model_name='forumpostedit',
            name='post',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='edits', to='forum.ForumPost'),
        ),
        migrations.AddField(
            model_name='forumpost',
            name='thread',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='posts', to='forum.ForumThread'),
        ),
        migrations.AddField(
            model_name='forumpost',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='forumlastread',
            name='thread',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='last_reads', to='forum.ForumThread'),
        ),
        migrations.AddField(
            model_name='forumlastread',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='last_reads', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='forumboard',
            name='read_perm',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='readable_boards', to='auth.Permission'),
        ),
        migrations.AddField(
            model_name='forumboard',
            name='section',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='boards', to='forum.ForumSection'),
        ),
        migrations.AddField(
            model_name='forumboard',
            name='write_perm',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='writable_boards', to='auth.Permission'),
        ),
        migrations.AddIndex(
            model_name='forumthread',
            index=models.Index(fields=['board', 'sticky', 'modified_at', 'deleted'], name='forum_forum_board_i_7f8da0_idx'),
        ),
        migrations.AddIndex(
            model_name='forumthread',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_91065e_idx'),
        ),
        migrations.AddIndex(
            model_name='forumpostedit',
            index=models.Index(fields=['post', 'created_at'], name='forum_forum_post_id_ca52d1_idx'),
        ),
        migrations.AddIndex(
            model_name='forumpost',
            index=models.Index(fields=['thread', 'created_at', 'deleted'], name='forum_forum_thread__4d1b9f_idx'),
        ),
        migrations.AddIndex(
            model_name='forumpost',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_7379a1_idx'),
        ),
        migrations.AlterUniqueTogether(
            name='forumlastread',
            unique_together={('thread', 'user')},
        ),
        migrations.AddIndex(
            model_name='forumboard',
            index=models.Index(fields=['section', 'sort_index', 'deleted'], name='forum_forum_section_fb8305_idx'),
        ),
        migrations.AddIndex(
            model_name='forumboard',
            index=models.Index(fields=['deleted'], name='forum_forum_deleted_e11d82_idx'),
        ),
    ]
# Generated by Django 2.1 on 2018-08-05 21:10