]> git.stg.codes - stg.git/commitdiff
Ticket 37. if (schemaVersion > 1) checking added in the RestoreTariff()
authorElena Mamontova <helenh463@gmail.com>
Thu, 7 Jul 2016 17:13:28 +0000 (20:13 +0300)
committerElena Mamontova <helenh463@gmail.com>
Thu, 7 Jul 2016 17:13:28 +0000 (20:13 +0300)
    function.

projects/stargazer/plugins/store/firebird/firebird_store_tariffs.cpp

index d86a1f7779402d923b6656d3ec2df0f6e3769f6f..2ca60e7fc4672e62310c659a35f7e085c94a3a95 100644 (file)
@@ -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));
     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);
     st->Close();
     st->Prepare("select * from tb_tariffs_params where fk_tariff = ?");
     st->Set(1, id);