From 6633ba7144dbc884732ee521d380456bbb2146f7 Mon Sep 17 00:00:00 2001 From: Tim Laszlo Date: Mon, 4 Jun 2012 14:05:25 -0500 Subject: 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. --- src/lib/Bcfg2/Server/Reports/reports/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/Bcfg2/Server/Reports/reports/models.py') 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 -- cgit v1.2.3-1-g7c22