Add the missing index on the peewee side. We already have the associated migration.
This commit is contained in:
parent
17bc9b81bf
commit
a59100b231
1 changed files with 8 additions and 0 deletions
|
@ -561,6 +561,14 @@ class LogEntry(BaseModel):
|
||||||
ip = CharField(null=True)
|
ip = CharField(null=True)
|
||||||
metadata_json = TextField(default='{}')
|
metadata_json = TextField(default='{}')
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
database = db
|
||||||
|
read_slaves = (read_slave,)
|
||||||
|
indexes = (
|
||||||
|
# create an index on repository and date
|
||||||
|
(('repository', 'datetime'), False),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class RepositoryActionCount(BaseModel):
|
class RepositoryActionCount(BaseModel):
|
||||||
repository = ForeignKeyField(Repository, index=True)
|
repository = ForeignKeyField(Repository, index=True)
|
||||||
|
|
Reference in a new issue