More default values rewritten, UNSIGNED added to many numerical database columns...
[mailer.git] / inc / extensions / ext-doubler.php
index 97160da4ea05575d195c807e6073e118562d7f6c..20c4beef30c5b01425cec1941daa2beb7f7c8e2c 100644 (file)
@@ -55,7 +55,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
+points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 remote_ip VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
 timemark VARCHAR(10) NOT NULL DEFAULT '',
 completed ENUM('Y','N') NOT NULL DEFAULT 'N',
@@ -69,9 +69,9 @@ PRIMARY KEY(id)
        // --- SETTINGS ---
        //
        // Minimum points to double
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
        // Maximum points to double
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000";
        // Points left on users account after doubling
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000";
        // Charge for doubling points which goes to the webmaster (shreddered in fact!)
@@ -83,7 +83,7 @@ PRIMARY KEY(id)
        // A user account to take points from (default: 0->none)
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
        // Total payed out points from your doublers
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
        // Sending mode of mails (immediately/daily reset)
        // --> This also means who fast the doubled points will be payed out!
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'";
@@ -96,7 +96,7 @@ PRIMARY KEY(id)
        // Number of entries which are already payed out
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
        // Points used by every member
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
        // Counter for usage of the doubler
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
 
@@ -147,7 +147,7 @@ case "update": // Update an extension
 
        case "0.0.2": // SQL queries for v0.0.2
                // Total used points
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Gebühr wird vom Verdoppler-Pott abgezogen.";