Update import scripts: create table using InnoDB engine.
[platal.git] / upgrade / newdirectory-0.0.1 / 15_addresses.sql
index 2311f47..8a95d0a 100644 (file)
@@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS profile_addresses (
   INDEX administrativeAreaId (administrativeAreaId),
   INDEX subAdministrativeAreaId (subAdministrativeAreaId),
   INDEX countryId (countryId)
-) CHARSET=utf8;
+) ENGINE=InnoDB, CHARSET=utf8;
 
 INSERT INTO  profile_addresses (pid, id, postalCode, updateTime, pub, comment, latitude, longitude, countryId,
                                 type, flags)
@@ -42,7 +42,7 @@ INSERT INTO  profile_addresses (pid, id, postalCode, updateTime, pub, comment, l
                     IF(FIND_IN_SET('courrier', 'statut'), 'mail,', ''),
                     IF(FIND_IN_SET('active', 'statut'), 'current,', ''),
                     IF(FIND_IN_SET('temporaire', 'statut'), 'temporary', ''))
-       FROM  adresses;
+       FROM  #x4dat#.adresses;
 
 CREATE TABLE IF NOT EXISTS geoloc_countries (
   iso_3166_1_a2 CHAR(2) NOT NULL,
@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS geoloc_countries (
   UNIQUE KEY(iso_3166_1_num),
   INDEX(iso_3166_1_a2),
   INDEX(phonePrefix)
-) CHARSET=utf8;
+) ENGINE=InnoDB, CHARSET=utf8;
 
 UPDATE  geoloc_pays
    SET  n3 = 450
@@ -78,6 +78,7 @@ INSERT INTO  geoloc_countries (iso_3166_1_a2, iso_3166_1_a3, iso_3166_1_num, wor
                                phonePrefix, phoneFormat, licensePlate)
      SELECT  a2, a3, n3, worldrgn, pays, country, capital, nat, phoneprf, phoneformat, license_plate
        FROM  geoloc_pays;
+DROP TABLE geoloc_pays;
 
 CREATE TABLE IF NOT EXISTS geoloc_administrativeareas (
   id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -88,7 +89,7 @@ CREATE TABLE IF NOT EXISTS geoloc_administrativeareas (
   INDEX(id),
   INDEX(name),
   INDEX(country)
-) CHARSET=utf8;
+) ENGINE=InnoDB, CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS geoloc_subadministrativeareas (
   id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -99,7 +100,7 @@ CREATE TABLE IF NOT EXISTS geoloc_subadministrativeareas (
   INDEX(id),
   INDEX(name),
   INDEX(country)
-) CHARSET=utf8;
+) ENGINE=InnoDB, CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS geoloc_localities (
   id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -110,6 +111,6 @@ CREATE TABLE IF NOT EXISTS geoloc_localities (
   INDEX(id),
   INDEX(name),
   INDEX(country)
-) CHARSET=utf8;
+) ENGINE=InnoDB, CHARSET=utf8;
 
 -- vim:set syntax=mysql: