| 
                
               | 
              
                
               | 
              
                @@ -37,8 +37,8 @@ class SwitchToJsonSerialization < ActiveRecord::Migration 
               | 
            
            
            
              | 
                37
               | 
              
                37
               | 
              
                   end 
               | 
            
            
            
              | 
                38
               | 
              
                38
               | 
              
                  
               | 
            
            
            
              | 
                39
               | 
              
                39
               | 
              
                   def data_exists? 
               | 
            
            
            
              | 
                40
               | 
              
                
               | 
              
                -    events = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("events")}").first.first
               | 
            
            
            
              | 
                41
               | 
              
                
               | 
              
                -    agents = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("agents")}").first.first
               | 
            
            
            
              | 
                
               | 
              
                40
               | 
              
                +    events = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("events")}").first.first.to_i
               | 
            
            
            
              | 
                
               | 
              
                41
               | 
              
                +    agents = ActiveRecord::Base.connection.select_rows("SELECT count(*) FROM #{ActiveRecord::Base.connection.quote_table_name("agents")}").first.first.to_i
               | 
            
            
            
              | 
                42
               | 
              
                42
               | 
              
                     agents + events > 0 
               | 
            
            
            
              | 
                43
               | 
              
                43
               | 
              
                   end 
               | 
            
            
            
              | 
                44
               | 
              
                44
               | 
              
                  
               |