Switch the checksums to use the registry computed value, remove all assumptions of namespaced paths for legacy storage, fix an upload race condition in the registry code.
This commit is contained in:
parent
246a216f80
commit
78c5aec5b9
11 changed files with 112 additions and 264 deletions
|
@ -228,12 +228,7 @@ class Image(BaseModel):
|
|||
# security reasons. So rather than Repository <-> Image being many to many
|
||||
# each image now belongs to exactly one repository.
|
||||
docker_image_id = CharField()
|
||||
checksum = CharField(null=True)
|
||||
created = DateTimeField(null=True)
|
||||
comment = TextField(null=True)
|
||||
command = TextField(null=True)
|
||||
repository = ForeignKeyField(Repository)
|
||||
image_size = BigIntegerField(null=True)
|
||||
|
||||
# '/' separated list of ancestory ids, e.g. /1/2/6/7/10/
|
||||
ancestors = CharField(index=True, default='/', max_length=64535, null=True)
|
||||
|
@ -244,7 +239,7 @@ class Image(BaseModel):
|
|||
database = db
|
||||
indexes = (
|
||||
# we don't really want duplicates
|
||||
(('repository', 'docker_image_id'), False),
|
||||
(('repository', 'docker_image_id'), True),
|
||||
)
|
||||
|
||||
|
||||
|
|
Reference in a new issue