You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
padelclub_backend/tournaments/migrations/0120_image.py

33 lines
1.3 KiB

# Generated by Django 5.1 on 2025-05-07 07:58
import django.db.models.deletion
import django.utils.timezone
import tournaments.models.image
import uuid
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tournaments', '0119_alter_tournament_animation_type'),
]
operations = [
migrations.CreateModel(
name='Image',
fields=[
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('title', models.CharField(blank=True, max_length=255)),
('description', models.TextField(blank=True)),
('image', models.ImageField(upload_to=tournaments.models.image.image_upload_path)),
('uploaded_at', models.DateTimeField(default=django.utils.timezone.now)),
('image_type', models.CharField(choices=[('sponsor', 'Sponsor'), ('club', 'Club')], default='sponsor', max_length=20)),
('is_primary', models.BooleanField(default=False)),
('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='tournaments.event')),
],
options={
'ordering': ['-uploaded_at'],
},
),
]