mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-29 12:04:02 +00:00
optmize index
This commit is contained in:
parent
528670481e
commit
ae2f0f0b22
@ -5,10 +5,13 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class RepoMetadata(models.Model):
|
class RepoMetadata(models.Model):
|
||||||
|
|
||||||
repo_id = models.CharField(max_length=36, primary_key=True, db_index=True)
|
repo_id = models.CharField(max_length=36, unique=True)
|
||||||
created_time = models.DateTimeField(auto_now_add=True)
|
created_time = models.DateTimeField(auto_now_add=True)
|
||||||
modified_time = models.DateTimeField(auto_now=True)
|
modified_time = models.DateTimeField(auto_now=True)
|
||||||
enabled = models.BooleanField()
|
enabled = models.BooleanField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
db_table = 'repo_metadata'
|
db_table = 'repo_metadata'
|
||||||
|
unique_together = [
|
||||||
|
['repo_id', 'enabled']
|
||||||
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user