mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	analytics: Remove interval field from *Count tables.
Includes a database migration. The interval field was originally there to facilitate time aggregation (e.g. aggregate_hour_to_day), but we now do such aggregations in views code or in the frontend.
This commit is contained in:
		@@ -149,8 +149,8 @@ class AnalyticsTestCase(TestCase):
 | 
			
		||||
class TestProcessCountStat(AnalyticsTestCase):
 | 
			
		||||
    def make_dummy_count_stat(self, current_time):
 | 
			
		||||
        # type: (datetime) -> CountStat
 | 
			
		||||
        dummy_query = """INSERT INTO analytics_realmcount (realm_id, property, end_time, interval, value)
 | 
			
		||||
                                VALUES (1, 'test stat', '%(end_time)s','hour', 22)""" % {'end_time': current_time}
 | 
			
		||||
        dummy_query = """INSERT INTO analytics_realmcount (realm_id, property, end_time, value)
 | 
			
		||||
                                VALUES (1, 'test stat', '%(end_time)s', 22)""" % {'end_time': current_time}
 | 
			
		||||
        count_stat = CountStat('test stat', ZerverCountQuery(Recipient, UserCount, dummy_query),
 | 
			
		||||
                               {}, None, CountStat.HOUR, False)
 | 
			
		||||
        return count_stat
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user