feat: add new model for comment files

This commit is contained in:
xoliqberdiyev
2026-05-05 16:32:22 +05:00
parent 269817f25e
commit 4ac21100a3
3 changed files with 104 additions and 16 deletions

View File

@@ -0,0 +1,29 @@
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0002_alter_comment_created_by'),
]
operations = [
migrations.RemoveField(
model_name='comment',
name='file',
),
migrations.CreateModel(
name='CommentFile',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('file', models.FileField(upload_to='comments/')),
('comment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='tasks.comment')),
],
options={
'abstract': False,
},
),
]