Commit 1378cc7c authored by Romain Loth's avatar Romain Loth

sizing up a few DB fields

parent 2f35c96b
...@@ -27,16 +27,17 @@ CREATE TABLE scholars ( ...@@ -27,16 +27,17 @@ CREATE TABLE scholars (
last_name varchar(50) not null, last_name varchar(50) not null,
initials varchar(7) not null, initials varchar(7) not null,
affiliation_id int(15) not null, affiliation_id int(15) not null,
position varchar(30), -- eg Director position varchar(120), -- eg Director
hon_title varchar(30), -- eg Doctor hon_title varchar(30), -- eg Doctor
interests_text varchar(3500), interests_text varchar(3500),
gender char(1), gender char(1),
job_looking_date char(24), -- null if not looking for a job job_looking_date char(24), -- null if not looking for a job
home_url varchar(120), -- homepage home_url varchar(180), -- homepage
pic_url varchar(120), -- remote pic... (full url) pic_url varchar(180), -- remote pic... (full url)
pic_fname varchar(120), -- ...or locally saved pic (basename) pic_fname varchar(120), -- ...or locally saved pic (basename)
valid_date date, -- when user will be ignored, if legacy status valid_date date, -- when user will be ignored, if legacy status
record_status varchar(25), -- "active|test|legacy|closed_legacy" record_status varchar(25), -- "active|test|legacy|closed_legacy"
old_itemid varchar(30), -- eg imported id from CSS originals
future_reserved varchar(30), -- eg for an imported id or temp status future_reserved varchar(30), -- eg for an imported id or temp status
INDEX luid_index_sch (luid), INDEX luid_index_sch (luid),
...@@ -53,6 +54,7 @@ CREATE TABLE affiliations( ...@@ -53,6 +54,7 @@ CREATE TABLE affiliations(
org_type varchar(50), org_type varchar(50),
team_lab varchar(120) not null, team_lab varchar(120) not null,
org_city varchar(50), org_city varchar(50),
reserved varchar(30),
INDEX affid_index_affs (affid), INDEX affid_index_affs (affid),
PRIMARY KEY (affid), PRIMARY KEY (affid),
UNIQUE KEY full_affiliation (org, team_lab, org_city, org_type) UNIQUE KEY full_affiliation (org, team_lab, org_city, org_type)
......
...@@ -20,16 +20,17 @@ CREATE TABLE scholars ( ...@@ -20,16 +20,17 @@ CREATE TABLE scholars (
last_name varchar(50) not null, last_name varchar(50) not null,
initials varchar(7) not null, initials varchar(7) not null,
affiliation_id int(15) not null, affiliation_id int(15) not null,
position varchar(30), -- eg Director position varchar(120), -- eg Director
hon_title varchar(30), -- eg Doctor hon_title varchar(30), -- eg Doctor
interests_text varchar(3500), interests_text varchar(3500),
gender char(1), gender char(1),
job_looking_date char(24), -- null if not looking for a job job_looking_date char(24), -- null if not looking for a job
home_url varchar(120), -- homepage home_url varchar(180), -- homepage
pic_url varchar(120), -- remote pic... (full url) pic_url varchar(180), -- remote pic... (full url)
pic_fname varchar(120), -- ...or locally saved pic (basename) pic_fname varchar(120), -- ...or locally saved pic (basename)
valid_date date, -- when user will be ignored, if legacy status valid_date date, -- when user will be ignored, if legacy status
record_status varchar(25), -- "active|test|legacy|closed_legacy" record_status varchar(25), -- "active|test|legacy|closed_legacy"
old_itemid varchar(30), -- eg imported id from CSS originals
future_reserved varchar(30), -- eg for an imported id or temp status future_reserved varchar(30), -- eg for an imported id or temp status
INDEX luid_index_sch (luid), INDEX luid_index_sch (luid),
...@@ -46,6 +47,7 @@ CREATE TABLE affiliations( ...@@ -46,6 +47,7 @@ CREATE TABLE affiliations(
org_type varchar(50), org_type varchar(50),
team_lab varchar(120) not null, team_lab varchar(120) not null,
org_city varchar(50), org_city varchar(50),
reserved varchar(30),
INDEX affid_index_affs (affid), INDEX affid_index_affs (affid),
PRIMARY KEY (affid), PRIMARY KEY (affid),
UNIQUE KEY full_affiliation (org, team_lab, org_city, org_type) UNIQUE KEY full_affiliation (org, team_lab, org_city, org_type)
...@@ -142,7 +144,7 @@ CREATE TABLE doors_temp_user ( ...@@ -142,7 +144,7 @@ CREATE TABLE doors_temp_user (
-- (return tokens associated to a legacy user) -- (return tokens associated to a legacy user)
CREATE TABLE legacy_temp_rettoks ( CREATE TABLE legacy_temp_rettoks (
luid int(15) not null unique primary key, luid int(15) not null unique primary key,
rettok varchar(255) not null unique, rettok char(36) not null unique,
INDEX luid_index_ltempt (luid), INDEX luid_index_ltempt (luid),
INDEX rettok_index_ltempt (rettok) INDEX rettok_index_ltempt (rettok)
) ; ) ;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment