# Generated by Django 4.2.16 on 2026-03-25 10:15

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('photos', '0001_initial'),
        ('users', '0003_user_language'),
    ]

    operations = [
        # Clear empty-string avatar values left by the old ImageField before
        # converting the column to a bigint FK.
        migrations.RunSQL(
            sql="UPDATE users_user SET avatar = NULL WHERE avatar = ''",
            reverse_sql=migrations.RunSQL.noop,
        ),
        migrations.AlterField(
            model_name='user',
            name='avatar',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='avatar_user', to='photos.photo'),
        ),
    ]
