X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=DataObjects%2Fcore.sql;h=51961fe00db0bc6b54ef9ab0bcbd3e85dd49369d;hb=84e420ad92a3821fa5c15369618f4dd4285e235a;hp=33856cb0bdfb34a215ab5c6613813a8c048cc0ac;hpb=7384463f70820261ab36aa806ad8a98eba39bdbf;p=Pman.Core diff --git a/DataObjects/core.sql b/DataObjects/core.sql index 33856cb0..51961fe0 100644 --- a/DataObjects/core.sql +++ b/DataObjects/core.sql @@ -189,7 +189,10 @@ ALTER TABLE Person ADD COLUMN office_id int(11) default '0'; ALTER TABLE Person ADD COLUMN name varchar(128) NOT NULL DEFAULT ''; ALTER TABLE Person ADD COLUMN phone varchar(32) NOT NULL DEFAULT ''; ALTER TABLE Person ADD COLUMN fax varchar(32) NOT NULL DEFAULT ''; -ALTER TABLE Person ADD COLUMN email varchar(128) NOT NULL DEFAULT ''; + +ALTER TABLE Person ADD COLUMN email varchar(256) NOT NULL DEFAULT ''; +ALTER TABLE Person ADD COLUMN alt_email VARCHAR(256) NULL ; + ALTER TABLE Person ADD COLUMN company_id int(11) default '0'; ALTER TABLE Person ADD COLUMN role varchar(254) NOT NULL DEFAULT ''; ALTER TABLE Person ADD COLUMN active int(11) NOT NULL default 1; @@ -207,18 +210,22 @@ ALTER TABLE Person ADD COLUMN deleted_dt DATETIME ; ALTER TABLE Person ADD COLUMN firstname varchar(128) NOT NULL DEFAULT ''; ALTER TABLE Person ADD COLUMN lastname varchar(128) NOT NULL DEFAULT ''; -ALTER TABLE Person ADD COLUMN name_facebook VARCHAR(128) NULL; -ALTER TABLE Person ADD COLUMN url_blog VARCHAR(256) NULL ; -ALTER TABLE Person ADD COLUMN url_twitter VARCHAR(256) NULL ; -ALTER TABLE Person ADD COLUMN url_linkedin VARCHAR(256) NULL ; +ALTER TABLE Person ADD COLUMN name_facebook VARCHAR(128) NULL; +ALTER TABLE Person ADD COLUMN url_blog VARCHAR(256) NULL ; +ALTER TABLE Person ADD COLUMN url_twitter VARCHAR(256) NULL ; +ALTER TABLE Person ADD COLUMN url_linkedin VARCHAR(256) NULL ; +ALTER TABLE Person ADD COLUMN alt_email VARCHAR(256) NULL ; + ALTER TABLE Person ADD COLUMN phone_mobile varchar(32) NOT NULL DEFAULT ''; ALTER TABLE Person ADD COLUMN phone_direct varchar(32) NOT NULL DEFAULT ''; +ALTER TABLE Person ADD COLUMN honor varchar(32) NOT NULL DEFAULT ''; # old mysql alter table Person change column active active int(11) NOT NULL DEFAULT 1 ; alter table Person change role role varchar(254) NOT NULL DEFAULT ''; +alter table Person change email email varchar(254) NOT NULL DEFAULT ''; @@ -294,7 +301,8 @@ ALTER TABLE Images ADD COLUMN descript TEXT DEFAULT '' NOT NULL; ALTER TABLE Images ADD COLUMN title VARCHAR(128) DEFAULT '' NOT NULL; ALTER TABLE Images CHANGE COLUMN mimetype mimetype varchar(128) NOT NULL default ''; -ALTER TABLE Images ALTER COLUMN mimetype varchar(128) NOT NULL default ''; +-- postgres +ALTER TABLE Images ALTER COLUMN mimetype TYPE varchar(128) ; ALTER TABLE Images ADD INDEX lookup(ontable, onid); @@ -351,8 +359,10 @@ alter table core_enum ADD COLUMN display_name varchar(255) NOT NULL DEFAULT ' alter table core_enum ADD INDEX lookup(seqid, active, name, etype); UPDATE core_enum SET display_name = name WHERE display_name = ''; +ALTER TABLE core_enum ADD COLUMN is_system_enum INT(2) NOT NULL DEFAULT 0; +ALTER TABLE core_enum CHANGE COLUMN display_name display_name TEXT NOT NULL DEFAULT ''; CREATE TABLE translations ( id int(11) NOT NULL AUTO_INCREMENT, @@ -407,13 +417,16 @@ ALTER TABLE core_notify ADD COLUMN event_id int(11) NOT NULL DEFAULT 0; ALTER TABLE core_notify ADD COLUMN watch_id INT(11) NOT NULL DEFAULT 0; ALTER TABLE core_notify ADD COLUMN trigger_person_id INT(11) NOT NULL DEFAULT 0; ALTER TABLE core_notify ADD COLUMN trigger_event_id INT(11) NOT NULL DEFAULT 0; -ALTER TABLE core_notify ADD INDEX lookup(act_when, msgid); + ALTER TABLE core_notify ADD COLUMN to_email varchar(255) NOT NULL DEFAULT ''; -ALTER TABLE core_notify ADD INDEX lookup_a(onid, ontable, person_id, act_when, msgid, to_email); + #old mysql.. ALTER TABLE core_notify CHANGE COLUMN bounced event_id INT(11) NOT NULL DEFAULT 0; - + +ALTER TABLE core_notify ADD INDEX lookup(act_when, msgid); +ALTER TABLE core_notify ADD INDEX lookup_a(onid, ontable, person_id, act_when, msgid, to_email); +alter table core_notify add INDEX lookup_b (sent, person_id, msgid, ontable);