From: Elena Mamontova Date: Tue, 7 Jun 2016 07:36:26 +0000 (+0300) Subject: Ticket 37. if (version > 7) check added and the 'change_policy' field X-Git-Tag: 2.409~159 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/5280c0e68f3c1f2a9d1a4d69fa65a0cbdb96f004 Ticket 37. if (version > 7) check added and the 'change_policy' field added to the UPDATE tb_tariffs query in the SaveTariff() function. --- diff --git a/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp b/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp index 045411b1..8620ef60 100644 --- a/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp +++ b/projects/stargazer/plugins/store/postgresql/postgresql_store_tariffs.cpp @@ -317,6 +317,9 @@ int32_t id; if (version > 6) query << ", period = '" << TARIFF::PeriodToString(td.tariffConf.period) << "'"; + if (version > 7) + query << ", change_policy = '" << TARIFF::ChangePolicyToString(td.tariffConf.changePolicy) << "'"; + query << " WHERE pk_tariff = " << id; result = PQexec(connection, query.str().c_str());