# Generated by Django 5.1.3 on 2024-11-15 07:42

import django.db.models.deletion
import users.sentinel
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
        ('files', '0002_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='basefile',
            name='uploader',
            field=models.ForeignKey(help_text='The uploader of this file.', on_delete=models.SET(users.sentinel.get_sentinel_user), related_name='files', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='filegroupobjectpermission',
            name='content_object',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group_permissions', to='files.basefile'),
        ),
        migrations.AddField(
            model_name='filegroupobjectpermission',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.group'),
        ),
        migrations.AddField(
            model_name='filegroupobjectpermission',
            name='permission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.permission'),
        ),
        migrations.AddField(
            model_name='fileuserobjectpermission',
            name='content_object',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_permissions', to='files.basefile'),
        ),
        migrations.AddField(
            model_name='fileuserobjectpermission',
            name='permission',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='auth.permission'),
        ),
        migrations.AddField(
            model_name='fileuserobjectpermission',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='thumbnail',
            name='basefile',
            field=models.OneToOneField(help_text='The basefile these thumbnails are for.', on_delete=django.db.models.deletion.CASCADE, to='files.basefile'),
        ),
        migrations.AlterUniqueTogether(
            name='filegroupobjectpermission',
            unique_together={('group', 'permission', 'content_object')},
        ),
        migrations.AlterUniqueTogether(
            name='fileuserobjectpermission',
            unique_together={('user', 'permission', 'content_object')},
        ),
    ]
