From 78ccb2eb289afed7f0d7804f88dca7afb3536669 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Tue, 21 Jun 2016 13:14:41 +0300 Subject: [PATCH 1/1] Ticket 37. if (schemaVersion > 1) check added and the 'change_policy' field added to the UPDATE tariffs query in the SaveTariff() function. --- projects/stargazer/plugins/store/mysql/mysql_store.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/stargazer/plugins/store/mysql/mysql_store.cpp b/projects/stargazer/plugins/store/mysql/mysql_store.cpp index 754a9ee2..f3539dd6 100644 --- a/projects/stargazer/plugins/store/mysql/mysql_store.cpp +++ b/projects/stargazer/plugins/store/mysql/mysql_store.cpp @@ -1748,6 +1748,9 @@ res += " TraffType='" + TARIFF::TraffTypeToString(td.tariffConf.traffType) + "'" if (schemaVersion > 0) res += ", Period='" + TARIFF::PeriodToString(td.tariffConf.period) + "'"; +if (schemaVersion > 1) + res += ", change_policy='" + TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) + "'"; + strprintf(¶m, " WHERE name='%s' LIMIT 1", tariffName.c_str()); res += param; -- 2.44.2