2019-11-25 09:49:06 +01:00
|
|
|
# Generated by Django 2.2.6 on 2019-11-11 13:38
|
|
|
|
|
|
|
|
|
|
import django.contrib.postgres.fields.jsonb
|
|
|
|
|
import django.core.serializers.json
|
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
import django.utils.timezone
|
2026-01-24 19:54:33 -03:00
|
|
|
import funquail_api.common.models
|
|
|
|
|
import funquail_api.common.validators
|
2019-11-25 09:49:06 +01:00
|
|
|
import uuid
|
|
|
|
|
import versatileimagefield.fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
|
('common', '0003_cit_extension'),
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
|
migrations.CreateModel(
|
|
|
|
|
name='Attachment',
|
|
|
|
|
fields=[
|
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
|
('url', models.URLField(max_length=500, unique=True, null=True)),
|
|
|
|
|
('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, unique=True)),
|
|
|
|
|
('creation_date', models.DateTimeField(default=django.utils.timezone.now)),
|
|
|
|
|
('last_fetch_date', models.DateTimeField(blank=True, null=True)),
|
|
|
|
|
('size', models.IntegerField(blank=True, null=True)),
|
|
|
|
|
('mimetype', models.CharField(blank=True, max_length=200, null=True)),
|
2026-01-24 19:54:33 -03:00
|
|
|
('file', versatileimagefield.fields.VersatileImageField(max_length=255, upload_to=funquail_api.common.models.get_file_path, validators=[funquail_api.common.validators.ImageDimensionsValidator(min_height=50, min_width=50), funquail_api.common.validators.FileValidator(allowed_extensions=['png', 'jpg', 'jpeg'], max_size=5242880)])),
|
2019-11-25 09:49:06 +01:00
|
|
|
('actor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='federation.Actor', null=True)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
]
|