Fix deleting repos and images under MySQL

MySQL doesn't handle constraints at the end of transactions, so deleting images currently fails. This removes the constraint and just leaves parent_id as an int
This commit is contained in:
Joseph Schorr 2015-11-09 14:42:05 -05:00
parent daa74b5132
commit 2d2662f53f
6 changed files with 9 additions and 10 deletions

View file

@ -575,7 +575,7 @@ class Image(BaseModel):
security_indexed = BooleanField(default=False)
security_indexed_engine = IntegerField(default=-1)
parent = ForeignKeyField('self', index=True, null=True, related_name='children')
parent_id = IntegerField(index=True, null=True)
class Meta:
database = db