From: Elena Mamontova Date: Thu, 7 Jul 2016 17:13:28 +0000 (+0300) Subject: Ticket 37. if (schemaVersion > 1) checking added in the RestoreTariff() X-Git-Tag: 2.409~147 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/a6ca732a5ded228a0978fd6e6c9d94199d5e4964?ds=sidebyside Ticket 37. if (schemaVersion > 1) checking added in the RestoreTariff() function. --- diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp index d86a1f77..2ca60e7f 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp @@ -307,6 +307,8 @@ try td->tariffConf.traffType = TARIFF::IntToTraffType(Get(st, 6)); if (schemaVersion > 0) td->tariffConf.period = TARIFF::StringToPeriod(Get(st, 7)); + if (schemaVersion > 1) + td->tariffConf.changePolicy = TARIFF::StringToChangePolicy(Get(st, 8)); st->Close(); st->Prepare("select * from tb_tariffs_params where fk_tariff = ?"); st->Set(1, id);