lifetimes on Tags should now be in milliseconds

Fixes #1779
This commit is contained in:
Joseph Schorr 2016-08-29 16:00:42 -04:00 committed by Jimmy Zelinskie
parent db60df827d
commit b775458d4b

View file

@ -282,6 +282,7 @@ def uuid_generator():
get_epoch_timestamp = lambda: int(time.time())
get_epoch_timestamp_ms = lambda: int(time.time() * 1000)
def close_db_filter(_):
@ -1142,8 +1143,8 @@ class Tag(BaseModel):
name = CharField()
repository = ForeignKeyField(Repository)
manifest_list = ForeignKeyField(ManifestList)
lifetime_start = IntegerField(default=get_epoch_timestamp)
lifetime_end = IntegerField(null=True, index=True)
lifetime_start = BigIntegerField(default=get_epoch_timestamp_ms)
lifetime_end = BigIntegerField(null=True, index=True)
hidden = BooleanField(default=False)
reverted = BooleanField(default=False)