# Generated by Django 4.2.22 on 2026-01-05 08:35

from django.db import migrations, models
import plane.db.models.project
import django.db.models.deletion
from django.conf import settings

class Migration(migrations.Migration):

    dependencies = [
        ('db', '0113_webhook_version'),
    ]

    operations = [
        migrations.AlterModelTable(
            name='issueuserproperty',
            table='project_user_properties',
        ),
        migrations.RenameModel(
            old_name='IssueUserProperty',
            new_name='ProjectUserProperty',
        ),
        migrations.AddField(
            model_name='projectuserproperty',
            name='preferences',
            field=models.JSONField(default=plane.db.models.project.get_default_preferences),
        ),
        migrations.AddField(
            model_name='projectuserproperty',
            name='sort_order',
            field=models.FloatField(default=65535),
        ),        
        migrations.AlterModelOptions(
            name='projectuserproperty',
            options={'ordering': ('-created_at',), 'verbose_name': 'Project User Property', 'verbose_name_plural': 'Project User Properties'},
        ),
        migrations.RemoveConstraint(
            model_name='projectuserproperty',
            name='issue_user_property_unique_user_project_when_deleted_at_null',
        ),
        migrations.AlterField(
            model_name='projectuserproperty',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='project_property_user', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddConstraint(
            model_name='projectuserproperty',
            constraint=models.UniqueConstraint(condition=models.Q(('deleted_at__isnull', True)), fields=('user', 'project'), name='project_user_property_unique_user_project_when_deleted_at_null'),
        ),
    ]