]> git.stg.codes - stg.git/commitdiff
Ticket 37. The 'change_policy_timeout' field added for UPDATE tariffs SET
authorElena Mamontova <helenh463@gmail.com>
Tue, 11 Oct 2016 15:38:03 +0000 (18:38 +0300)
committerElena Mamontova <helenh463@gmail.com>
Tue, 11 Oct 2016 15:38:03 +0000 (18:38 +0300)
query in the if(schemaversion > 1) construction.

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

index 2600c85980de602eee14a8eeeb73cc8eadb14634..198b5f3b812375fcfe88ef3fa532865f45eb1cac 100644 (file)
@@ -1766,7 +1766,8 @@ if (schemaVersion > 0)
     res += ", Period='" + TARIFF::PeriodToString(td.tariffConf.period) + "'";
 
 if (schemaVersion > 1)
     res += ", Period='" + TARIFF::PeriodToString(td.tariffConf.period) + "'";
 
 if (schemaVersion > 1)
-    res += ", change_policy='" + TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) + "'";
+    res += ", change_policy='" + TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) + "'"\
+           ", change_policy_timeout='" + formatTime(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;