"Fix" foreign key to members table
Turning off the constraint here is probably not a good idea in the long term, but it will work until I move tables around to make this sane
This commit is contained in:
parent
d34bff860a
commit
68a42b90ce
@ -12,9 +12,6 @@ class MembershipWorksRouter:
|
||||
return self.db
|
||||
return None
|
||||
|
||||
def allow_relation(self, obj1, obj2, **hints):
|
||||
return None
|
||||
|
||||
def allow_migrate(self, db, app_label, model_name=None, **hints):
|
||||
if db == self.db:
|
||||
return False
|
||||
|
@ -39,8 +39,7 @@ class Certification(models.Model):
|
||||
number = models.AutoField(db_column='Number', primary_key=True)
|
||||
certification = models.ForeignKey(CertificationDefinition, on_delete=models.PROTECT, db_column='Certification')
|
||||
name = models.CharField(db_column='Name', max_length=255)
|
||||
# TODO: this should be a fk to the membershipworks.members table
|
||||
member = models.ForeignKey(Member, on_delete=models.PROTECT, to_field='uid', db_column='uid', blank=True, null=True)
|
||||
member = models.ForeignKey(Member, on_delete=models.PROTECT, to_field='uid', db_column='uid', blank=True, null=True, db_constraint=False)
|
||||
certified_by = models.CharField(db_column='Certified_By', max_length=255, blank=True, null=True)
|
||||
date = models.DateField(db_column='Date', blank=True, null=True)
|
||||
version = models.CharField(db_column='Version', max_length=255, blank=True, null=True)
|
||||
|
Loading…
Reference in New Issue
Block a user