X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=upgrade%2Fnewdirectory-0.0.1%2F09_education.sql;h=d899916eb0599dcaca914f6583aef4028df04e96;hb=9891bd15f772caef0c199a98f036e976bf4ab94a;hp=abf3ba60f095eb721b76734c6cd513bfcd387b72;hpb=e8a898662eeafa5201082067a7aac46573884ebb;p=platal.git diff --git a/upgrade/newdirectory-0.0.1/09_education.sql b/upgrade/newdirectory-0.0.1/09_education.sql index abf3ba6..d899916 100644 --- a/upgrade/newdirectory-0.0.1/09_education.sql +++ b/upgrade/newdirectory-0.0.1/09_education.sql @@ -546,5 +546,18 @@ INSERT INTO profile_education_enum (name, url, country, abbreviation) ('Centre de Formation des Journalistes', 'http://www.cfpj.com/', 'FR', 'CFJ'), ('Institut National des Hautes Études de Sécurité', 'http://www.inhes.interieur.gouv.fr/', 'FR', 'INHES'); + +-- 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 + 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") + INNER JOIN profile_education_field_enum AS f ON (f.field = "Médecine") + WHERE l.name = "Médecine"; + +DELETE FROM profile_education_enum + WHERE name = "Médecine"; + # vim:set syntax=mysql: