Merge pull request #1673 from mempool/nymkappa/feature/index-block-hash
Index blocks.hash
This commit is contained in:
		
						commit
						63890a654f
					
				| @ -4,7 +4,7 @@ import logger from '../logger'; | |||||||
| import { Common } from './common'; | import { Common } from './common'; | ||||||
| 
 | 
 | ||||||
| class DatabaseMigration { | class DatabaseMigration { | ||||||
|   private static currentVersion = 17; |   private static currentVersion = 18; | ||||||
|   private queryTimeout = 120000; |   private queryTimeout = 120000; | ||||||
|   private statisticsAddedIndexed = false; |   private statisticsAddedIndexed = false; | ||||||
| 
 | 
 | ||||||
| @ -180,6 +180,10 @@ class DatabaseMigration { | |||||||
|       if (databaseSchemaVersion < 17 && isBitcoin === true) { |       if (databaseSchemaVersion < 17 && isBitcoin === true) { | ||||||
|         await this.$executeQuery('ALTER TABLE `pools` ADD `slug` CHAR(50) NULL'); |         await this.$executeQuery('ALTER TABLE `pools` ADD `slug` CHAR(50) NULL'); | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|  |       if (databaseSchemaVersion < 18 && isBitcoin === true) { | ||||||
|  |         await this.$executeQuery('ALTER TABLE `blocks` ADD INDEX `hash` (`hash`);'); | ||||||
|  |       } | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|       throw e; |       throw e; | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user