Skip to content

Commit

Permalink
Changed OCPP modules to use new sql migration paths (#628)
Browse files Browse the repository at this point in the history
* Changed OCPP modules to use new sql migration paths

---------

Signed-off-by: pietfried <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Co-authored-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
Pietfried and hikinggrass authored Apr 18, 2024
1 parent 428758a commit a504f68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ libevse-security:
# OCPP
libocpp:
git: https://github.com/EVerest/libocpp.git
git_tag: 27efcee
git_tag: cc169be
cmake_condition: "EVEREST_DEPENDENCY_ENABLED_LIBOCPP"
# Josev
Josev:
Expand Down
4 changes: 2 additions & 2 deletions modules/OCPP/OCPP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
namespace module {

const std::string CERTS_SUB_DIR = "certs";
const std::string INIT_SQL = "init.sql";
const std::string SQL_CORE_MIGRTATIONS = "core_migrations";
const std::string CHARGE_X_MREC_VENDOR_ID = "https://chargex.inl.gov";

namespace fs = std::filesystem;
Expand Down Expand Up @@ -427,7 +427,7 @@ void OCPP::init() {
create_empty_user_config(user_config_path);
}

const auto sql_init_path = this->ocpp_share_path / INIT_SQL;
const auto sql_init_path = this->ocpp_share_path / SQL_CORE_MIGRTATIONS;
if (!fs::exists(this->config.MessageLogPath)) {
try {
fs::create_directory(this->config.MessageLogPath);
Expand Down
4 changes: 2 additions & 2 deletions modules/OCPP201/OCPP201.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <evse_security_ocpp.hpp>
namespace module {

const std::string INIT_SQL = "init_core.sql";
const std::string SQL_CORE_MIGRTATIONS = "core_migrations";
const std::string CERTS_DIR = "certs";

namespace fs = std::filesystem;
Expand Down Expand Up @@ -419,7 +419,7 @@ void OCPP201::ready() {
};
}

const auto sql_init_path = this->ocpp_share_path / INIT_SQL;
const auto sql_init_path = this->ocpp_share_path / SQL_CORE_MIGRTATIONS;

std::map<int32_t, int32_t> evse_connector_structure = this->get_connector_structure();
this->charge_point = std::make_unique<ocpp::v201::ChargePoint>(
Expand Down

0 comments on commit a504f68

Please sign in to comment.