Seperates scripts for the new directory and scripts for the actuel merge.
authorStéphane Jacob <jacou@melix.net>
Tue, 26 Aug 2008 18:38:18 +0000 (20:38 +0200)
committerStéphane Jacob <jacou@melix.net>
Tue, 26 Aug 2008 18:38:18 +0000 (20:38 +0200)
12 files changed:
upgrade/merge-0.0.1/01_names.sql [new file with mode: 0644]
upgrade/merge-0.0.1/02_emails.sql [moved from upgrade/fusionax-0.0.1/03_emails.sql with 79% similarity]
upgrade/newdirectory-0.0.1/00_names.sql [moved from upgrade/fusionax-0.0.1/00_names.sql with 90% similarity]
upgrade/newdirectory-0.0.1/01_addrcomment.sql [moved from upgrade/fusionax-0.0.1/01_addrcomment.sql with 100% similarity]
upgrade/newdirectory-0.0.1/02_networking.sql [moved from upgrade/fusionax-0.0.1/02_networking.sql with 100% similarity]
upgrade/newdirectory-0.0.1/03_emails.sql [new file with mode: 0644]
upgrade/newdirectory-0.0.1/04_telephone.sql [moved from upgrade/fusionax-0.0.1/04_telephone.sql with 100% similarity]
upgrade/newdirectory-0.0.1/05_nationalities.sql [moved from upgrade/fusionax-0.0.1/05_nationalities.sql with 100% similarity]
upgrade/newdirectory-0.0.1/06_education.sql [moved from upgrade/fusionax-0.0.1/06_education.sql with 100% similarity]
upgrade/newdirectory-0.0.1/connect.db.inc.php [moved from upgrade/fusionax-0.0.1/connect.db.inc.php with 100% similarity]
upgrade/newdirectory-0.0.1/phones.php [moved from upgrade/fusionax-0.0.1/phones.php with 100% similarity]
upgrade/newdirectory-0.0.1/update.sh [moved from upgrade/fusionax-0.0.1/update.sh with 100% similarity]

diff --git a/upgrade/merge-0.0.1/01_names.sql b/upgrade/merge-0.0.1/01_names.sql
new file mode 100644 (file)
index 0000000..b716802
--- /dev/null
@@ -0,0 +1,9 @@
+CREATE OR REPLACE ALGORITHM=MERGE VIEW fusionax_xorg_anciens AS-
+    SELECT
+        u.user_id, u.matricule_ax, u.promo,
+        n.display AS display_name, n.sort AS sort_name,
+        u.nom, u.prenom
+    FROM `auth_user_md5` AS u
+    INNER JOIN `profile_names_display` AS n ON ( n.user_id = u.user_id );
+
+-- vim:set syntax=mysql:
similarity index 79%
rename from upgrade/fusionax-0.0.1/03_emails.sql
rename to upgrade/merge-0.0.1/02_emails.sql
index 1f2455a..30c9ba4 100644 (file)
@@ -1,18 +1,9 @@
-CREATE TABLE IF NOT EXISTS profile_directory (
-    uid INT NOT NULL,
-    email_directory VARCHAR(255) DEFAULT NULL,
-    PRIMARY KEY (uid)
-) CHARSET=utf8;
-
 INSERT INTO  profile_directory (uid, email_directory)
      SELECT  user_id, Mel_usage
        FROM  fusionax_anciens AS ax
  INNER JOIN  auth_user_md5    AS u ON (ax.id_ancien = CONVERT(u.matricule_ax, BINARY))
       WHERE  Mel_publiable != '0' AND Mel_usage != '';
 
-
-ALTER TABLE register_marketing MODIFY COLUMN type ENUM('user', 'staff', 'ax');
-
 INSERT IGNORE INTO  register_marketing (uid, email, type)
             SELECT  user_id, Mel_usage, 'ax'
               FROM  fusionax_anciens AS ax
@@ -25,3 +16,4 @@ INSERT IGNORE INTO  register_marketing (uid, email, type)
                     Mel_usage NOT LIKE '%@melix.%' AND
                     e.email IS NULL;
 
+-- vim:set syntax=mysql:
similarity index 90%
rename from upgrade/fusionax-0.0.1/00_names.sql
rename to upgrade/newdirectory-0.0.1/00_names.sql
index e615bfd..bd0d888 100644 (file)
@@ -20,7 +20,7 @@ INSERT INTO `profile_names_display` (
         IF(`nom_usage` != '',`nom_usage`,`nom`),
         `prenom`
         FROM `auth_user_md5`);
-        
+
 UPDATE `profile_names_display` AS n INNER JOIN `auth_user_md5` AS u ON n.lastname = u.prenom
 SET n.tooltip = CONCAT('Prénom : ', n.firstname,' - Nom : ', n.lastname);
 
@@ -42,12 +42,4 @@ INSERT INTO `profile_names_search` ( SELECT `user_id`, 3, `prenom`, 'firstname',
 INSERT INTO `profile_names_search` ( SELECT `user_id`, 4, `prenom_ini`, 'firstname', 5, 'private' FROM `auth_user_md5` WHERE `prenom_ini` != `prenom` AND `prenom_ini` != '');
 INSERT INTO `profile_names_search` ( SELECT `user_id`, 5, `profile_nick`, 'surname', 7, 'private' FROM `auth_user_quick` WHERE `profile_nick` != '');
 
-CREATE OR REPLACE ALGORITHM=MERGE VIEW fusionax_xorg_anciens AS 
-    SELECT
-        u.user_id, u.matricule_ax, u.promo,
-        n.display AS display_name, n.sort AS sort_name,
-        u.nom, u.prenom
-    FROM `auth_user_md5` AS u
-    INNER JOIN `profile_names_display` AS n ON ( n.user_id = u.user_id );
-
 -- vim:set syntax=mysql:
diff --git a/upgrade/newdirectory-0.0.1/03_emails.sql b/upgrade/newdirectory-0.0.1/03_emails.sql
new file mode 100644 (file)
index 0000000..6ad3c7f
--- /dev/null
@@ -0,0 +1,7 @@
+CREATE TABLE IF NOT EXISTS profile_directory (
+    uid INT NOT NULL,
+    email_directory VARCHAR(255) DEFAULT NULL,
+    PRIMARY KEY (uid)
+) CHARSET=utf8;
+
+ALTER TABLE register_marketing MODIFY COLUMN type ENUM('user', 'staff', 'ax');