kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
36 wiersze
1.7 KiB
Python
36 wiersze
1.7 KiB
Python
# 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
|
|
import funkwhale_api.common.models
|
|
import funkwhale_api.common.validators
|
|
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)),
|
|
('file', versatileimagefield.fields.VersatileImageField(max_length=255, upload_to=funkwhale_api.common.models.get_file_path, validators=[funkwhale_api.common.validators.ImageDimensionsValidator(min_height=50, min_width=50), funkwhale_api.common.validators.FileValidator(allowed_extensions=['png', 'jpg', 'jpeg'], max_size=5242880)])),
|
|
('actor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='federation.Actor', null=True)),
|
|
],
|
|
),
|
|
]
|