Store AS organization in geo_names

This commit is contained in:
nymkappa
2022-07-12 12:12:10 +02:00
parent 47ad5fffc8
commit 3d2ff7ef62
2 changed files with 12 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import logger from '../logger';
import { Common } from './common';
class DatabaseMigration {
private static currentVersion = 29;
private static currentVersion = 30;
private queryTimeout = 120000;
private statisticsAddedIndexed = false;
private uniqueLogs: string[] = [];
@@ -291,6 +291,10 @@ class DatabaseMigration {
await this.$executeQuery('ALTER TABLE `nodes` ADD latitude double NULL DEFAULT NULL');
}
if (databaseSchemaVersion < 30 && isBitcoin === true) {
await this.$executeQuery('ALTER TABLE `geo_names` CHANGE `type` `type` enum("city","country","division","continent","as_organization") NOT NULL');
}
} catch (e) {
throw e;
}