From: Elena Mamontova Date: Tue, 21 Jun 2016 10:14:41 +0000 (+0300) Subject: Ticket 37. if (schemaVersion > 1) check added and the 'change_policy' field X-Git-Tag: 2.409~151 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/78ccb2eb289afed7f0d7804f88dca7afb3536669?ds=inline Ticket 37. if (schemaVersion > 1) check added and the 'change_policy' field added to the UPDATE tariffs query in the SaveTariff() function. --- 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;