A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / extensions / ext-wernis.php
index 47e8c7d84baac9e3bf60039c23aa641323164248..96605d0c808ffbbe4c8db9b1966ef8c3cdf6f3e7 100644 (file)
@@ -41,10 +41,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version of this extension
-setThisExtensionVersion('0.0.4');
+setThisExtensionVersion('0.0.5');
 
 // Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
+setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running
@@ -56,7 +56,7 @@ switch (getExtensionMode()) {
 `wernis_account` VARCHAR(255) NOT NULL DEFAULT '',
 `wernis_amount` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `wernis_timestamp` VARCHAR(10) NOT NULL DEFAULT 0,
-`wernis_type` ENUM('IN','OUT') NOT NULL DEFAULT 'OUT',
+`wernis_type` ENUM('WITHDRAW','PAYOUT','FAILED') NOT NULL DEFAULT 'FAILED',
 `wernis_api_message` TINYTEXT,
 `wernis_api_status` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
@@ -136,7 +136,7 @@ INDEX (`userid`)",
                                break;
 
                        case '0.0.4': // SQL queries for v0.0.4
-                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`, `column_name`, `locked_mode`, `payment_method`) VALUES ('wernis_withdraw','order_points','LOCKED','DIRECT')");
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('wernis_withdraw','order_points','LOCKED','DIRECT')");
 
                                // This depends on ext-sql_patches
                                addExtensionDependency('sql_patches');
@@ -144,6 +144,13 @@ INDEX (`userid`)",
                                // Update notes
                                setExtensionUpdateNotes("&Uuml;berweisungen vom Portal werden nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
                                break;
+
+                       case '0.0.5': // SQL queries for v0.0.5
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_wernis` CHANGE `wernis_type` `wernis_type` ENUM('WITHDRAW','PAYOUT','FAILED') NOT NULL DEFAULT 'FAILED'");
+
+                               // Update notes
+                               setExtensionUpdateNotes("IN/OUT ersetzt mit WITHDRAW/PAYOUT.");
+                               break;
                } // END - switch
                break;