Only create INDEX 'added' when it does not already exist
This commit is contained in:
		
							parent
							
								
									1e78326ee4
								
							
						
					
					
						commit
						0e6cc67c0a
					
				@ -172,8 +172,7 @@ class DatabaseMigration {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (version < 2) {
 | 
			
		||||
      queries.push(`ALTER TABLE statistics
 | 
			
		||||
        ADD INDEX added (added);`);
 | 
			
		||||
      queries.push(`CREATE INDEX IF NOT EXISTS added ON statistics (added);`);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return queries;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user