X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/c4731aeaa82ed94af67f4697abf58221a2f43adf..2085e9c166c0521254a62aaebbbb7e432834f74d:/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 f2d70879..2ca60e7f 100644
--- a/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp
+++ b/projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp
@@ -175,7 +175,7 @@ try
                     free = ?, \
                     passive_cost = ?, \
                     traff_type = ?, \
-                    period = ? \
+                    period = ?, \
                     change_policy = ? \
                     where pk_tariff = ?");
             st->Set(1, td.tariffConf.fee);
@@ -307,6 +307,8 @@ try
     td->tariffConf.traffType = TARIFF::IntToTraffType(Get<int>(st, 6));
     if (schemaVersion > 0)
         td->tariffConf.period = TARIFF::StringToPeriod(Get<std::string>(st, 7));
+    if (schemaVersion > 1)
+        td->tariffConf.changePolicy = TARIFF::StringToChangePolicy(Get<std::string>(st, 8));
     st->Close();
     st->Prepare("select * from tb_tariffs_params where fk_tariff = ?");
     st->Set(1, id);