Adds explanations for the different types of names.
[platal.git] / upgrade / newdirectory-0.0.1 / 06_education.sql
index 16982fa..865d888 100644 (file)
@@ -8,6 +8,8 @@ CREATE TABLE IF NOT EXISTS profile_education_field_enum (
 CREATE TABLE IF NOT EXISTS profile_education_degree_enum (
   id INT(2) NOT NULL AUTO_INCREMENT,
   degree VARCHAR(255) DEFAULT NULL,
+  abbreviation VARCHAR(255) DEFAULT '' NOT NULL,
+  level TINYINT (1) UNSIGNED DEFAULT 0 NOT NULL,
   PRIMARY KEY(id),
   UNIQUE KEY(degree)
 ) CHARSET=utf8;
@@ -21,6 +23,7 @@ CREATE TABLE IF NOT EXISTS profile_education_degree (
 CREATE TABLE IF NOT EXISTS profile_education_enum (
   id INT(4) NOT NULL AUTO_INCREMENT,
   name VARCHAR(255) DEFAULT NULL,
+  abbreviation VARCHAR(255) DEFAULT '' NOT NULL,
   url VARCHAR(255) DEFAULT NULL,
   country CHAR(2) NOT NULL DEFAULT 'FR',
   PRIMARY KEY(id),
@@ -28,13 +31,15 @@ CREATE TABLE IF NOT EXISTS profile_education_enum (
 ) CHARSET=utf8;
 
 CREATE TABLE IF NOT EXISTS profile_education (
-  id INT(2) NOT NULL DEFAULT 0,
+  id TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
   uid 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,
+  entry_year INT(4) DEFAULT NULL,
   grad_year INT(4) DEFAULT NULL,
   program VARCHAR(255) DEFAULT NULL,
+  flags SET('primary') DEFAULT '' NOT NULL,
   PRIMARY KEY(id, uid)
 ) CHARSET=utf8;