Shortens profile_name_search* in profile_name*.
[platal.git] / upgrade / newdirectory-0.0.1 / 06_education.sql
index be4f85e..708e8ef 100644 (file)
@@ -11,8 +11,7 @@ CREATE TABLE IF NOT EXISTS profile_education_degree_enum (
   abbreviation VARCHAR(255) DEFAULT '' NOT NULL,
   level TINYINT (1) UNSIGNED DEFAULT 0 NOT NULL,
   PRIMARY KEY(id),
-  UNIQUE KEY(degree),
-  UNIQUE KEY(abbreviation)
+  UNIQUE KEY(degree)
 ) CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS profile_education_degree (
@@ -28,8 +27,7 @@ CREATE TABLE IF NOT EXISTS profile_education_enum (
   url VARCHAR(255) DEFAULT NULL,
   country CHAR(2) NOT NULL DEFAULT 'FR',
   PRIMARY KEY(id),
-  UNIQUE KEY(name),
-  UNIQUE KEY(IF(abbreviation = '', name, abbreviation))
+  UNIQUE KEY(name)
 ) CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS profile_education (
@@ -42,7 +40,8 @@ CREATE TABLE IF NOT EXISTS profile_education (
   grad_year INT(4) DEFAULT NULL,
   program VARCHAR(255) DEFAULT NULL,
   flags SET('primary') DEFAULT '' NOT NULL,
-  PRIMARY KEY(id, uid)
+  PRIMARY KEY(id, uid),
+  INDEX uid (uid)
 ) CHARSET=utf8;
 
 INSERT INTO  profile_education_field_enum (field)