Happy New Year!
[platal.git] / upgrade / newdirectory-0.0.1 / 06_education.sql
index 631941c..ef9ecfc 100644 (file)
@@ -38,7 +38,7 @@ CREATE TABLE profile_education_enum (
 
 CREATE TABLE profile_education (
   id TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
 
 CREATE TABLE profile_education (
   id TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
-  uid INT(11) NOT NULL DEFAULT 0,
+  pid INT(11) NOT NULL DEFAULT 0,
   eduid INT(4) NOT NULL DEFAULT 0,
   degreeid INT(4) NOT NULL DEFAULT 0,
   fieldid INT(2) NOT NULL DEFAULT 0,
   eduid INT(4) NOT NULL DEFAULT 0,
   degreeid INT(4) NOT NULL DEFAULT 0,
   fieldid INT(2) NOT NULL DEFAULT 0,
@@ -46,8 +46,8 @@ CREATE TABLE profile_education (
   grad_year INT(4) DEFAULT NULL,
   program VARCHAR(255) DEFAULT NULL,
   flags SET('primary') DEFAULT '' NOT NULL,
   grad_year INT(4) DEFAULT NULL,
   program VARCHAR(255) DEFAULT NULL,
   flags SET('primary') DEFAULT '' NOT NULL,
-  PRIMARY KEY(id, uid),
-  INDEX uid (uid)
+  PRIMARY KEY(id, pid),
+  INDEX pid (pid)
 ) ENGINE=InnoDB, CHARSET=utf8;
 
 INSERT INTO  profile_education_field_enum (field)
 ) ENGINE=InnoDB, CHARSET=utf8;
 
 INSERT INTO  profile_education_field_enum (field)
@@ -71,7 +71,7 @@ INSERT INTO  profile_education_enum (id, name, url)
      SELECT  id, text, url
        FROM  #x4dat#.applis_def;
 
      SELECT  id, text, url
        FROM  #x4dat#.applis_def;
 
-INSERT INTO  profile_education (id, uid, eduid, degreeid)
+INSERT INTO  profile_education (id, pid, eduid, degreeid)
      SELECT  a.ordre, a.uid, a.aid, d.id
        FROM  #x4dat#.applis_ins AS a
  INNER JOIN  profile_education_degree_enum AS d ON (a.type = d.degree);
      SELECT  a.ordre, a.uid, a.aid, d.id
        FROM  #x4dat#.applis_ins AS a
  INNER JOIN  profile_education_degree_enum AS d ON (a.type = d.degree);
@@ -85,19 +85,20 @@ INSERT IGNORE INTO  watch_profile (uid, ts, field)
               FROM  watch_profile
              WHERE  field = 'appli2';
 
               FROM  watch_profile
              WHERE  field = 'appli2';
 
-ALTER TABLE watch_profile MODIFY field enum('nom', 'freetext', 'mobile', 'nationalite', 'nationalite2',
-                                            'nationalite3', 'nick', 'web', 'networking', 'appli1', 'appli2',
-                                            'edus', 'addresses', 'section', 'binets', 'medals', 'cv', 'jobs',
-                                            'photo');
+ALTER TABLE  watch_profile
+     MODIFY  field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3',
+                        'nick', 'networking', 'appli1', 'appli2', 'edus', 'addresses', 'section',
+                        'binets', 'medals', 'cv', 'jobs', 'photo');
 
 UPDATE watch_profile SET field = 'edus' WHERE field = 'appli1';
 
 
 DELETE FROM watch_profile WHERE field = 'appli2';
 
 
 UPDATE watch_profile SET field = 'edus' WHERE field = 'appli1';
 
 
 DELETE FROM watch_profile WHERE field = 'appli2';
 
-ALTER TABLE watch_profile MODIFY field enum('nom', 'freetext', 'mobile', 'nationalite', 'nationalite2',
-                                            'nationalite3', 'nick', 'web', 'networking', 'edus', 'addresses',
-                                            'section', 'binets', 'medals', 'cv', 'jobs', 'photo');
+ALTER TABLE  watch_profile
+     MODIFY  field ENUM('nom', 'freetext', 'mobile', 'nationality1', 'nationality2', 'nationality3',
+                        'nick', 'networking', 'edus', 'addresses', 'section', 'binets', 'medals',
+                        'cv', 'jobs', 'photo');
 
 # vim:set syntax=mysql:
 
 
 # vim:set syntax=mysql: