Changed Upvote and Downvote Functionality to be unique

This commit is contained in:
2024-04-12 18:00:52 -04:00
parent 5d4551e4fa
commit af9340c54f
3 changed files with 48 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
# Generated by Django 4.2.11 on 2024-04-12 21:47
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("api", "0006_file_points_peeruser_points"),
]
operations = [
migrations.RemoveField(
model_name="file",
name="points",
),
migrations.AddField(
model_name="file",
name="downvotes",
field=models.ManyToManyField(
related_name="downvoted_file", to=settings.AUTH_USER_MODEL
),
),
migrations.AddField(
model_name="file",
name="upvotes",
field=models.ManyToManyField(
related_name="upvoted_file", to=settings.AUTH_USER_MODEL
),
),
]