Fixes education sql scripts.
authorStéphane Jacob <jacou@melix.net>
Sat, 20 Dec 2008 16:53:49 +0000 (17:53 +0100)
committerStéphane Jacob <jacou@melix.net>
Tue, 23 Dec 2008 23:55:09 +0000 (00:55 +0100)
upgrade/newdirectory-0.0.1/06_education.sql
upgrade/newdirectory-0.0.1/09_education.sql

index be4f85e..865d888 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 (
index 74de743..abf3ba6 100644 (file)
@@ -522,7 +522,7 @@ INSERT INTO  profile_education_enum (name, url, country, abbreviation)
              ('Cleveland State University', 'http://www.csuohio.edu/', 'US', 'CSU'),
              ('Centre de Perfectionnement aux Affaires du Nord', '', 'FR', 'CPA du Nord'),
              ('Centre de Perfectionnement aux Affaires de Lyon', '', '', 'CPA de Lyon'),
-             ('Amherst College', 'http://www.amherst.edu/', 'US', '')
+             ('Amherst College', 'http://www.amherst.edu/', 'US', ''),
              ('Ottawa University', 'http://www.ottawa.edu/', 'US', 'OU'),
              ('Indiana University', 'http://www.indiana.edu/', 'US', ''),
              ('University of Notre Dame du Lac', 'http://www.nd.edu/', 'US', 'Notre Dame'),