AntonLV 10 rokov pred
rodič
commit
e0f3d34582

+ 3 - 1
modules/boonex/payment/updates/9.0.0_9.0.1/install/installer.php

@@ -17,9 +17,11 @@ class BxPaymentUpdater extends BxDolStudioUpdater
 			if(!$this->oDb->isFieldExists('bx_payment_providers', 'for_single'))
 				$this->oDb->query("ALTER TABLE `bx_payment_providers` ADD `for_single` tinyint(4) NOT NULL default '0' AFTER `for_visitor`");
 
-			if(!$this->oDb->isFieldExists('bx_payment_providers', 'for_subscription'))
+			if($this->oDb->isFieldExists('bx_payment_providers', 'for_subscription'))
         		$this->oDb->query("ALTER TABLE `bx_payment_providers` CHANGE `for_subscription` `for_recurring` tinyint(4) NOT NULL default '0'");
 
+        	if(!$this->oDb->isFieldExists('bx_payment_providers', 'for_recurring'))
+        		$this->oDb->query("ALTER TABLE `bx_payment_providers` ADD `for_recurring` tinyint(4) NOT NULL default '0' AFTER `for_single`");
 		}
 
     	return parent::actionExecuteSql($sOperation);