mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 13:51:09 -05:00
36 lines
1.4 KiB
Python
36 lines
1.4 KiB
Python
# Generated by Django 5.1.2 on 2024-10-28 20:17
|
|
|
|
import django.db.models.deletion
|
|
import media.models
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
('contenttypes', '0002_remove_content_type_name'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Photo',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('image', models.ImageField(upload_to=media.models.photo_upload_path)),
|
|
('caption', models.CharField(blank=True, max_length=255)),
|
|
('alt_text', models.CharField(blank=True, max_length=255)),
|
|
('is_primary', models.BooleanField(default=False)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('updated_at', models.DateTimeField(auto_now=True)),
|
|
('object_id', models.PositiveIntegerField()),
|
|
('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
|
|
],
|
|
options={
|
|
'ordering': ['-is_primary', '-created_at'],
|
|
'indexes': [models.Index(fields=['content_type', 'object_id'], name='media_photo_content_0187f5_idx')],
|
|
},
|
|
),
|
|
]
|