]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/mysql/mysql_store.cpp
Ticket 37. ALTER TABLE tariffs query added for change_policy_timeout
[stg.git] / projects / stargazer / plugins / store / mysql / mysql_store.cpp
index fb8b085c4b69c66ba14ac91373ce1e7cc6d1f126..e423c672b162d7c48564b8db541ec4be9ad07ee4 100644 (file)
@@ -605,7 +605,8 @@ if (schemaVersion  < 1)
 
 if (schemaVersion  < 2)
     {
-    if (MysqlQuery("ALTER TABLE tariffs ADD change_policy VARCHAR(32) NOT NULL DEFAULT 'allow'", sock))
+    if (MysqlQuery("ALTER TABLE tariffs ADD change_policy VARCHAR(32) NOT NULL DEFAULT 'allow'", sock) ||
+        MysqlQuery("ALTER TABLE tariffs ADD change_policy_timeout TIMEZONE NOT NULL DEFAULT '1970-01-01 00:00:00'", sock))
         {
         errorStr = "Couldn't update tariffs table to version 2. With error:\n";
         errorStr += mysql_error(sock);