]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-country.php
Hotfix
[mailer.git] / inc / extensions / ext-country.php
index 2b2db4e8a9ae8f2ab541f9e6d04c9b471cd58ac7..1f3466aa979b383c0bd5b233e039451554719e33 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -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