]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-country.php
Menu entries moved to ext-user:
[mailer.git] / inc / extensions / ext-country.php
index a5a836bd36bb01f325a231a823eccb4b6de012c4..f7a229d83ac8acac26b421bb3b5e88391554c4dc 100644 (file)
@@ -43,8 +43,8 @@ if (!defined('__SECURITY')) {
 // Version number
 setThisExtensionVersion('0.0.4');
 
-// Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
+// 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'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -53,14 +53,16 @@ switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running
                // SQL commands to run
                addDropTableSql('countries');
-               addCreateTableSql('countries', "(
+               addCreateTableSql('countries', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `code` CHAR(2) NOT NULL DEFAULT 'DE',
 `descr` VARCHAR(255) NOT NULL DEFAULT 'Deutschland',
 `is_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
-KEY (`code`),
-PRIMARY KEY (`id`)
-) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Country codes and their full-length descriptions'");
+PRIMARY KEY (`id`),
+UNIQUE (`code`)",
+                       'Country codes and their full-length descriptions');
+
+               // Insert first (Germany) country
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
 
                // Admin menu