Fixed typos, org imports
MODIFY
src/migration/tasks/UpdateEmailsToLowercaseTask.ts
src/migration/tasks/UpdateEmailsToLowercaseTask.ts
import Constants from '../../utils/Constants';
-import DatabaseUtils from '../../storage/mongodb/DatabaseUtils';
import Logging from '../../utils/Logging';
import MigrationTask from '../MigrationTask';
import { ServerAction } from '../../types/Server';
import Tenant from '../../types/Tenant';
import TenantStorage from '../../storage/mongodb/TenantStorage';
-import UserStorage from '../../storage/mongodb/UserStorage';
import Utils from '../../utils/Utils';
import global from '../../types/GlobalType';
const MODULE_NAME = 'UpdateEmailsToLowercaseTask';
export default class UpdateEmailsToLowercaseTask extends MigrationTask {
- async migrate(): Promise<void> {
+ public async migrate(): Promise<void> {
const tenants = await TenantStorage.getTenants({}, Constants.DB_PARAMS_MAX_LIMIT);
for (const tenant of tenants.result) {
await this.migrateTenant(tenant);
}
}
- async migrateTenant(tenant: Tenant): Promise<void> {
+ public async migrateTenant(tenant: Tenant): Promise<void> {
// Get all the Users
const updateResult = await global.database.getCollection<any>(tenant.id, 'users').updateMany(
{},
@@ -40,15 +38,15 @@ export default class UpdateEmailsToLowercaseTask extends MigrationTask {
}
}
- getVersion(): string {
+ public getVersion(): string {
return '1.0';
}
- getName(): string {
+ public getName(): string {
return 'UpdateEmailsToLowercaseTask';
}
- isAsynchronous(): boolean {
+ public isAsynchronous(): boolean {
return true;
}
}

Fixed typos, org imports