X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-country.php;h=a8a8fe739294ff1da0fd5c1219d5d322cdb65b9e;hp=2b2db4e8a9ae8f2ab541f9e6d04c9b471cd58ac7;hb=3f7f0051c91c54cb691303b9d49fb9cd1a7a4e8c;hpb=9f9d88d5c69948a0306c3d362b42793ae59c8553 diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index 2b2db4e8a9..a8a8fe7392 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -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 KEY (`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