database: revert logentry foreign key proxy
This commit is contained in:
parent
85ab543e9e
commit
4a521f5844
1 changed files with 1 additions and 5 deletions
|
@ -694,11 +694,9 @@ class LogEntryKind(BaseModel):
|
||||||
name = CharField(index=True, unique=True)
|
name = CharField(index=True, unique=True)
|
||||||
|
|
||||||
|
|
||||||
_LogEntryAccountProxy = Proxy()
|
|
||||||
|
|
||||||
class LogEntry(BaseModel):
|
class LogEntry(BaseModel):
|
||||||
kind = ForeignKeyField(LogEntryKind, index=True)
|
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,
|
performer = QuayUserField(allows_robots=True, index=True, null=True,
|
||||||
related_name='performer', robot_null_delete=True)
|
related_name='performer', robot_null_delete=True)
|
||||||
repository = ForeignKeyField(Repository, index=True, null=True)
|
repository = ForeignKeyField(Repository, index=True, null=True)
|
||||||
|
@ -717,8 +715,6 @@ class LogEntry(BaseModel):
|
||||||
(('repository', 'datetime', 'kind'), False),
|
(('repository', 'datetime', 'kind'), False),
|
||||||
)
|
)
|
||||||
|
|
||||||
_LogEntryAccountProxy.initialize(User)
|
|
||||||
|
|
||||||
|
|
||||||
class RepositoryActionCount(BaseModel):
|
class RepositoryActionCount(BaseModel):
|
||||||
repository = ForeignKeyField(Repository, index=True)
|
repository = ForeignKeyField(Repository, index=True)
|
||||||
|
|
Reference in a new issue