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

@ -303,7 +303,7 @@ def set_image_metadata(docker_image_id, namespace_name, repository_name, created
if parent:
fetched.ancestors = '%s%s/' % (parent.ancestors, parent.id)
fetched.parent = parent
fetched.parent_id = parent.id
fetched.save()
fetched.storage.save()