Merge remote branch 'origin/platal-1.0.0'
[platal.git] / upgrade / newdirectory-0.0.1 / 09_education.sql
index 6b4b7a6..058ad93 100644 (file)
@@ -26,7 +26,7 @@ INSERT INTO  profile_education_degree_enum (abbreviation, degree, level)
 
 -- Updates universities
 UPDATE profile_education_enum
-SET abbreviation = 'Université Claude Bernard', name = 'Université Claude Bernard (Lyon I)'
+SET abbreviation = 'Université Claude Bernard', name = 'Université Claude Bernard (Lyon 1)'
 WHERE name = 'Université Claude Bernard';
 UPDATE profile_education_enum
 SET abbreviation = 'Télécom', name = 'Télécom ParisTech', url = 'http://www.telecom-paristech.fr/'
@@ -152,6 +152,9 @@ UPDATE profile_education_enum
 SET abbreviation = 'Sciences Po', name = 'Institut d\'Études Politiques de Paris'
 WHERE name = 'IEP Paris';
 UPDATE profile_education_enum
+SET abbreviation = 'Sciences Po Aix', name = 'Institut d\'Études Politiques d\'Aix-en-Provence'
+WHERE name = 'IEP Aix';
+UPDATE profile_education_enum
 SET abbreviation = 'EHESS', name = 'École des Hautes Études en Sciences Sociales'
 WHERE name = 'EHESS';
 UPDATE profile_education_enum
@@ -161,6 +164,9 @@ UPDATE profile_education_enum
 SET abbreviation = 'Grenoble INP', name = 'Institut Polytechnique de Grenoble', url = 'http://www.grenoble-inp.fr/'
 WHERE name = 'INPG';
 UPDATE profile_education_enum
+SET abbreviation = 'UJF'
+WHERE name = 'Université Joseph-Fourier (Grenoble 1)';
+UPDATE profile_education_enum
 SET abbreviation = 'ESSEC', name = 'École Supérieure des Sciences Économiques et Commerciales'
 WHERE name = 'ESSEC';
 UPDATE profile_education_enum
@@ -208,10 +214,15 @@ WHERE name = 'INSA Rouen';
 UPDATE profile_education_enum
 SET abbreviation = 'IAE de Paris', name = 'Institut d\'Administration des Entreprises de Paris', url = 'http://iae.univ-paris1.fr/'
 WHERE name = 'Institut d\'Administration des Entreprises';
+UPDATE profile_education_enum
 SET abbreviation = 'CNSMDP', name = 'Conservatoire National Supérieur de Musique et de Danse de Paris'
 WHERE name = 'Conservatoire national supérieur de musique et de danse de Paris';
+UPDATE profile_education_enum
 SET name = 'École Normale de Musique de Paris'
 WHERE name = 'École normale de musique de Paris';
+UPDATE profile_education_enum
+SET abbreviation = 'ENSMN'
+WHERE name = 'École Nationale Supérieure des Mines de Nancy';
 
 UPDATE profile_education_enum
 SET abbreviation = 'NDU', country = 'US'
@@ -376,6 +387,9 @@ WHERE name = 'Univ Madrid';
 UPDATE profile_education_enum
 SET abbreviation = 'UPF', name = 'Universitat Pompeu Fabra', country = 'ES'
 WHERE name = 'Univ Pompeu Fabra';
+UPDATE profile_education_enum
+SET abbreviation = 'IE', country = 'ES'
+WHERE name = 'Instituto de Empresa';
 
 UPDATE profile_education_enum
 SET abbreviation = 'Chalmers', name = 'Chalmers Tekniska Högskola', country = 'SE'
@@ -481,6 +495,9 @@ WHERE name = 'Univ Cardiff';
 UPDATE profile_education_enum
 SET abbreviation = 'UNSW', name = 'The University of New South Wales', country = 'AU'
 WHERE name = 'Univ New South Wales  (Sydney Australia)';
+UPDATE profile_education_enum
+SET abbreviation = 'USyd', country = 'AU'
+WHERE name = 'University of Sydney';
 
 UPDATE profile_education_enum
 SET abbreviation = 'THU', name = 'Tsinghua University', country = 'CN'
@@ -522,7 +539,7 @@ WHERE name = 'IHEDN';
 
 UPDATE profile_education_enum
 SET name = "Centre des Hautes Études de l'Armement", country = 'FR', url ='http://www.chear.defense.gouv.fr/',
-WHERE name = 'CHEAr'
+abbreviation = 'CHEAr'
 WHERE name = 'CHEAr';
 
 -- Cleans duplicated entries
@@ -607,8 +624,8 @@ INSERT INTO  profile_education_enum (name, url, country, abbreviation)
 
 
 -- Médecine is not a university but an educational field
-REPLACE INTO  profile_education (uid, id, fieldid, eduid, degreeid)
-      SELECT  e.uid, e.id, f.id, 0, d.id
+REPLACE INTO  profile_education (pid, id, fieldid, eduid, degreeid)
+      SELECT  e.pid, e.id, f.id, 0, d.id
         FROM  profile_education             AS e
   INNER JOIN  profile_education_enum        AS l ON (l.id = e.eduid)
   INNER JOIN  profile_education_degree_enum AS d ON (d.degree = "Doctorat")