summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Reports/reports/models.py
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-06-04 14:05:25 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-06-04 14:25:58 -0500
commit6633ba7144dbc884732ee521d380456bbb2146f7 (patch)
treed61dba938d44a296406ed1f7b71d182b2e81e95f /src/lib/Bcfg2/Server/Reports/reports/models.py
parent48d77ab49b8c8e69c38b2b659ba4b31e781443c8 (diff)
downloadbcfg2-6633ba7144dbc884732ee521d380456bbb2146f7.tar.gz
bcfg2-6633ba7144dbc884732ee521d380456bbb2146f7.tar.bz2
bcfg2-6633ba7144dbc884732ee521d380456bbb2146f7.zip
DBStats: Remove custom sql
Remove the custom sql file. This failed to install in MySQL. Use django to index Interaction.timestamp instead of custom sql.
Diffstat (limited to 'src/lib/Bcfg2/Server/Reports/reports/models.py')
-rw-r--r--src/lib/Bcfg2/Server/Reports/reports/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Reports/reports/models.py b/src/lib/Bcfg2/Server/Reports/reports/models.py
index b58633c38..296c8c3a8 100644
--- a/src/lib/Bcfg2/Server/Reports/reports/models.py
+++ b/src/lib/Bcfg2/Server/Reports/reports/models.py
@@ -161,8 +161,8 @@ class InteractiveManager(models.Manager):
class Interaction(models.Model):
"""Models each reconfiguration operation interaction between client and server."""
- client = models.ForeignKey(Client, related_name="interactions",)
- timestamp = models.DateTimeField() # Timestamp for this record
+ client = models.ForeignKey(Client, related_name="interactions")
+ timestamp = models.DateTimeField(db_index=True) # Timestamp for this record
state = models.CharField(max_length=32) # good/bad/modified/etc
repo_rev_code = models.CharField(max_length=64) # repo revision at time of interaction
goodcount = models.IntegerField() # of good config-items