]> git.stg.codes - stg.git/commitdiff
Ticket 37. if (schemaVersion > 1) check added and the 'change_policy' field
authorElena Mamontova <helenh463@gmail.com>
Tue, 21 Jun 2016 10:14:41 +0000 (13:14 +0300)
committerElena Mamontova <helenh463@gmail.com>
Tue, 21 Jun 2016 10:14:41 +0000 (13:14 +0300)
    added to the UPDATE tariffs query in the SaveTariff() function.

projects/stargazer/plugins/store/mysql/mysql_store.cpp

index 754a9ee223483094ca8dd90437a3a275bf16e6e4..f3539dd6fa2f1283bd7fe91f8b49895ae9cf50f9 100644 (file)
@@ -1748,6 +1748,9 @@ res += " TraffType='" + TARIFF::TraffTypeToString(td.tariffConf.traffType) + "'"
 if (schemaVersion > 0)
     res += ", Period='" + TARIFF::PeriodToString(td.tariffConf.period) + "'";
 
 if (schemaVersion > 0)
     res += ", Period='" + TARIFF::PeriodToString(td.tariffConf.period) + "'";
 
+if (schemaVersion > 1)
+    res += ", change_policy='" + TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) + "'";
+
 strprintf(&param, " WHERE name='%s' LIMIT 1", tariffName.c_str());
 res += param;
 
 strprintf(&param, " WHERE name='%s' LIMIT 1", tariffName.c_str());
 res += param;