INDEX 'added' in statistics table
This commit is contained in:
		
							parent
							
								
									d809e85dde
								
							
						
					
					
						commit
						1e78326ee4
					
				@ -3,7 +3,7 @@ import { DB } from '../database';
 | 
			
		||||
import logger from '../logger';
 | 
			
		||||
 | 
			
		||||
class DatabaseMigration {
 | 
			
		||||
  private static currentVersion = 1;
 | 
			
		||||
  private static currentVersion = 2;
 | 
			
		||||
  private queryTimeout = 120000;
 | 
			
		||||
 | 
			
		||||
  constructor() { }
 | 
			
		||||
@ -171,6 +171,11 @@ class DatabaseMigration {
 | 
			
		||||
      queries.push(`INSERT INTO state VALUES('last_elements_block', 0, NULL);`);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (version < 2) {
 | 
			
		||||
      queries.push(`ALTER TABLE statistics
 | 
			
		||||
        ADD INDEX added (added);`);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return queries;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user