X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/f971bb53a8b621f48d97e0a54fd88ef6903b99ec..7377ab11320e17a5368a731fa7b0d93cd9415e81:/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp index 3e82e16f..72d83851 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp @@ -173,7 +173,12 @@ try if (schemaVersion > 0) st->Set(5, TARIFF::PeriodToString(td.tariffConf.period)); if (schemaVersion > 1) + { st->Set(6, TARIFF::ChangePolicyToString(td.tariffConf.changePolicy)); + IBPP::Timestamp policyTimeout; + time_t2ts(td.tariffConf.changePolicyTimeout, &policyTimeout); + st->Set(7, policyTimeout); + } st->Set(7, id); st->Execute(); @@ -283,7 +288,10 @@ try if (schemaVersion > 0) td->tariffConf.period = TARIFF::StringToPeriod(Get(st, 7)); if (schemaVersion > 1) + { td->tariffConf.changePolicy = TARIFF::StringToChangePolicy(Get(st, 8)); + td->tariffConf.changePolicyTimeout = ts2time_t(Get(st, 9)); + } st->Close(); st->Prepare("select * from tb_tariffs_params where fk_tariff = ?"); st->Set(1, id);