
INSERT INTO accessright (node, action, entity) VALUES ( 'activity', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'activity', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'activity', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'activity', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'activity', 'stats', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'activity', 'stats', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contact', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contact', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contact', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contact', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contact', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contact', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracts', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracttype', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracttype', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracttype', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'contracttype', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'customer', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'stats', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'stats', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'view_all', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'employee', 'view_all', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'add', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'admin', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'delete', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'edit', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'hoursurvey', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'hoursurvey', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'hoursurvey', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'lock', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'lock', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'lock', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'unlock', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'unlock', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'view_all', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours', 'view_all', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours_lock', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours_lock', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours_lock', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours_lock', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours_lock', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'hours_lock', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'phase', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'phase', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'phase', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'phase', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'phase', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'phase', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'profile', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'profile', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'profile', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'profile', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'planning', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'planning', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'stats', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project', 'stats', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'add', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'admin', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'delete', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'project_notes', 'edit', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'add', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'admin', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'delete', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'todo', 'edit', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_phase', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_phase', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_phase', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_phase', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_project', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_project', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_project', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'tpl_project', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'add', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'add', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'admin', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'admin', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'delete', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'delete', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'usercontracts', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'userprefs', 'edit', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'userprefs', 'edit', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'userprefs', 'edit', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'weekreport', 'report', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'weekreport', 'report', '2');
INSERT INTO accessright (node, action, entity) VALUES ( 'weekreport', 'report', '3');
INSERT INTO accessright (node, action, entity) VALUES ( 'weekreport', 'view_all', '1');
INSERT INTO accessright (node, action, entity) VALUES ( 'weekreport', 'view_all', '2');


INSERT INTO activity (id, name, description, remarkrequired) VALUES ( '1', 'Meeting', '', '0');
INSERT INTO activity (id, name, description, remarkrequired) VALUES ( '2', 'Development', '', '0');
INSERT INTO activity (id, name, description, remarkrequired) VALUES ( '3', 'Travel', 'Specify destination', '1');
INSERT INTO activity (id, name, description, remarkrequired) VALUES ( '4', 'Other', '', '1');
INSERT INTO activity (id, name, description, remarkrequired) VALUES ( '5', 'Testing', '', '0');

INSERT INTO contact (id, lastname, firstname, address, zipcode, city, country, phone, cellular, fax, email, remark, company, owner) VALUES ( '1', 'Jansch', 'Ivo', '', '', '', '', '', '', '', 'ivo@achievo.org', '', '1', NULL);
INSERT INTO contact (id, lastname, firstname, address, zipcode, city, country, phone, cellular, fax, email, remark, company, owner) VALUES ( '2', 'Schenkenberg', 'Tom', '', '', '', '', '', '', '', 'tom@achievo.org', '', '1', NULL);

INSERT INTO contract (id, billing_period, period_price, contracttype, customer, startdate, enddate, description) VALUES ( '1', 'Month', '20.00000', '1', '1', '2002-01-07', '2003-01-07', 'Standard hosting contract');

INSERT INTO contracttype (id, description) VALUES ( '1', 'Hosting');
INSERT INTO contracttype (id, description) VALUES ( '2', 'Support');

INSERT INTO customer (id, name, address, zipcode, city, country, phone, fax, email, website, bankaccount, remark, currency) VALUES ( '1', 'Ibuildings.nl BV', '', '', 'Vlissingen', '', '', '', 'info@ibuildings.nl', 'http://www.ibuildings.nl', '', '', NULL);

INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'activity', '5');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'contracttype', '2');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'profile', '3');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'usercontract', '1');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'customer', '1');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'contact', '2');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'contract', '1');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'project', '1');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'phase', '1');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'todo', '1');
INSERT INTO db_sequence (seq_name, nextid) VALUES ( 'hours', '1');

INSERT INTO employee (userid, supervisor, name, email, password, status, theme, entity) VALUES ( 'ivo', '0', 'Ivo Jansch', 'ivo@achievo.org', '098f6bcd4621d373cade4e832627b4f6', 'active', NULL, '1');

INSERT INTO hours (id, entrydate, activitydate, phaseid, activityid, remark, time, userid) VALUES ( '1', '2002-01-07', '2002-01-07', '1', '4', 'Created demo database for Achievo 0.8', '60', 'ivo');

INSERT INTO hours_lock (week, userid) VALUES ( '200151', '*');

INSERT INTO phase (id, name, projectid, status, description, max_phasetime, max_hours) VALUES ( '1', 'Main', '1', 'active', '', '365', '1000');

INSERT INTO phase_activity (phaseid, activityid, billable) VALUES ( '1', '2', '0');
INSERT INTO phase_activity (phaseid, activityid, billable) VALUES ( '1', '1', '0');
INSERT INTO phase_activity (phaseid, activityid, billable) VALUES ( '1', '4', '0');
INSERT INTO phase_activity (phaseid, activityid, billable) VALUES ( '1', '5', '0');

INSERT INTO profile (id, name) VALUES ( '1', 'Management');
INSERT INTO profile (id, name) VALUES ( '2', 'Project Managers');
INSERT INTO profile (id, name) VALUES ( '3', 'Employees');

INSERT INTO project (id, name, coordinator, status, description, startdate, enddate, customer, fixed_price, contact) VALUES ( '1', 'Achievo Development', 'ivo', 'active', 'Open Source development for Achievo', '2002-01-07', '2003-01-07', '1', '0.00000', '2');

INSERT INTO todo (id, projectid, owner, assigned_to, entrydate, duedate, description, title, status, priority) VALUES ( '1', '1', 'ivo', 'ivo', '2002-01-07', '2002-01-07', 'Finish billing, scheduler and some other features.', 'Finish 1.0', '1', '3');

INSERT INTO usercontract (id, description, startdate, enddate, userid, uc_hours) VALUES ( '1', 'Contract for a year', '2002-01-07', '2003-01-07', 'ivo', '40');
