database: revert logentry foreign key proxy

This commit is contained in:
Jimmy Zelinskie 2016-04-29 13:15:41 -04:00
parent 85ab543e9e
commit 4a521f5844

View file

@ -694,11 +694,9 @@ class LogEntryKind(BaseModel):
name = CharField(index=True, unique=True)
_LogEntryAccountProxy = Proxy()
class LogEntry(BaseModel):
kind = ForeignKeyField(LogEntryKind, index=True)
account = ForeignKeyField(_LogEntryAccountProxy, index=True, related_name='account')
account = QuayUserField(index=True, related_name='account')
performer = QuayUserField(allows_robots=True, index=True, null=True,
related_name='performer', robot_null_delete=True)
repository = ForeignKeyField(Repository, index=True, null=True)
@ -717,8 +715,6 @@ class LogEntry(BaseModel):
(('repository', 'datetime', 'kind'), False),
)
_LogEntryAccountProxy.initialize(User)
class RepositoryActionCount(BaseModel):
repository = ForeignKeyField(Repository, index=True)