egroupware/infolog/doc/create_tables.mysql

57 lines
3.5 KiB
Plaintext
Raw Normal View History

2001-05-23 21:07:45 +02:00
# $Id$
2001-05-24 15:40:40 +02:00
#DROP TABLE infolog;
2001-05-23 21:07:45 +02:00
2001-05-24 15:40:40 +02:00
CREATE TABLE infolog (
2001-05-23 21:07:45 +02:00
info_id int(11) unsigned PRIMARY KEY NOT NULL auto_increment,
info_type enum('task','phone','note','confirm','reject','email','fax') NOT NULL, # type of entry
info_addr_id int(11) DEFAULT '0' NOT NULL, # concerning address: e.g. call from or to (if applicable or 0)
info_proj_id int(11) DEFAULT '0' NOT NULL, # concerned project (if applicable or 0)
info_from varchar(64), # free text if no addr. or proj., e.g. name of person to call / who called
info_addr varchar(64), # type: call: nr to call. email: email-addr.
info_subject varchar(64) NOT NULL,
info_des text, # long description of subject
info_owner int(11) NOT NULL, # creator of task, ...
info_responsible int(11) DEFAULT '0' NOT NULL, # 0 if owner, else person the task is delegated to
info_access varchar(10) DEFAULT 'public', # public or private (private should include responsible person)
info_cat int(11) DEFAULT '0' NOT NULL, # free cathegory
info_datecreated int(11) DEFAULT '0' NOT NULL, # date of creation
info_startdate int(11) DEFAULT '0' NOT NULL, # begin of task
info_enddate int(11) DEFAULT '0' NOT NULL, # sheduled end of task
info_id_parent int(11) DEFAULT '0' NOT NULL, # id of parent-task or -call
info_pri enum('urgent','high','normal','low') DEFAULT 'Normal',# priority of the task / call
info_time int(11) DEFAULT '0' NOT NULL, # time needed for the task
info_bill_cat int(11) DEFAULT '0' NOT NULL, # 0 == not billed
info_status enum('offer','ongoing','call','will-call','done','billed') DEFAULT 'done', # offer means responsible person wanted/searched
info_confirm enum('not','accept','finish','both') DEFAULT 'not' # confirmation, not or when task is accepted or finished or on both
);
# some test data:
# phone-calls
2001-05-24 15:40:40 +02:00
INSERT INTO infolog (info_type,info_addr_id,info_from,info_addr,info_subject,info_des,info_owner,info_responsible,info_access,info_pri,info_status) VALUES
2001-05-23 21:07:45 +02:00
('phone',0,'Hugo X.','+49 (631) 12345','Was steht an','...',599440,599441,'public','urgent','call'),
('phone',1,'','','Besprechungstermin','Wann treffen wir uns wegen',599441,599440,'public','normal','call');
# notes
2001-05-24 15:40:40 +02:00
INSERT INTO infolog (info_type,info_addr_id,info_from,info_subject,info_des,info_owner) VALUES
2001-05-23 21:07:45 +02:00
('note',0,'Hugo X.','Wie geht das','so und so',599440),
('note',1,'','zus<75>tzliche Daten','1. + 2. + 3.',599441);
# tasks
2001-05-24 15:40:40 +02:00
INSERT INTO infolog (info_type,info_addr_id,info_from,info_subject,info_des,info_owner,info_responsible,info_access,info_pri,info_status,info_confirm) VALUES
2001-05-23 21:07:45 +02:00
('task',0,'','Bauauftrag','wir brauche 10 Mohawks',599440,0,'public','low','offer','both'),
('task',2,'Ralf','Konzept vorlegen','Wann treffen wir uns wegen',599440,599441,'privat','high','ongoing','done');
# confirmation
2001-05-24 15:40:40 +02:00
INSERT INTO infolog (info_type,info_id_parent,info_subject,info_des,info_owner,info_status,info_time) VALUES
2001-05-23 21:07:45 +02:00
('confirm',6,'war ne harte Nu<4E>','blah blah blah',599441,'done',10);
# email
2001-05-24 15:40:40 +02:00
INSERT INTO infolog (info_type,info_addr_id,info_from,info_addr,info_subject,info_des,info_owner,info_responsible,info_access,info_pri) VALUES
2001-05-23 21:07:45 +02:00
('email',0,'Ralf Becker','RalfBecker@outdoor-training.de','Was steht an','...',599440,0,'public','normal'),
('email',1,'Birgit Becker','BirgitBecker@outdoor-training.de','Besprechungstermin','Wann treffen wir uns wegen',599441,599440,'public','urgent');