# Generated by Django 5.2.9 on 2025-12-23 09:47

import api.models.user
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0094_add_slideshow_interval'),
    ]

    operations = [
        migrations.AddField(
            model_name='photo',
            name='perceptual_hash',
            field=models.CharField(blank=True, db_index=True, max_length=64, null=True),
        ),
        migrations.AlterField(
            model_name='longrunningjob',
            name='job_type',
            field=models.PositiveIntegerField(choices=[(1, 'Scan Photos'), (2, 'Generate Event Albums'), (3, 'Regenerate Event Titles'), (4, 'Train Faces'), (5, 'Delete Missing Photos'), (7, 'Scan Faces'), (6, 'Calculate Clip Embeddings'), (8, 'Find Similar Faces'), (9, 'Download Selected Photos'), (10, 'Download Models'), (11, 'Add Geolocation'), (12, 'Generate Tags'), (13, 'Generate Face Embeddings'), (14, 'Scan Missing Photos'), (15, 'Detect Duplicate Photos')]),
        ),
        migrations.CreateModel(
            name='DuplicateGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('status', models.CharField(choices=[('pending', 'Pending Review'), ('reviewed', 'Reviewed'), ('dismissed', 'Dismissed (Not Duplicates)')], db_index=True, default='pending', max_length=20)),
                ('owner', models.ForeignKey(on_delete=models.SET(api.models.user.get_deleted_user), related_name='duplicate_groups', to=settings.AUTH_USER_MODEL)),
                ('preferred_photo', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='preferred_in_group', to='api.photo')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.AddField(
            model_name='photo',
            name='duplicate_group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='photos', to='api.duplicategroup'),
        ),
    ]
