785ce314eaf1f404d6212f237ae8ded1acf7f86c
[platal.git] / upgrade / newdirectory-0.0.1 / 10_promotion.sql
1 INSERT INTO profile_education (id, uid, grad_year, entry_year, eduid, degreeid, flags)
2 SELECT 100, u.user_id, u.promo_sortie, u.promo, e.id, d.id, 'primary'
3 FROM auth_user_md5 AS u
4 LEFT JOIN profile_education_enum AS e ON (e.abbreviation = "X")
5 LEFT JOIN profile_education_degree_enum AS d ON (d.degree = "Ingénieur");
6
7 REPLACE IGNORE INTO profile_display (pid, promo)
8 SELECT uid, CONCAT("X", entry_year)
9 FROM profile_education
10 WHERE FIND_IN_SET('primary', flags);
11
12 -- vim:set syntax=mysql: