X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=1f3466aa979b383c0bd5b233e039451554719e33;hb=50ec4267016d288831aee809120992423db563e1;hp=2b2db4e8a9ae8f2ab541f9e6d04c9b471cd58ac7;hpb=8f37a3b2708cfc4b4ef266f4be813a84511daa8f;p=mailer.git diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 2b2db4e8a9..1f3466aa97 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -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