Skip to content

Commit

Permalink
removed constraint from collection note (its possible to have the sam…
Browse files Browse the repository at this point in the history
…e notes multiple times - differs in data)
  • Loading branch information
jakubkrafka committed Aug 19, 2021
1 parent 6d534be commit 31aee47
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
@@ -0,0 +1,17 @@
# Generated by Django 3.2 on 2021-08-19 12:02

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('process', '0023_collection_completed_at'),
]

operations = [
migrations.RemoveConstraint(
model_name='collectionnote',
name='unique_collection_note_identifiers',
),
]
3 changes: 0 additions & 3 deletions process/models.py
Expand Up @@ -256,9 +256,6 @@ class Meta:
indexes = [
models.Index(name="collection_note_collection_id_idx", fields=["collection"]),
]
constraints = [
models.UniqueConstraint(name="unique_collection_note_identifiers", fields=["collection", "note"]),
]

collection = models.ForeignKey(Collection, on_delete=models.CASCADE, db_index=False)
note = models.TextField()
Expand Down

0 comments on commit 31aee47

Please sign in to comment.