Files

35 lines
1.2 KiB
Python

# Generated by Django 6.0.6 on 2026-06-28 04:14
import django.db.models.deletion
import uuid
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Attachment',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('access_key', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
('file', models.FileField(upload_to='attachments/%Y/%m/')),
('filename', models.CharField(max_length=255)),
('size', models.PositiveIntegerField()),
('uploaded_at', models.DateTimeField(auto_now_add=True)),
('uploaded_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='attachments', to=settings.AUTH_USER_MODEL)),
],
options={
'db_table': 'attachments',
'ordering': ['-uploaded_at'],
},
),
]