From 966e17bd223144f689709555476bcb439ba696c5 Mon Sep 17 00:00:00 2001 From: Oleksandra Date: Fri, 27 Oct 2023 14:01:35 +0300 Subject: [PATCH] add company (what) & remove company (who) --- .../0003_alter_viewedcompany_unique_together.py | 16 ++++++++++++++++ profiles/models.py | 3 --- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 profiles/migrations/0003_alter_viewedcompany_unique_together.py diff --git a/profiles/migrations/0003_alter_viewedcompany_unique_together.py b/profiles/migrations/0003_alter_viewedcompany_unique_together.py new file mode 100644 index 000000000..39d547c29 --- /dev/null +++ b/profiles/migrations/0003_alter_viewedcompany_unique_together.py @@ -0,0 +1,16 @@ +# Generated by Django 4.2.3 on 2023-10-27 11:01 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("profiles", "0002_alter_activity_name_alter_category_name"), + ] + + operations = [ + migrations.AlterUniqueTogether( + name="viewedcompany", + unique_together=set(), + ), + ] diff --git a/profiles/models.py b/profiles/models.py index 684d66103..cfae0ebb5 100644 --- a/profiles/models.py +++ b/profiles/models.py @@ -120,6 +120,3 @@ class ViewedCompany(models.Model): date = models.DateTimeField(auto_now_add=True) user = models.ForeignKey(CustomUser, on_delete=models.CASCADE) company = models.ForeignKey(Profile, on_delete=models.CASCADE) - - class Meta: - unique_together = (("user", "company"),)