incr: get schemaMap on db handler init

This commit is contained in:
18alantom
2022-05-23 16:18:21 +05:30
parent c9cac7410f
commit 98e1a44686
6 changed files with 47 additions and 12 deletions
+4
View File
@@ -14,6 +14,10 @@ export class DatabaseManager {
return this.db !== undefined && this.db.knex !== undefined;
}
getSchemaMap() {
return this.db?.schemaMap ?? {};
}
async createNewDatabase(dbPath: string, countryCode?: string) {
await this.#unlinkIfExists(dbPath);
await this.connectToDatabase(dbPath, countryCode);