Compare commits
2 Commits
c11cc49463
...
test
| Author | SHA1 | Date | |
|---|---|---|---|
| cd1c3d0ff7 | |||
| 219c6d359a |
Binary file not shown.
@@ -0,0 +1,47 @@
|
|||||||
|
# Generated by Django 5.2.5 on 2026-02-02 06:27
|
||||||
|
|
||||||
|
import django.core.validators
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('core', '0002_user_banned_until_user_is_banned'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterUniqueTogether(
|
||||||
|
name='vote',
|
||||||
|
unique_together=set(),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='issue',
|
||||||
|
name='photo',
|
||||||
|
field=models.ImageField(blank=True, null=True, upload_to='issues/', validators=[django.core.validators.FileExtensionValidator(['jpg', 'jpeg', 'png', 'webp'])]),
|
||||||
|
),
|
||||||
|
migrations.AddIndex(
|
||||||
|
model_name='issue',
|
||||||
|
index=models.Index(fields=['status'], name='core_issue_status_2609e6_idx'),
|
||||||
|
),
|
||||||
|
migrations.AddIndex(
|
||||||
|
model_name='issue',
|
||||||
|
index=models.Index(fields=['created_at'], name='core_issue_created_50e100_idx'),
|
||||||
|
),
|
||||||
|
migrations.AddIndex(
|
||||||
|
model_name='issue',
|
||||||
|
index=models.Index(fields=['department'], name='core_issue_departm_5c654b_idx'),
|
||||||
|
),
|
||||||
|
migrations.AddIndex(
|
||||||
|
model_name='issue',
|
||||||
|
index=models.Index(fields=['reporter'], name='core_issue_reporte_3f70e1_idx'),
|
||||||
|
),
|
||||||
|
migrations.AddConstraint(
|
||||||
|
model_name='department',
|
||||||
|
constraint=models.UniqueConstraint(fields=('admin',), name='unique_department_admin'),
|
||||||
|
),
|
||||||
|
migrations.AddConstraint(
|
||||||
|
model_name='vote',
|
||||||
|
constraint=models.UniqueConstraint(fields=('user', 'issue'), name='unique_vote_per_user_issue'),
|
||||||
|
),
|
||||||
|
]
|
||||||
BIN
Binary file not shown.
+1
-1
@@ -197,7 +197,7 @@ class Vote(models.Model):
|
|||||||
class Comment(models.Model):
|
class Comment(models.Model):
|
||||||
issue = models.ForeignKey(Issue, on_delete=models.CASCADE, related_name="comments")
|
issue = models.ForeignKey(Issue, on_delete=models.CASCADE, related_name="comments")
|
||||||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||||
content = models.TextField() # <--- field name is "content", not "text"
|
content = models.TextField()
|
||||||
parent = models.ForeignKey("self", null=True, blank=True, related_name="replies", on_delete=models.CASCADE)
|
parent = models.ForeignKey("self", null=True, blank=True, related_name="replies", on_delete=models.CASCADE)
|
||||||
created_at = models.DateTimeField(auto_now_add=True)
|
created_at = models.DateTimeField(auto_now_add=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user