]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-booking.php
Some major rewrites + ext-network continued:
[mailer.git] / inc / extensions / ext-booking.php
index 50cfdf62545f0c193f62fb47594d42e05d369437..5a5d6eaae02eef71063885110a56c401038fbe2d 100644 (file)
@@ -41,14 +41,14 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.0.0');
+setThisExtensionVersion('0.0.1');
 
 // Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0'));
+setExtensionVersionHistory(array('0.0.0', '0.0.1'));
 
 // Check extension load-mode
 switch (getExtensionMode()) {
-       case 'register': // Do stuff when installation is running
+       case 'setup': // Do stuff when installation is running
                // Configuration entries
                addConfigAddSql('booking_page_count', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
                addConfigAddSql('booking_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3));
@@ -64,7 +64,7 @@ switch (getExtensionMode()) {
 `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.0000,
 `comments` TINYTEXT NULL DEFAULT NULL,
 `recorded` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-PRIMARY KEY (`id`),
+PRIMARY KEY (`booking_id`),
 INDEX (`userid`)",
                        'Member points booking table');
 
@@ -105,10 +105,10 @@ INDEX (`userid`)",
        case 'update': // Update an extension
                switch (getCurrentExtensionVersion()) {
                        case '0.0.1': // SQL queries for v0.0.1
-                               addExtensionSql('');
+                               addExtensionChangeTableColumnSql('user_booking', 'id', 'booking_id', 'BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT');
 
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes('');
+                               setExtensionUpdateNotes("Spalte <strong>id</strong umbenannt nach <strong>booking_id</strong>, da <em>id</em> zu allgemein ist (sollte am besten &uuml;berall folgen).");
                                break;
                } // END - switch
 
@@ -122,7 +122,7 @@ INDEX (`userid`)",
                break;
 
        default: // Unknown extension mode
-               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
+               reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
 } // END - switch