feat: Attachment 모델 추가 및 관련 기능 구현
All checks were successful
Build And Test / build-and-push (push) Successful in 2m5s
All checks were successful
Build And Test / build-and-push (push) Successful in 2m5s
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
25
blog/migrations/0004_attachment.py
Normal file
25
blog/migrations/0004_attachment.py
Normal file
@ -0,0 +1,25 @@
|
||||
# Generated by Django 4.2.14 on 2026-01-20 13:58
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('blog', '0003_tag_post_tags'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Attachment',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('file', models.FileField(upload_to='attachments/%Y/%m/%d/')),
|
||||
('original_name', models.CharField(max_length=255)),
|
||||
('file_size', models.PositiveIntegerField()),
|
||||
('uploaded_at', models.DateTimeField(auto_now_add=True)),
|
||||
('post', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='attachments', to='blog.post')),
|
||||
],
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user