mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
[FEAT] Update dependencies
Upgrade versions of most packages and make other required changes to ensure compatibility. Update database models and migrations to match new requirements set by Django
This commit is contained in:
5
people/models/organisation.py
Normal file → Executable file
5
people/models/organisation.py
Normal file → Executable file
@@ -35,6 +35,11 @@ class OrganisationQuestionChoice(QuestionChoice):
|
||||
on_delete=models.CASCADE,
|
||||
blank=False,
|
||||
null=False)
|
||||
class Meta(QuestionChoice.Meta):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['question', 'text'],
|
||||
name='unique_question_answer_organisationquestionchoice')
|
||||
]
|
||||
|
||||
|
||||
class Organisation(models.Model):
|
||||
|
||||
5
people/models/person.py
Normal file → Executable file
5
people/models/person.py
Normal file → Executable file
@@ -77,6 +77,11 @@ class PersonQuestionChoice(QuestionChoice):
|
||||
on_delete=models.CASCADE,
|
||||
blank=False,
|
||||
null=False)
|
||||
class Meta(QuestionChoice.Meta):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['question', 'text'],
|
||||
name='unique_question_answer_personquestionchoice')
|
||||
]
|
||||
|
||||
|
||||
class Person(models.Model):
|
||||
|
||||
2
people/models/question.py
Normal file → Executable file
2
people/models/question.py
Normal file → Executable file
@@ -92,7 +92,7 @@ class QuestionChoice(models.Model):
|
||||
abstract = True
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['question', 'text'],
|
||||
name='unique_question_answer')
|
||||
name='unique_question_answer_modelquestionchoice')
|
||||
]
|
||||
ordering = [
|
||||
'question__order',
|
||||
|
||||
14
people/models/relationship.py
Normal file → Executable file
14
people/models/relationship.py
Normal file → Executable file
@@ -33,6 +33,11 @@ class RelationshipQuestionChoice(QuestionChoice):
|
||||
on_delete=models.CASCADE,
|
||||
blank=False,
|
||||
null=False)
|
||||
class Meta(QuestionChoice.Meta):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['question', 'text'],
|
||||
name='unique_question_answer_relationshipquestionchoice')
|
||||
]
|
||||
|
||||
|
||||
class Relationship(models.Model):
|
||||
@@ -40,7 +45,7 @@ class Relationship(models.Model):
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['source', 'target'],
|
||||
name='unique_relationship'),
|
||||
name='unique_relationship_modelrelationship'),
|
||||
]
|
||||
|
||||
#: Person reporting the relationship
|
||||
@@ -122,6 +127,11 @@ class OrganisationRelationshipQuestionChoice(QuestionChoice):
|
||||
on_delete=models.CASCADE,
|
||||
blank=False,
|
||||
null=False)
|
||||
class Meta(QuestionChoice.Meta):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['question', 'text'],
|
||||
name='unique_question_answer_organisationrelationshipquestionchoice')
|
||||
]
|
||||
|
||||
|
||||
class OrganisationRelationship(models.Model):
|
||||
@@ -129,7 +139,7 @@ class OrganisationRelationship(models.Model):
|
||||
class Meta:
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['source', 'target'],
|
||||
name='unique_relationship'),
|
||||
name='unique_relationship_modelorganisationrelationship'),
|
||||
]
|
||||
|
||||
#: Person reporting the relationship
|
||||
|
||||
Reference in New Issue
Block a user