# Generated by Django 4.2.17 on 2024-12-13 10:09

from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import pi_dash.db.models.user
import uuid


class Migration(migrations.Migration):

    dependencies = [
        ('db', '0086_issueversion_alter_teampage_unique_together_and_more'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='issueversion',
            name='description',
        ),
        migrations.RemoveField(
            model_name='issueversion',
            name='description_binary',
        ),
        migrations.RemoveField(
            model_name='issueversion',
            name='description_html',
        ),
        migrations.RemoveField(
            model_name='issueversion',
            name='description_stripped',
        ),
        migrations.AddField(
            model_name='issueversion',
            name='activity',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='versions', to='db.issueactivity'),
        ),
        migrations.AddField(
            model_name='profile',
            name='is_mobile_onboarded',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='profile',
            name='mobile_onboarding_step',
            field=models.JSONField(default=pi_dash.db.models.user.get_mobile_default_onboarding),
        ),
        migrations.AddField(
            model_name='profile',
            name='mobile_timezone_auto_set',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='profile',
            name='language',
            field=models.CharField(default='en', max_length=255),
        ),
        migrations.AlterField(
            model_name='issueversion',
            name='owned_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='issue_versions', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Sticky',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Last Modified At')),
                ('deleted_at', models.DateTimeField(blank=True, null=True, verbose_name='Deleted At')),
                ('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
                ('name', models.TextField()),
                ('description', models.JSONField(blank=True, default=dict)),
                ('description_html', models.TextField(blank=True, default='<p></p>')),
                ('description_stripped', models.TextField(blank=True, null=True)),
                ('description_binary', models.BinaryField(null=True)),
                ('logo_props', models.JSONField(default=dict)),
                ('color', models.CharField(blank=True, max_length=255, null=True)),
                ('background_color', models.CharField(blank=True, max_length=255, null=True)),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created_by', to=settings.AUTH_USER_MODEL, verbose_name='Created By')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stickies', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='Last Modified By')),
                ('workspace', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='stickies', to='db.workspace')),
            ],
            options={
                'verbose_name': 'Sticky',
                'verbose_name_plural': 'Stickies',
                'db_table': 'stickies',
                'ordering': ('-created_at',),
            },
        ),
        migrations.CreateModel(
            name='IssueDescriptionVersion',
            fields=[
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created At')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='Last Modified At')),
                ('deleted_at', models.DateTimeField(blank=True, null=True, verbose_name='Deleted At')),
                ('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)),
                ('description_binary', models.BinaryField(null=True)),
                ('description_html', models.TextField(blank=True, default='<p></p>')),
                ('description_stripped', models.TextField(blank=True, null=True)),
                ('description_json', models.JSONField(blank=True, default=dict)),
                ('last_saved_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_created_by', to=settings.AUTH_USER_MODEL, verbose_name='Created By')),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='description_versions', to='db.issue')),
                ('owned_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='issue_description_versions', to=settings.AUTH_USER_MODEL)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_%(class)s', to='db.project')),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='%(class)s_updated_by', to=settings.AUTH_USER_MODEL, verbose_name='Last Modified By')),
                ('workspace', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='workspace_%(class)s', to='db.workspace')),
            ],
            options={
                'verbose_name': 'Issue Description Version',
                'verbose_name_plural': 'Issue Description Versions',
                'db_table': 'issue_description_versions',
            },
        ),
    ]
