Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Merge pull request #2645 from sap-labs-france/master-qa
Browse files Browse the repository at this point in the history
Merge master-qa
  • Loading branch information
LucasBrazi06 authored Jul 6, 2021
2 parents 65d04dc + 0b3ff77 commit 24799bb
Show file tree
Hide file tree
Showing 68 changed files with 949 additions and 267 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ev-server",
"version": "2.4.73",
"version": "2.4.74",
"engines": {
"node": "14.x.x",
"npm": "6.x.x"
Expand Down
2 changes: 1 addition & 1 deletion src/assets/charging-station-templates
28 changes: 28 additions & 0 deletions src/assets/server/rest/v1/docs/e-mobility-oas.json
Original file line number Diff line number Diff line change
Expand Up @@ -723,9 +723,18 @@
{
"$ref": "#/components/parameters/SiteIDs"
},
{
"$ref": "#/components/parameters/WithSite"
},
{
"$ref": "#/components/parameters/SiteAreaIDs"
},
{
"$ref": "#/components/parameters/WithSiteArea"
},
{
"$ref": "#/components/parameters/WithCompany"
},
{
"$ref": "#/components/parameters/InactivityStatuses"
},
Expand Down Expand Up @@ -1066,6 +1075,9 @@
{
"$ref": "#/components/parameters/SiteAreaIDs"
},
{
"$ref": "#/components/parameters/WithSiteArea"
},
{
"$ref": "#/components/parameters/ConnectorStatuses"
},
Expand Down Expand Up @@ -6459,6 +6471,14 @@
"type": "boolean"
}
},
"WithCompany": {
"in": "query",
"name": "WithCompany",
"description": "With company attribute",
"schema": {
"type": "boolean"
}
},
"WithSite": {
"in": "query",
"name": "WithSite",
Expand All @@ -6467,6 +6487,14 @@
"type": "boolean"
}
},
"WithSiteArea": {
"in": "query",
"name": "WithSiteArea",
"description": "With site area attribute",
"schema": {
"type": "boolean"
}
},
"RefundStatus": {
"in": "query",
"name": "RefundStatus",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,17 @@
"SiteID": {
"$ref": "common.json#/definitions/ids"
},
"CompanyID": {
"$ref": "common.json#/definitions/ids"
},
"WithSite": {
"type": "boolean",
"sanitize": "mongo"
},
"WithSiteArea": {
"type": "boolean",
"sanitize": "mongo"
},
"SiteAreaID": {
"$ref": "common.json#/definitions/ids"
},
Expand Down
4 changes: 4 additions & 0 deletions src/assets/server/rest/v1/schemas/tag/tags-get.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"UserID": {
"$ref": "user.json#/definitions/ids"
},
"WithUser": {
"type": "boolean",
"sanitize": "mongo"
},
"Search": {
"$ref": "common.json#/definitions/search"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@
"type": "boolean",
"sanitize": "mongo"
},
"WithCompany": {
"type": "boolean",
"sanitize": "mongo"
},
"WithSite": {
"type": "boolean",
"sanitize": "mongo"
},
"WithSiteArea": {
"type": "boolean",
"sanitize": "mongo"
},
"ConnectorID": {
"$ref": "chargingstation.json#/definitions/connectorIDs"
},
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPICheckCdrsAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPICheckCdrsAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPICheckLocationsAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPICheckLocationsAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPICheckSessionsAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPICheckSessionsAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPIPullCdrsAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPIPullCdrsAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPIPullLocationsAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPIPullLocationsAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPIPullSessionsAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPIPullSessionsAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPIPullTokensAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPIPullTokensAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPIPushEVSEStatusesAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPIPushEVSEStatusesAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/async-task/tasks/ocpi/OCPIPushTokensAsyncTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class OCPIPushTokensAsyncTask extends AbstractAsyncTask {
if (Utils.isTenantComponentActive(tenant, TenantComponents.OCPI)) {
try {
// Get the OCPI Endpoint
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant.id, this.asyncTask.parameters.endpointID);
const ocpiEndpoint = await OCPIEndpointStorage.getOcpiEndpoint(tenant, this.asyncTask.parameters.endpointID);
if (!ocpiEndpoint) {
throw new Error(`Unknown OCPI Endpoint ID '${this.asyncTask.parameters.endpointID}'`);
}
Expand Down
11 changes: 5 additions & 6 deletions src/authorization/Authorizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export default class Authorizations {
public static async canStartTransaction(loggedUser: UserToken, chargingStation: ChargingStation): Promise<boolean> {
let context: AuthorizationContext;
if (Utils.isComponentActiveFromToken(loggedUser, TenantComponents.ORGANIZATION)) {
if (!chargingStation || !chargingStation.siteArea || !chargingStation.siteArea.site) {
if (!chargingStation || !chargingStation.siteArea || !chargingStation.site) {
return false;
}
context = {
site: chargingStation.siteArea.site.id,
site: chargingStation.site.id,
sites: loggedUser.sites,
sitesAdmin: loggedUser.sitesAdmin
};
Expand Down Expand Up @@ -269,7 +269,7 @@ export default class Authorizations {
context = {
tagIDs: loggedUser.tagIDs,
owner: loggedUser.id,
site: isOrgCompActive && chargingStation.siteArea ? chargingStation.siteArea.site.id : null,
site: isOrgCompActive ? chargingStation.siteID : null,
sites: loggedUser.sites,
sitesAdmin: loggedUser.sitesAdmin
};
Expand Down Expand Up @@ -1068,9 +1068,8 @@ export default class Authorizations {
});
}
// Site -----------------------------------------------------
chargingStation.siteArea.site = chargingStation.siteArea.site ??
(chargingStation.siteArea.siteID ? await SiteStorage.getSite(tenant, chargingStation.siteArea.siteID) : null);
if (!chargingStation.siteArea.site) {
chargingStation.site = await SiteStorage.getSite(tenant, chargingStation.siteID);
if (!chargingStation.site) {
// Reject Site Not Found
throw new BackendError({
source: chargingStation.id,
Expand Down
6 changes: 3 additions & 3 deletions src/authorization/AuthorizationsDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
attributes: [
'id', 'inactive', 'public', 'chargingStationURL', 'issuer', 'maximumPower', 'excludeFromSmartCharging', 'lastReboot',
'siteAreaID', 'siteArea.id', 'siteArea.name', 'siteArea.smartCharging', 'siteArea.siteID',
'siteArea.site.id', 'siteArea.site.name', 'siteID', 'voltage', 'coordinates', 'forceInactive', 'manualConfiguration', 'firmwareUpdateStatus',
'site.id', 'site.name', 'siteID', 'voltage', 'coordinates', 'forceInactive', 'manualConfiguration', 'firmwareUpdateStatus',
'capabilities', 'endpoint', 'chargePointVendor', 'chargePointModel', 'ocppVersion', 'ocppProtocol', 'lastSeen',
'firmwareVersion', 'currentIPAddress', 'ocppStandardParameters', 'ocppVendorParameters', 'connectors', 'chargePoints',
'createdOn', 'chargeBoxSerialNumber', 'chargePointSerialNumber', 'powerLimitUnit'
Expand Down Expand Up @@ -471,7 +471,7 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
attributes: [
'id', 'inactive', 'public', 'chargingStationURL', 'issuer', 'maximumPower', 'excludeFromSmartCharging', 'lastReboot',
'siteAreaID', 'siteArea.id', 'siteArea.name', 'siteArea.smartCharging', 'siteArea.siteID',
'siteArea.site.id', 'siteArea.site.name', 'siteID', 'voltage', 'coordinates', 'forceInactive', 'manualConfiguration', 'firmwareUpdateStatus',
'site.id', 'site.name', 'siteID', 'voltage', 'coordinates', 'forceInactive', 'manualConfiguration', 'firmwareUpdateStatus',
'capabilities', 'endpoint', 'chargePointVendor', 'chargePointModel', 'ocppVersion', 'ocppProtocol', 'lastSeen',
'firmwareVersion', 'currentIPAddress', 'ocppStandardParameters', 'ocppVendorParameters', 'connectors', 'chargePoints',
'createdOn', 'chargeBoxSerialNumber', 'chargePointSerialNumber', 'powerLimitUnit'
Expand Down Expand Up @@ -661,7 +661,7 @@ const AUTHORIZATION_DEFINITION: AuthorizationDefinition = {
attributes: [
'id', 'inactive', 'public', 'chargingStationURL', 'issuer', 'maximumPower', 'excludeFromSmartCharging', 'lastReboot',
'siteAreaID', 'siteArea.id', 'siteArea.name', 'siteArea.smartCharging', 'siteArea.siteID',
'siteArea.site.id', 'siteArea.site.name', 'siteID', 'voltage', 'coordinates', 'forceInactive', 'manualConfiguration', 'firmwareUpdateStatus',
'site.id', 'site.name', 'siteID', 'voltage', 'coordinates', 'forceInactive', 'manualConfiguration', 'firmwareUpdateStatus',
'capabilities', 'endpoint', 'chargePointVendor', 'chargePointModel', 'ocppVersion', 'ocppProtocol', 'lastSeen',
'firmwareVersion', 'currentIPAddress', 'ocppStandardParameters', 'ocppVendorParameters', 'connectors', 'chargePoints',
'createdOn', 'chargeBoxSerialNumber', 'chargePointSerialNumber', 'powerLimitUnit'
Expand Down
2 changes: 1 addition & 1 deletion src/client/ocpi/CpoOCPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ export default class CpoOCPIClient extends OCPIClient {
}
// Save
const executionDurationSecs = (new Date().getTime() - startTime) / 1000;
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant.id, this.ocpiEndpoint);
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant, this.ocpiEndpoint);
await Logging.logOcpiResult(this.tenant.id, ServerAction.OCPI_PATCH_STATUS,
MODULE_NAME, 'sendEVSEStatuses', result,
`{{inSuccess}} EVSE Status(es) were successfully patched in ${executionDurationSecs}s`,
Expand Down
7 changes: 4 additions & 3 deletions src/client/ocpi/EmspOCPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default class EmspOCPIClient extends OCPIClient {
};
}
// Save
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant.id, this.ocpiEndpoint);
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant, this.ocpiEndpoint);
const executionDurationSecs = (new Date().getTime() - startTime) / 1000;
await Logging.logOcpiResult(this.tenant.id, ServerAction.OCPI_PUSH_TOKENS,
MODULE_NAME, 'sendTokens', result,
Expand Down Expand Up @@ -346,7 +346,7 @@ export default class EmspOCPIClient extends OCPIClient {
const locationName = site.name + Constants.OCPI_SEPARATOR + location.id;
// Handle Site Area
const siteAreas = await SiteAreaStorage.getSiteAreas(this.tenant.id,
{ siteIDs: [site.id], name: locationName, issuer: false },
{ siteIDs: [site.id], name: locationName, issuer: false, withSite: true },
Constants.DB_PARAMS_SINGLE_RECORD);
let siteArea = !Utils.isEmptyArray(siteAreas.result) ? siteAreas.result[0] : null;
if (!siteArea) {
Expand Down Expand Up @@ -402,8 +402,9 @@ export default class EmspOCPIClient extends OCPIClient {
}
// Update Charging Station
const chargingStation = OCPIUtilsService.convertEvseToChargingStation(evse, location);
chargingStation.siteAreaID = siteArea.id;
chargingStation.companyID = siteArea.site?.companyID;
chargingStation.siteID = siteArea.siteID;
chargingStation.siteAreaID = siteArea.id;
await ChargingStationStorage.saveChargingStation(this.tenant.id, chargingStation);
await ChargingStationStorage.saveChargingStationOcpiData(this.tenant.id, chargingStation.id, chargingStation.ocpiData);
await Logging.logDebug({
Expand Down
4 changes: 2 additions & 2 deletions src/client/ocpi/OCPIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default abstract class OCPIClient {
await this.deleteCredentials();
// Save endpoint
this.ocpiEndpoint.status = OCPIRegistrationStatus.UNREGISTERED;
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant.id, this.ocpiEndpoint);
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant, this.ocpiEndpoint);
// Send success
unregisterResult.statusCode = StatusCodes.OK;
unregisterResult.statusText = ReasonPhrases.OK;
Expand Down Expand Up @@ -140,7 +140,7 @@ export default abstract class OCPIClient {
this.ocpiEndpoint.businessDetails = credential.business_details;
// Save endpoint
this.ocpiEndpoint.status = OCPIRegistrationStatus.REGISTERED;
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant.id, this.ocpiEndpoint);
await OCPIEndpointStorage.saveOcpiEndpoint(this.tenant, this.ocpiEndpoint);
// Send success
registerResult.statusCode = StatusCodes.OK;
registerResult.statusText = ReasonPhrases.OK;
Expand Down
4 changes: 2 additions & 2 deletions src/client/ocpi/OCPIClientFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class OCPIClientFactory {
}

static async getAvailableOcpiClient(tenant: Tenant, ocpiRole: OCPIRole): Promise<CpoOCPIClient|EmspOCPIClient> {
const ocpiEndpoints = await OCPIEndpointStorage.getOcpiEndpoints(tenant.id, { role: ocpiRole }, Constants.DB_PARAMS_MAX_LIMIT);
const ocpiEndpoints = await OCPIEndpointStorage.getOcpiEndpoints(tenant, { role: ocpiRole }, Constants.DB_PARAMS_MAX_LIMIT);
for (const ocpiEndpoint of ocpiEndpoints.result) {
if (ocpiEndpoint.status === OCPIRegistrationStatus.REGISTERED) {
const client = await OCPIClientFactory.getOcpiClient(tenant, ocpiEndpoint);
Expand All @@ -85,7 +85,7 @@ export default class OCPIClientFactory {
}

static async getChargingStationClient(tenant: Tenant, chargingStation: ChargingStation): Promise<OCPIChargingStationClient> {
const ocpiEndpoints = await OCPIEndpointStorage.getOcpiEndpoints(tenant.id, { role: OCPIRole.EMSP }, Constants.DB_PARAMS_MAX_LIMIT);
const ocpiEndpoints = await OCPIEndpointStorage.getOcpiEndpoints(tenant, { role: OCPIRole.EMSP }, Constants.DB_PARAMS_MAX_LIMIT);
for (const ocpiEndpoint of ocpiEndpoints.result) {
if (ocpiEndpoint.status === OCPIRegistrationStatus.REGISTERED) {
const client = await OCPIClientFactory.getEmspOcpiClient(tenant, ocpiEndpoint);
Expand Down
4 changes: 2 additions & 2 deletions src/client/oicp/CpoOICPClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default class CpoOICPClient extends OICPClient {
do {
// Get all charging stations from tenant
chargingStations = (await ChargingStationStorage.getChargingStations(this.tenant.id,
{ siteIDs: [site.id], public: true }, { skip: currentChargingStationSkip, limit: Constants.DB_RECORD_COUNT_DEFAULT })).result;
{ siteIDs: [site.id], public: true, withSiteArea: true }, { skip: currentChargingStationSkip, limit: Constants.DB_RECORD_COUNT_DEFAULT })).result;
if (!Utils.isEmptyArray(chargingStations)) {
// Convert (public) charging stations to OICP EVSEs
const evses = await OICPUtils.convertChargingStationsToEVSEs(this.tenant, site, chargingStations, options);
Expand Down Expand Up @@ -358,7 +358,7 @@ export default class CpoOICPClient extends OICPClient {
do {
// Get all charging stations from tenant
chargingStations = (await ChargingStationStorage.getChargingStations(this.tenant.id,
{ siteIDs: [site.id], public: true }, { skip: currentChargingStationSkip, limit: Constants.DB_RECORD_COUNT_DEFAULT })).result;
{ siteIDs: [site.id], public: true, withSiteArea: true }, { skip: currentChargingStationSkip, limit: Constants.DB_RECORD_COUNT_DEFAULT })).result;
if (!Utils.isEmptyArray(chargingStations)) {
// Convert (public) charging stations to OICP EVSE Statuses
const evseStatuses = OICPUtils.convertChargingStationsToEvseStatuses(chargingStations, options);
Expand Down
2 changes: 1 addition & 1 deletion src/integration/refund/concur
2 changes: 1 addition & 1 deletion src/integration/smart-charging/sap-smart-charging
4 changes: 4 additions & 0 deletions src/migration/MigrationHandler.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import AddCompanyIDToChargingStationsTask from './tasks/AddCompanyIDToChargingStationsTask';
import AddCompanyIDToTransactionsTask from './tasks/AddCompanyIDToTransactionsTask';
import Constants from '../utils/Constants';
import { LockEntity } from '../types/Locking';
import LockingManager from '../locking/LockingManager';
Expand Down Expand Up @@ -86,6 +88,8 @@ export default class MigrationHandler {
private static createMigrationTasks(): MigrationTask[] {
const currentMigrationTasks: MigrationTask[] = [];
currentMigrationTasks.push(new RemoveDuplicateTagVisualIDsTask());
currentMigrationTasks.push(new AddCompanyIDToTransactionsTask());
currentMigrationTasks.push(new AddCompanyIDToChargingStationsTask());
return currentMigrationTasks;
}

Expand Down
Loading

0 comments on commit 24799bb

Please sign in to comment.