phpBMS

Changeset 542 for trunk/phpbms/install

Show
Ignore:
Timestamp:
05/28/09 16:17:42 (3 years ago)
Author:
nate
Message:
  • Added uuid field to the following tables:

addresses,
clientemailprojects,
clients,
discounts,
files,
invoices,
invoicestatuses,
modules,
notes,
paymentmethods,
productcategories,
products,
receipts,
relationships,
roles,
scheduler,
shippingmethods,
smartsearches,
tabledefs,
tabs,
tax,
users

  • Changed the .sql files that install / update these tables to use specific uuids.
Location:
trunk/phpbms/install
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • trunk/phpbms/install/createtables.sql

    r540 r542  
    4444CREATE TABLE modules ( 
    4545  id int(11) NOT NULL auto_increment, 
     46  `uuid` varchar(64) NOT NULL, 
    4647  displayname varchar(128) NOT NULL default '', 
    4748  name varchar(64) NOT NULL default '', 
     
    5354CREATE TABLE `notes` ( 
    5455  `id` int(11) NOT NULL AUTO_INCREMENT, 
     56  `uuid` varchar(64) NOT NULL, 
    5557  `assignedtoid` int(11) default NULL, 
    5658  `attachedid` int(11) default NULL, 
     
    103105CREATE TABLE relationships ( 
    104106  id int(11) NOT NULL auto_increment, 
     107  `uuid` varchar(64) NOT NULL, 
    105108  tofield varchar(32) NOT NULL default '', 
    106109  name varchar(128) NOT NULL default '', 
     
    154157CREATE TABLE `tabledefs` ( 
    155158  `id` int(11) NOT NULL auto_increment, 
     159  `uuid` varchar(64) NOT NULL, 
    156160  `displayname` varchar(64) default NULL, 
    157161  `prefix` varchar(4) default NULL, 
     
    234238CREATE TABLE users ( 
    235239  `id` INTEGER NOT NULL AUTO_INCREMENT, 
     240  `uuid` varchar(64) NOT NULL, 
    236241  login varchar(64) NOT NULL default '', 
    237242  password blob, 
     
    285290CREATE TABLE `files` ( 
    286291  `id` int(11) NOT NULL auto_increment, 
     292  `uuid` varchar(64) NOT NULL, 
    287293  `name` varchar(128) NOT NULL default '', 
    288294  `description` text, 
     
    322328CREATE TABLE `roles` ( 
    323329  `id` INTEGER UNSIGNED DEFAULT NULL AUTO_INCREMENT, 
     330  `uuid` varchar(64) NOT NULL, 
    324331  `name` VARCHAR(64) NOT NULL, 
    325332  `description` TEXT, 
     
    349356CREATE TABLE `scheduler` ( 
    350357  `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, 
     358  `uuid` varchar(64) NOT NULL, 
    351359  `name` varchar(45) default NULL, 
    352360  `job` varchar(128) default NULL, 
     
    369377CREATE TABLE `tabs` ( 
    370378  `id` int(10) unsigned NOT NULL AUTO_INCREMENT, 
     379  `uuid` varchar(64) NOT NULL, 
    371380  `name` varchar(45) NOT NULL, 
    372381  `tabgroup` varchar(45) NOT NULL, 
     
    386395CREATE TABLE `smartsearches` ( 
    387396  `id` int(10) unsigned NOT NULL auto_increment, 
     397  `uuid` varchar(64) NOT NULL, 
    388398  `name` varchar(128) NOT NULL, 
    389399  `fromclause` text NOT NULL, 
  • trunk/phpbms/install/files.sql

    r520 r542  
    1 INSERT INTO files (`id`, `name`, `description`, `file`, `type`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `roleid`) VALUES (1,'logo.png','Company Logo Used in PDF reports','‰PNG\r\n\Z\n\0\0\0\rIHDR\0\0\0\0\0]\0\0\0ŸS°\0\0\0gAMA\0\0¯È7Šé\0\0\0tEXtSoftware\0Adobe ImageReadyqÉe<\0\0\0`PLTE666ÑÑѶ¶¶óó󪪪kkk   rrrœœœÅÅŎŽŽèèèÛÛۄ„„¿¿¿|||XXXÞÞÞðððˆˆˆÉÉÉââ╕•€€€KKK&&&QQQPPP%%%bbbcccÿÿÿV\"l\0\0\0ØIDATxÚb \0@£A\0\0D£påΡ\0D£pà”®¡\04ˆÃA‘‘‘‰˜±I#€<^inT)&1^v99YYv^.f°@\0a†ƒ /¿¬ 
     1INSERT INTO `files` (`id`, `uuid`, `name`, `description`, `file`, `type`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `roleid`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`) VALUES ('1', '', 'logo.png', 'Company Logo Used in PDF reports', '‰PNG\r\n\Z\n\0\0\0\rIHDR\0\0\0\0\0]\0\0\0ŸS°\0\0\0gAMA\0\0¯È7Šé\0\0\0tEXtSoftware\0Adobe ImageReadyqÉe<\0\0\0`PLTE666ÑÑѶ¶¶óó󪪪kkk   rrrœœœÅÅŎŽŽèèèÛÛۄ„„¿¿¿|||XXXÞÞÞðððˆˆˆÉÉÉââ╕•€€€KKK&&&QQQPPP%%%bbbcccÿÿÿV\"l\0\0\0ØIDATxÚb \0@£A\0\0D£påΡ\0D£pà”®¡\04ˆÃA‘‘‘‰˜±I#€<^inT)&1^v99YYv^.f°@\0a†ƒ /¿¬ 
    22X#%á I~8°\0] +t*‚#ËÏ&‚¬†WVVN®‚ÝV~šŽ¬Bœ› 
    33\"\n0àgj Žp\0«’“ 
     
    122122܀€\0Â(­Uº 
    123123H•B=óÄ u¶±*€\0\ZYóÜšå0\0 Ñy 
    124 \0 Ñp€\0€\0\Z\r\00\0tP|O;ë\0\0\0\0IEND®B`‚','image/png',2,NOW(),2,NOW(),90); 
     124\0 Ñp€\0€\0\Z\r\00\0tP|O;ë\0\0\0\0IEND®B`‚', 'image/png', 1, NOW(), 1, NOW(), '90', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); 
  • trunk/phpbms/install/notes.sql

    r485 r542  
    1 INSERT INTO `notes` (`assignedtoid`, `attachedid`, `attachedtabledefid`, `content`, `assignedtodate`, `subject`, `type`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `importance`, `parentid`, `startdate`, `enddate`, `completed`, `private`, `status`, `completeddate`, `location`, `category`, `assignedtotime`, `starttime`, `endtime`, `assignedbyid`, `repeating`, `repeattype`, `repeatuntil`, `repeatevery`, `repeattimes`, `repeateachlist`, `repeatontheday`, `repeatontheweek`, `firstrepeat`, `lastrepeat`, `timesrepeated`, `repeatname`) VALUES (NULL,NULL,NULL,'For more help using this software use the following links:\r\n\r\nhttp://www.phpbms.org - community site and wiki.\r\n\r\nhttp://www.phpbms.org/forum -user support forum.\r\n\r\nhttp://www.kreotek.com - paid support and customization.',NULL,'Welcome to phpBMS','SM',1,NOW(),1,NOW(),0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'Daily',NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL); 
    2 INSERT INTO `notes` (`assignedtoid`, `attachedid`, `attachedtabledefid`, `content`, `assignedtodate`, `subject`, `type`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `importance`, `parentid`, `startdate`, `enddate`, `completed`, `private`, `status`, `completeddate`, `location`, `category`, `assignedtotime`, `starttime`, `endtime`, `assignedbyid`, `repeating`, `repeattype`, `repeatuntil`, `repeatevery`, `repeattimes`, `repeateachlist`, `repeatontheday`, `repeatontheweek`, `firstrepeat`, `lastrepeat`, `timesrepeated`, `repeatname`) VALUES (NULL, NULL, NULL, '1) From the menu, navigate to Tools->Notes.\r\n2) From the find drop down, choose \'System Messages\' and then click the search button.\r\n3) Select the record(s) you want to delete and then click the delete (-) button.', NULL, 'How To Delete System Messages', 'SM', 1, NOW(), 1, NOW(), '0', NULL, NULL, NULL, '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '0', 'Daily', NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL); 
     1INSERT INTO `notes` (`uuid`, `assignedtoid`, `attachedid`, `attachedtabledefid`, `content`, `assignedtodate`, `subject`, `type`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `importance`, `parentid`, `startdate`, `enddate`, `completed`, `private`, `status`, `completeddate`, `location`, `category`, `assignedtotime`, `starttime`, `endtime`, `assignedbyid`, `repeating`, `repeattype`, `repeatuntil`, `repeatevery`, `repeattimes`, `repeateachlist`, `repeatontheday`, `repeatontheweek`, `firstrepeat`, `lastrepeat`, `timesrepeated`, `repeatname`) VALUES ('note:c624f82a-6ff1-be91-2518-e5e3308f3afc', NULL,NULL,NULL,'For more help using this software use the following links:\r\n\r\nhttp://www.phpbms.org - community site and wiki.\r\n\r\nhttp://www.phpbms.org/forum -user support forum.\r\n\r\nhttp://www.kreotek.com - paid support and customization.',NULL,'Welcome to phpBMS','SM',1,NOW(),1,NOW(),0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,'Daily',NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL); 
     2INSERT INTO `notes` (`uuid`, `assignedtoid`, `attachedid`, `attachedtabledefid`, `content`, `assignedtodate`, `subject`, `type`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`, `importance`, `parentid`, `startdate`, `enddate`, `completed`, `private`, `status`, `completeddate`, `location`, `category`, `assignedtotime`, `starttime`, `endtime`, `assignedbyid`, `repeating`, `repeattype`, `repeatuntil`, `repeatevery`, `repeattimes`, `repeateachlist`, `repeatontheday`, `repeatontheweek`, `firstrepeat`, `lastrepeat`, `timesrepeated`, `repeatname`) VALUES ('note:9a52d13f-c1fc-ab91-5162-521c13ddbde6', NULL, NULL, NULL, '1) From the menu, navigate to Tools->Notes.\r\n2) From the find drop down, choose \'System Messages\' and then click the search button.\r\n3) Select the record(s) you want to delete and then click the delete (-) button.', NULL, 'How To Delete System Messages', 'SM', 1, NOW(), 1, NOW(), '0', NULL, NULL, NULL, '0', '0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '0', 'Daily', NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, '0', NULL); 
  • trunk/phpbms/install/scheduler.sql

    r485 r542  
    1 INSERT INTO `scheduler` (`name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('Clean Import Files', './scheduler_delete_tempimport.php', '30::*::*::*::*', NULL, NOW(), NULL, 'This will delete any temporary import files that are present (for whatever reason) after 30 minutes of their creation.', '0', 1, NOW(), 1, NOW()); 
    2 INSERT INTO `scheduler` (`id`, `name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('4', 'Remove Excess System Log Records', './scheduler_delete_logs.php', '*::24::*::*::*', NULL, '2009-03-31 12:00:00', NULL, 'This script will trim the system log when there are more than 2000 records present at the time of its calling (default will be every 24 hours).', '0', 1, NOW(), 1, NOW()); 
     1INSERT INTO `scheduler` (`uuid`, `name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('schd:fb52e7fb-bb49-7f5f-89e1-002b2785f085', 'Clean Import Files', './scheduler_delete_tempimport.php', '30::*::*::*::*', '2009-05-28 12:30:02', '2009-05-07 17:27:13', NULL, 'This will delete any temporary import files that are present (for whatever reason) after 30 minutes of their creation.', '0', 1, NOW(), 1, NOW()); 
     2INSERT INTO `scheduler` (`uuid`, `name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('schd:d1c247de-9811-d37f-ad94-a8472dc1bc9c', 'Remove Excess System Log Records', './scheduler_delete_logs.php', '*::24::*::*::*', NULL, '2009-03-31 12:00:00', NULL, 'This script will trim the system log when there are more than 2000 records present at the time of its calling (default will be every 24 hours).', '0', 1, NOW(), 1, NOW()); 
  • trunk/phpbms/install/smartsearches.sql

    r384 r542  
    1 INSERT INTO `smartsearches` (`id`, `name`, `fromclause`, `valuefield`, `displayfield`, `secondaryfield`, `classfield`, `searchfields`, `filterclause`, `rolefield`, `tabledefid`, `moduleid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('2', 'Pick Active User', 'users', 'users.id', 'CONCAT(users.firstname,\' \',users.lastname)', 'users.email', '\'\'', 'users.firstname, users.lastname', 'users.revoked=0 AND users.portalaccess = 0', NULL, '9', '1', 1, NOW(), 1, NOW()); 
    2 INSERT INTO `smartsearches` (`id`, `name`, `fromclause`, `valuefield`, `displayfield`, `secondaryfield`, `classfield`, `searchfields`, `filterclause`, `rolefield`, `tabledefid`, `moduleid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('5', 'Pick File', 'files', 'files.id', 'files.name', 'files.description', '\'\'', 'files.name, files.description', 'files.id!=0', 'files.roleid', '26', '1', 1, NOW(), 1, NOW()); 
    3 INSERT INTO `smartsearches` (`id`, `name`, `fromclause`, `valuefield`, `displayfield`, `secondaryfield`, `classfield`, `searchfields`, `filterclause`, `rolefield`, `tabledefid`, `moduleid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('9', 'Pick Active User Email', 'users', 'users.id', 'concat(users.firstname,\' \',users.lastname,\' [\',users.email,\']\')', 'users.phone', '\'\'', 'users.firstname, users.lastname, users.email', 'users.revoked = 0 AND users.portalaccess = 0', NULL, '9', '1', 1, NOW(), 1, NOW()); 
     1INSERT INTO `smartsearches` (`uuid`, `name`, `fromclause`, `valuefield`, `displayfield`, `secondaryfield`, `classfield`, `searchfields`, `filterclause`, `rolefield`, `tabledefid`, `moduleid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('smrt:ccc73fa4-6176-fad4-fbb1-5186d0edbdd1', 'Pick Active User', 'users', 'users.id', 'CONCAT(users.firstname,\' \',users.lastname)', 'users.email', '\'\'', 'users.firstname, users.lastname', 'users.revoked=0 AND users.portalaccess = 0', NULL, '9', '1', 1, NOW(), 1, NOW()); 
     2INSERT INTO `smartsearches` (`uuid`, `name`, `fromclause`, `valuefield`, `displayfield`, `secondaryfield`, `classfield`, `searchfields`, `filterclause`, `rolefield`, `tabledefid`, `moduleid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('smrt:855406d5-659d-c907-74a1-acfd3802fd73', 'Pick File', 'files', 'files.id', 'files.name', 'files.description', '\'\'', 'files.name, files.description', 'files.id!=0', 'files.roleid', '26', '1', 1, NOW(), 1, NOW()); 
     3INSERT INTO `smartsearches` (`uuid`, `name`, `fromclause`, `valuefield`, `displayfield`, `secondaryfield`, `classfield`, `searchfields`, `filterclause`, `rolefield`, `tabledefid`, `moduleid`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('smrt:ed5b1d7f-b0fe-2088-f17c-47bfbe1ace25', 'Pick Active User Email', 'users', 'users.id', 'concat(users.firstname,\' \',users.lastname,\' [\',users.email,\']\')', 'users.phone', '\'\'', 'users.firstname, users.lastname, users.email', 'users.revoked = 0 AND users.portalaccess = 0', NULL, '9', '1', 1, NOW(), 1, NOW()); 
  • trunk/phpbms/install/tabledefs.sql

    r517 r542  
    1 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('9', 'Users', 'system', '1', 'users', 'users', 'modules/base/users_addedit.php', '0', 'modules/base/users_addedit.php', '0', 'modules/base/users_import.php', '-100', '0', '-100', '-100', 'revoke', '0', '0', 'users.id !=0', 'users.id', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    2 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('10', 'Relationships', 'system', '1', 'relationships', '(relationships inner join tabledefs as fromtable on relationships.fromtableid=fromtable.id) inner join tabledefs as totable on relationships.totableid=totable.id', 'modules/base/relationships_addedit.php', '0', 'modules/base/relationships_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'relationships.id != 0', 'fromtable.displayname, name', '', '', '', 1, NOW(), 1, NOW()); 
    3 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('11', 'Table Definitions', 'system', '1', 'tabledefs', 'tabledefs left join modules on tabledefs.moduleid=modules.id', 'modules/base/tabledefs_addedit.php', '-100', 'modules/base/tabledefs_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'tabledefs.id != 0', 'modules.name, tabledefs.displayname', '', '', '', 1, NOW(), 1, NOW()); 
    4 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('12', 'Notes', 'table', '1', 'notes', 'notes', 'modules/base/notes_addedit.php', '0', 'modules/base/notes_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '1', 'notes.type=\'NT\' AND notes.createdby = {{$_SESSION[\'userinfo\'][\'id\']}} AND completed=0', 'notes.category,notes.type,notes.importance DESC,notes.creationdate', 'search', 'My Unread Notes', 'new', 1, NOW(), 1, NOW()); 
    5 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('16', 'Reports', 'system', '1', 'reports', 'reports left join tabledefs on reports.tabledefid=tabledefs.id', 'modules/base/reports_addedit.php', '0', 'modules/base/reports_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'reports.id != 0', 'tabledefid,displayorder DESC, reports.name', '', '', '', 1, NOW(), 1, NOW()); 
    6 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('17', 'Saved Searches/Sorts', 'system', '1', 'usersearches', '(usersearches left join users on usersearches.userid = users.id) inner join tabledefs on usersearches.tabledefid=tabledefs.id', 'modules/base/usersearches_edit.php', '0', 'N/A', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'usersearches.id != 0', 'usersearches.name', '', '', '', 1, NOW(), 1, NOW()); 
    7 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('19', 'Menu', 'system', '1', 'menu', '((menu LEFT JOIN menu as parentmenu on menu.parentid=parentmenu.id) LEFT JOIN roles on menu.roleid=roles.id)', 'modules/base/menu_addedit.php', '-100', 'modules/base/menu_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'menu.id!=0', 'if(parentmenu.name is null,menu.displayorder,parentmenu.displayorder+(menu.displayorder+1)/10000)', '', '', '', 1, NOW(), 1, NOW()); 
    8 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('21', 'Installed Modules', 'system', '1', 'modules', 'modules', 'modules/base/modules_view.php', '0', 'modules/base/modules_view.php', '0', NULL, '-100', '0', '-100', '-100', 'NA', '0', '0', 'modules.id!=0', 'modules.name', '', '', '', 1, NOW(), 1, NOW()); 
    9 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('23', 'Tasks', 'view', '1', 'notes', '((notes left join users as assignedto on assignedto.id= notes.assignedtoid)  left join users as assignedby on assignedby.id=notes.assignedbyid)', 'modules/base/notes_addedit.php?backurl=../../search.php?id=23', '0', 'modules/base/notes_addedit.php?ty=TS&backurl=../../search.php?id=23', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'notes.id = -1', 'notes.importance, IF(assignedtodate IS NOT NULL, assignedtodate, IF((enddate IS NOT NULL && type = \'TS\'), enddate, IF((startdate IS NOT NULL && type = \'EV\'), startdate, CURDATE()))), subject', 'search', 'My Uncompleted Tasks', NULL, 1, NOW(), 1, NOW()); 
    10 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('24', 'Events', 'view', '1', 'notes', '((notes left join users as assignedto on assignedto.id= notes.assignedtoid)  left join users as assignedby on assignedby.id=notes.assignedbyid)', 'modules/base/notes_addedit.php?backurl=../../search.php?id=24', '0', 'modules/base/notes_addedit.php?ty=EV&backurl=../../search.php?id=24', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'notes.type=\'EV\' AND notes.createdby = {{$_SESSION[\'userinfo\'][\'id\']}} AND ((notes.startdate = year(notes.startdate)=year(curdate()) and week(notes.startdate)=week(curdate())))', 'notes.startdate DESC,notes.starttime DESC,notes.enddate DESC,notes.endtime DESC,notes.importance', 'search', NULL, NULL, 1, NOW(), 1, NOW()); 
    11 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('26', 'Files', 'table', '1', 'files', 'files', 'modules/base/files_addedit.php', '0', 'modules/base/files_addedit.php', '0', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'files.id=-1', 'files.name', 'search', '', '', 1, NOW(), 1, NOW()); 
    12 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('27', 'Attachments', 'table', '1', 'attachments', '(attachments INNER JOIN files on attachments.fileid=files.id)', 'modules/base/files_addedit.php', '0', 'modules/base/files_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'attachments.id!=0', 'attachments.creationdate DESC', 'search', '', '', 1, NOW(), 1, NOW()); 
    13 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('200', 'Roles', 'table', '1', 'roles', 'roles', 'modules/base/roles_addedit.php', '-100', 'modules/base/roles_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'inactivate', '0', '0', 'roles.id!=-1', 'name', 'search', '', '', 1, NOW(), 1, NOW()); 
    14 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('201', 'Scheduler', 'system', '1', 'scheduler', 'scheduler', 'modules/base/scheduler_addedit.php', '-100', 'modules/base/scheduler_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'scheduler.id!=0', 'scheduler.name', '', '', '', 1, NOW(), 1, NOW()); 
    15 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('202', 'System Log', 'system', '1', 'log', 'log LEFT JOIN users ON log.userid=users.id', 'N/A', '-100', 'N/A', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'log.stamp> DATE_SUB(CURDATE(),INTERVAL 1 DAY)', 'log.stamp', '', '', '', 1, NOW(), 1, NOW()); 
    16 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('203', 'Tabs', 'system', '1', 'tabs', 'tabs LEFT JOIN roles ON tabs.roleid=roles.id', 'modules/base/tabs_addedit.php', '-100', 'modules/base/tabs_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'tabs.id!=0', 'tabs.tabgroup,tabs.displayorder', '', '', '', 1, NOW(), 1, NOW()); 
    17 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('204', 'Smart Searches', 'table', '1', 'smartsearches', '(smartsearches INNER JOIN tabledefs ON smartsearches.tabledefid = tabledefs.id) INNER JOIN modules on smartsearches.moduleid = modules.id', 'modules/base/smartsearches_addedit.php', '-100', 'modules/base/smartsearches_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'smartsearches.id != -1', 'smartsearches.name', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    18 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('205', 'Snapshot Widgets', 'system', '1', 'widgets', '((widgets INNER JOIN modules ON widgets.moduleid = modules.id) LEFT JOIN roles ON widgets.roleid = roles.id) ', 'modules/base/widgets_addedit.php', '-100', 'modules/base/widgets_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'widgets.id != -1', 'widgets.title', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
     1INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('9', 'tbld:afe6d297-b484-4f0b-57d4-1c39412e9dfb', 'Users', 'system', '1', 'users', 'users', 'modules/base/users_addedit.php', '0', 'modules/base/users_addedit.php', '0', 'modules/base/users_import.php', '-100', '0', '-100', '-100', 'revoke', '0', '0', 'users.id !=0', 'users.id', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
     2INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('10', 'tbld:8d19c73c-42fb-d829-3681-d20b4dbe43b9', 'Relationships', 'system', '1', 'relationships', '(relationships inner join tabledefs as fromtable on relationships.fromtableid=fromtable.id) inner join tabledefs as totable on relationships.totableid=totable.id', 'modules/base/relationships_addedit.php', '0', 'modules/base/relationships_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'relationships.id != 0', 'fromtable.displayname, name', '', '', '', 1, NOW(), 1, NOW()); 
     3INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('11', 'tbld:5c9d645f-26ab-5003-b98e-89e9049f8ac3', 'Table Definitions', 'system', '1', 'tabledefs', 'tabledefs left join modules on tabledefs.moduleid=modules.id', 'modules/base/tabledefs_addedit.php', '-100', 'modules/base/tabledefs_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'tabledefs.id != 0', 'modules.name, tabledefs.displayname', '', '', '', 1, NOW(), 1, NOW()); 
     4INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('12', 'tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1', 'Notes', 'table', '1', 'notes', 'notes', 'modules/base/notes_addedit.php', '0', 'modules/base/notes_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '1', 'notes.type=\'NT\' AND notes.createdby = {{$_SESSION[\'userinfo\'][\'id\']}} AND completed=0', 'notes.category,notes.type,notes.importance DESC,notes.creationdate', 'search', 'My Unread Notes', 'new', 1, NOW(), 1, NOW()); 
     5INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('16', 'tbld:d595ef42-db9d-2233-1b9b-11dfd0db9cbb', 'Reports', 'system', '1', 'reports', 'reports left join tabledefs on reports.tabledefid=tabledefs.id', 'modules/base/reports_addedit.php', '0', 'modules/base/reports_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'reports.id != 0', 'tabledefid,displayorder DESC, reports.name', '', '', '', 1, NOW(), 1, NOW()); 
     6INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('17', 'tbld:e251524a-2da4-a0c9-8725-d3d0412d8f4a', 'Saved Searches/Sorts', 'system', '1', 'usersearches', '(usersearches left join users on usersearches.userid = users.id) inner join tabledefs on usersearches.tabledefid=tabledefs.id', 'modules/base/usersearches_edit.php', '0', 'N/A', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'usersearches.id != 0', 'usersearches.name', '', '', '', 1, NOW(), 1, NOW()); 
     7INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('19', 'tbld:83187e3d-101e-a8a5-037f-31e9800fed2d', 'Menu', 'system', '1', 'menu', '((menu LEFT JOIN menu as parentmenu on menu.parentid=parentmenu.id) LEFT JOIN roles on menu.roleid=roles.id)', 'modules/base/menu_addedit.php', '-100', 'modules/base/menu_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'menu.id!=0', 'if(parentmenu.name is null,menu.displayorder,parentmenu.displayorder+(menu.displayorder+1)/10000)', '', '', '', 1, NOW(), 1, NOW()); 
     8INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('21', 'tbld:ea159d67-5e89-5b7f-f5a0-c740e147cd73', 'Installed Modules', 'system', '1', 'modules', 'modules', 'modules/base/modules_view.php', '0', 'modules/base/modules_view.php', '0', NULL, '-100', '0', '-100', '-100', 'NA', '0', '0', 'modules.id!=0', 'modules.name', '', '', '', 1, NOW(), 1, NOW()); 
     9INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('23', 'tbld:2bc3e683-81f9-694a-9550-a0c7263057de', 'Tasks', 'view', '1', 'notes', '((notes left join users as assignedto on assignedto.id= notes.assignedtoid)  left join users as assignedby on assignedby.id=notes.assignedbyid)', 'modules/base/notes_addedit.php?backurl=../../search.php?id=23', '0', 'modules/base/notes_addedit.php?ty=TS&backurl=../../search.php?id=23', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'notes.id = -1', 'notes.importance, IF(assignedtodate IS NOT NULL, assignedtodate, IF((enddate IS NOT NULL && type = \'TS\'), enddate, IF((startdate IS NOT NULL && type = \'EV\'), startdate, CURDATE()))), subject', 'search', 'My Uncompleted Tasks', NULL, 1, NOW(), 1, NOW()); 
     10INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('24', 'tbld:0fcca651-6c34-c74d-ac04-2d88f602dd71', 'Events', 'view', '1', 'notes', '((notes left join users as assignedto on assignedto.id= notes.assignedtoid)  left join users as assignedby on assignedby.id=notes.assignedbyid)', 'modules/base/notes_addedit.php?backurl=../../search.php?id=24', '0', 'modules/base/notes_addedit.php?ty=EV&backurl=../../search.php?id=24', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'notes.type=\'EV\' AND notes.createdby = {{$_SESSION[\'userinfo\'][\'id\']}} AND ((notes.startdate = year(notes.startdate)=year(curdate()) and week(notes.startdate)=week(curdate())))', 'notes.startdate DESC,notes.starttime DESC,notes.enddate DESC,notes.endtime DESC,notes.importance', 'search', NULL, NULL, 1, NOW(), 1, NOW()); 
     11INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('26', 'tbld:80b4f38d-b957-bced-c0a0-ed08a0db6475', 'Files', 'table', '1', 'files', 'files', 'modules/base/files_addedit.php', '0', 'modules/base/files_addedit.php', '0', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'files.id=-1', 'files.name', 'search', '', '', 1, NOW(), 1, NOW()); 
     12INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('27', 'tbld:edb8c896-7ce3-cafe-1d58-5aefbcd5f3d7', 'Attachments', 'table', '1', 'attachments', '(attachments INNER JOIN files on attachments.fileid=files.id)', 'modules/base/files_addedit.php', '0', 'modules/base/files_addedit.php', '0', NULL, '-100', '0', '-100', '-100', 'delete', '0', '0', 'attachments.id!=0', 'attachments.creationdate DESC', 'search', '', '', 1, NOW(), 1, NOW()); 
     13INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('200', 'tbld:87b9fe06-afe5-d9c6-0fa0-4a0f2ec4ee8a', 'Roles', 'table', '1', 'roles', 'roles', 'modules/base/roles_addedit.php', '-100', 'modules/base/roles_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'inactivate', '0', '0', 'roles.id!=-1', 'name', 'search', '', '', 1, NOW(), 1, NOW()); 
     14INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('201', 'tbld:83de284b-ef79-3567-145c-30ca38b40796', 'Scheduler', 'system', '1', 'scheduler', 'scheduler', 'modules/base/scheduler_addedit.php', '-100', 'modules/base/scheduler_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'scheduler.id!=0', 'scheduler.name', '', '', '', 1, NOW(), 1, NOW()); 
     15INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('202', 'tbld:3f71ab66-1f84-d68b-e2a3-3ee3bb0ec667', 'System Log', 'system', '1', 'log', 'log LEFT JOIN users ON log.userid=users.id', 'N/A', '-100', 'N/A', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'log.stamp> DATE_SUB(CURDATE(),INTERVAL 1 DAY)', 'log.stamp', '', '', '', 1, NOW(), 1, NOW()); 
     16INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('203', 'tbld:7e75af48-6f70-d157-f440-69a8e7f59d38', 'Tabs', 'system', '1', 'tabs', 'tabs LEFT JOIN roles ON tabs.roleid=roles.id', 'modules/base/tabs_addedit.php', '-100', 'modules/base/tabs_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'tabs.id!=0', 'tabs.tabgroup,tabs.displayorder', '', '', '', 1, NOW(), 1, NOW()); 
     17INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('204', 'tbld:29925e0a-c825-0067-8882-db4b57866a96', 'Smart Searches', 'table', '1', 'smartsearches', '(smartsearches INNER JOIN tabledefs ON smartsearches.tabledefid = tabledefs.id) INNER JOIN modules on smartsearches.moduleid = modules.id', 'modules/base/smartsearches_addedit.php', '-100', 'modules/base/smartsearches_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'smartsearches.id != -1', 'smartsearches.name', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
     18INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('205', 'tbld:2ad5146c-d4c0-db8e-592a-c0cc2f3c2c21', 'Snapshot Widgets', 'system', '1', 'widgets', '((widgets INNER JOIN modules ON widgets.moduleid = modules.id) LEFT JOIN roles ON widgets.roleid = roles.id) ', 'modules/base/widgets_addedit.php', '-100', 'modules/base/widgets_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'widgets.id != -1', 'widgets.title', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
  • trunk/phpbms/install/tabs.sql

    r517 r542  
    1 INSERT INTO `tabs` (`id`,`name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (1,'general','tabledefs entry','modules/base/tabledefs_addedit.php',10,1,-100,'','',1,NOW(),1,NOW()); 
    2 INSERT INTO `tabs` (`id`,`name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (2,'columns','tabledefs entry','modules/base/tabledefs_columns.php',20,0,-100,'',NULL,1,NOW(),1,NOW()); 
    3 INSERT INTO `tabs` (`id`,`name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (3,'options','tabledefs entry','modules/base/tabledefs_options.php',30,0,-100,'',NULL,1,NOW(),1,NOW()); 
    4 INSERT INTO `tabs` (`id`,`name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (4,'quick search','tabledefs entry','modules/base/tabledefs_quicksearch.php',40,0,-100,'',NULL,1,NOW(),1,NOW()); 
    5 INSERT INTO `tabs` (`id`,`name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (5,'search fields','tabledefs entry','modules/base/tabledefs_searchfields.php',50,0,-100,'',NULL,1,NOW(),1,NOW()); 
    6 INSERT INTO `tabs` (`id`,`name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (100,'groupings','tabledefs entry','modules/base/tabledefs_groupings.php',25,0,-100,'',NULL,1,NOW(),1,NOW()); 
    7 INSERT INTO `tabs` (`id`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (101, 'custom fields', 'tabledefs entry', 'modules/base/tabledefs_custom.php', '60', '0', '-100', NULL, NULL, 1, NOW(), 1, NOW()); 
     1INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('1',   'tab:fdf064e0-f2d9-6c67-b64f-449e72e859b9', 'general', 'tabledefs entry', 'modules/base/tabledefs_addedit.php', '10', '1', '-100', '', '', 1, NOW(), 1, NOW()); 
     2INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('2',   'tab:b1011143-1d47-520e-5879-3953a4f5055b', 'columns', 'tabledefs entry', 'modules/base/tabledefs_columns.php', '20', '0', '-100', '', NULL, 1, NOW(), 1, NOW()); 
     3INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('3',   'tab:c5bdaf10-062c-fb3a-f40f-ddce821fd579', 'options', 'tabledefs entry', 'modules/base/tabledefs_options.php', '30', '0', '-100', '', NULL, 1, NOW(), 1, NOW()); 
     4INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('4',   'tab:276dacd4-4a37-d979-aeda-a7982f632559', 'quick search', 'tabledefs entry', 'modules/base/tabledefs_quicksearch.php', '40', '0', '-100', '', NULL, 1, NOW(), 1, NOW()); 
     5INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('5',   'tab:22d08e82-5047-4150-6de7-49e89149f56b', 'search fields', 'tabledefs entry', 'modules/base/tabledefs_searchfields.php', '50', '0', '-100', '', NULL, 1, NOW(), 1, NOW()); 
     6INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('100', 'tab:c111eaf5-692b-9c7d-1d46-1bacb6703361', 'groupings', 'tabledefs entry', 'modules/base/tabledefs_groupings.php', '25', '0', '-100', '', NULL, 1, NOW(), 1, NOW()); 
     7INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('101', 'tab:2ebf956d-5e39-c7d5-16b7-501b64685a5a', 'custom fields', 'tabledefs entry', 'modules/base/tabledefs_custom.php', '60', '0', '-100', NULL, NULL, 1, NOW(), 1, NOW()); 
  • trunk/phpbms/install/updatev0.98.sql

    r540 r542  
    22ALTER TABLE `choices` ENGINE=INNODB; 
    33ALTER TABLE `files` ENGINE=INNODB; 
     4ALTER TABLE `files` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     5ALTER TABLE `files` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    46ALTER TABLE `log` ENGINE=INNODB; 
    57ALTER TABLE `menu` ENGINE=INNODB; 
    68ALTER TABLE `menu` ADD COlUMN `uuid` varchar(64) NOT NULL AFTER `id`, MODIFY COLUMN `parentid` varchar(64) NOT NULL DEFAULT '0'; 
    79ALTER TABLE `modules` ENGINE=INNODB; 
     10ALTER TABLE `modules` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
    811ALTER TABLE `notes` ENGINE=INNODB; 
    912ALTER TABLE `notes` MODIFY COLUMN `type` CHAR(2) NOT NULL DEFAULT 'NT'; 
     13ALTER TABLE `notes` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     14ALTER TABLE `notes` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    1015ALTER TABLE `relationships` ENGINE=INNODB; 
     16ALTER TABLE `relationships` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
    1117ALTER TABLE `reports` ENGINE=INNODB; 
    1218ALTER TABLE `reports` MODIFY COLUMN `reportfile` VARCHAR(128) NOT NULL; 
     
    1521ALTER TABLE `roles` ENGINE=INNODB; 
    1622ALTER TABLE `roles` MODIFY COLUMN `inactive` TINYINT(4) NOT NULL DEFAULT 0; 
     23ALTER TABLE `roles` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     24ALTER TABLE `roles` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    1725ALTER TABLE `rolestousers` ENGINE=INNODB; 
    1826ALTER TABLE `scheduler` ENGINE=INNODB; 
    19 INSERT INTO `scheduler` (`name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('Clean Import Files', './scheduler_delete_tempimport.php', '30::*::*::*::*', NULL, NOW(), NULL, 'This will delete any temporary import files that are present (for whatever reason) after 30 minutes of their creation.', '0', 1, NOW(), 1, NOW()); 
    20 INSERT INTO `scheduler` (`id`, `name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('4', 'Remove Excess System Log Records', './scheduler_delete_logs.php', '*::24::*::*::*', NULL, '2009-03-31 12:00:00', NULL, 'This script will trim the system log when there are more than 2000 records present at the time of its calling (default will be every 24 hours).', '0', 1, NOW(), 1, NOW()); 
     27ALTER TABLE `scheduler` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     28--scheduler-- 
     29INSERT INTO `scheduler` (`uuid`, `name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('schd:fb52e7fb-bb49-7f5f-89e1-002b2785f085', 'Clean Import Files', './scheduler_delete_tempimport.php', '30::*::*::*::*', '2009-05-28 12:30:02', '2009-05-07 17:27:13', NULL, 'This will delete any temporary import files that are present (for whatever reason) after 30 minutes of their creation.', '0', 1, NOW(), 1, NOW()); 
     30INSERT INTO `scheduler` (`uuid`, `name`, `job`, `crontab`, `lastrun`, `startdatetime`, `enddatetime`, `description`, `inactive`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('schd:d1c247de-9811-d37f-ad94-a8472dc1bc9c', 'Remove Excess System Log Records', './scheduler_delete_logs.php', '*::24::*::*::*', NULL, '2009-03-31 12:00:00', NULL, 'This script will trim the system log when there are more than 2000 records present at the time of its calling (default will be every 24 hours).', '0', 1, NOW(), 1, NOW()); 
     31--end insert scheduler 
    2132ALTER TABLE `settings` ENGINE=INNODB; 
    2233ALTER TABLE `smartsearches` ENGINE=INNODB; 
     34ALTER TABLE `smartsearches` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     35--update smartsearches-- 
     36UPDATE `smartsearches` SET `uuid`='smrt:ccc73fa4-6176-fad4-fbb1-5186d0edbdd1' WHERE `id`='2'; 
     37UPDATE `smartsearches` SET `uuid`='smrt:855406d5-659d-c907-74a1-acfd3802fd73' WHERE `id`='5'; 
     38UPDATE `smartsearches` SET `uuid`='smrt:ed5b1d7f-b0fe-2088-f17c-47bfbe1ace25' WHERE `id`='9'; 
     39--end update smartsearches-- 
    2340ALTER TABLE `tablecolumns` ENGINE=INNODB; 
    2441ALTER TABLE `tablecolumns` MODIFY COLUMN `roleid` int(10) NOT NULL default '0'; 
     42 
     43--TABLEDEFS-- 
    2544ALTER TABLE `tabledefs` ENGINE=INNODB; 
    2645ALTER TABLE `tabledefs` ADD COLUMN `importfile` VARCHAR(128) DEFAULT NULL AFTER `addroleid`, ADD COLUMN `importroleid` int(11) NOT NULL DEFAULT '-100' AFTER `importfile`, ADD COLUMN `canpost` tinyint(4) NOT NULL default '0' AFTER `deletebutton`, ADD COLUMN `hascustomfields` tinyint(4) NOT NULL default '0' AFTER `canpost`; 
    2746ALTER TABLE `tabledefs` MODIFY COLUMN `defaultwhereclause` TEXT DEFAULT NULL, MODIFY COLUMN `defaultsortorder` TEXT; 
     47ALTER TABLE `tabledefs` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     48--END TABLEDEFS-- 
     49 
    2850ALTER TABLE `tablefindoptions` ENGINE=INNODB; 
    2951ALTER TABLE `tablefindoptions` MODIFY COLUMN `search` TEXT NOT NULL; 
     
    5274ALTER TABLE `tablesearchablefields` MODIFY COLUMN `field` TEXT NOT NULL; 
    5375ALTER TABLE `tabs` ENGINE=INNODB; 
     76ALTER TABLE `tabs` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
    5477ALTER TABLE `users` ENGINE=INNODB; 
    5578ALTER TABLE `users` ADD COLUMN `lastip` VARCHAR(45) NOT NULL DEFAULT '' AFTER `lastname`; 
     79ALTER TABLE `users` ADD COLUMN `uuid` varchar(64) NOT NULL AFTER `id`; 
     80ALTER TABLE `users` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    5681ALTER TABLE `usersearches` ENGINE=INNODB; 
    5782UPDATE `tablefindoptions` SET `search` = 'notes.type=\'TS\' AND notes.private=0' WHERE `tabledefid` = 23 AND `name` = 'Public Tasks'; 
     
    6085CREATE TABLE `widgets` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `uuid` varchar(64) NOT NULL, `type` varchar(64) NOT NULL, `title` varchar(128) NOT NULL, `file` varchar(255) NOT NULL, `roleid` int(11) NOT NULL default '0', `moduleid` int(11) NOT NULL default '0', `default` tinyint(4) NOT NULL default '0', `createdby` int(11) default NULL, `creationdate` datetime default NULL, `modifiedby` int(10) unsigned default NULL, `modifieddate` timestamp, PRIMARY KEY  (`id`), KEY `uniqueid` (`uuid`)) ENGINE=INNODB; 
    6186CREATE TABLE `userpreferences` (`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `userid` int(120) NOT NULL, `name` varchar(64) NOT NULL, `value` TEXT, PRIMARY KEY  (`id`), KEY `thename` (`name`)) ENGINE=INNODB; 
    62 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('205', 'Snapshot Widgets', 'system', '1', 'widgets', '((widgets INNER JOIN modules ON widgets.moduleid = modules.id) LEFT JOIN roles ON widgets.roleid = roles.id) ', 'modules/base/widgets_addedit.php', '-100', 'modules/base/widgets_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', 'widgets.id != -1', 'widgets.title', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
     87 
     88--tabledefs update/insert-- 
     89INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('205', 'tbld:2ad5146c-d4c0-db8e-592a-c0cc2f3c2c21', 'Snapshot Widgets', 'system', '1', 'widgets', '((widgets INNER JOIN modules ON widgets.moduleid = modules.id) LEFT JOIN roles ON widgets.roleid = roles.id) ', 'modules/base/widgets_addedit.php', '-100', 'modules/base/widgets_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'widgets.id != -1', 'widgets.title', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
    6390DELETE FROM `tabledefs` WHERE `id` = '19'; 
    64 INSERT INTO `tabledefs` (`id`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('19', 'Menu', 'system', '1', 'menu', '((menu LEFT JOIN menu as parentmenu on menu.parentid=parentmenu.uuid) LEFT JOIN roles on menu.roleid=roles.id)', 'modules/base/menu_addedit.php', '-100', 'modules/base/menu_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', 'menu.id!=0', 'if(parentmenu.name is null,menu.displayorder,parentmenu.displayorder+(menu.displayorder+1)/10000)', NULL, NULL, NULL, 1, NOW(), 1, NOW()); 
     91INSERT INTO `tabledefs` (`id`, `uuid`, `displayname`, `type`, `moduleid`, `maintable`, `querytable`, `editfile`, `editroleid`, `addfile`, `addroleid`, `importfile`, `importroleid`, `searchroleid`, `advsearchroleid`, `viewsqlroleid`, `deletebutton`, `canpost`, `hascustomfields`, `defaultwhereclause`, `defaultsortorder`, `defaultsearchtype`, `defaultcriteriafindoptions`, `defaultcriteriaselection`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('19', 'tbld:83187e3d-101e-a8a5-037f-31e9800fed2d', 'Menu', 'system', '1', 'menu', '((menu LEFT JOIN menu as parentmenu on menu.parentid=parentmenu.id) LEFT JOIN roles on menu.roleid=roles.id)', 'modules/base/menu_addedit.php', '-100', 'modules/base/menu_addedit.php', '-100', NULL, '-100', '-100', '-100', '-100', 'delete', '0', '0', 'menu.id!=0', 'if(parentmenu.name is null,menu.displayorder,parentmenu.displayorder+(menu.displayorder+1)/10000)', '', '', '', 1, NOW(), 1, NOW()); 
     92UPDATE `tabledefs` SET `uuid`='tbld:afe6d297-b484-4f0b-57d4-1c39412e9dfb' WHERE `id`='9'; 
     93UPDATE `tabledefs` SET `uuid`='tbld:8d19c73c-42fb-d829-3681-d20b4dbe43b9' WHERE `id`='10'; 
     94UPDATE `tabledefs` SET `uuid`='tbld:5c9d645f-26ab-5003-b98e-89e9049f8ac3' WHERE `id`='11'; 
     95UPDATE `tabledefs` SET `uuid`='tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1' WHERE `id`='12'; 
     96UPDATE `tabledefs` SET `uuid`='tbld:d595ef42-db9d-2233-1b9b-11dfd0db9cbb' WHERE `id`='16'; 
     97UPDATE `tabledefs` SET `uuid`='tbld:e251524a-2da4-a0c9-8725-d3d0412d8f4a' WHERE `id`='17'; 
     98UPDATE `tabledefs` SET `uuid`='tbld:ea159d67-5e89-5b7f-f5a0-c740e147cd73' WHERE `id`='21'; 
     99UPDATE `tabledefs` SET `uuid`='tbld:2bc3e683-81f9-694a-9550-a0c7263057de' WHERE `id`='23'; 
     100UPDATE `tabledefs` SET `uuid`='tbld:0fcca651-6c34-c74d-ac04-2d88f602dd71' WHERE `id`='24'; 
     101UPDATE `tabledefs` SET `uuid`='tbld:80b4f38d-b957-bced-c0a0-ed08a0db6475' WHERE `id`='26'; 
     102UPDATE `tabledefs` SET `uuid`='tbld:edb8c896-7ce3-cafe-1d58-5aefbcd5f3d7' WHERE `id`='27'; 
     103UPDATE `tabledefs` SET `uuid`='tbld:87b9fe06-afe5-d9c6-0fa0-4a0f2ec4ee8a' WHERE `id`='200'; 
     104UPDATE `tabledefs` SET `uuid`='tbld:83de284b-ef79-3567-145c-30ca38b40796' WHERE `id`='201'; 
     105UPDATE `tabledefs` SET `uuid`='tbld:3f71ab66-1f84-d68b-e2a3-3ee3bb0ec667' WHERE `id`='202'; 
     106UPDATE `tabledefs` SET `uuid`='tbld:7e75af48-6f70-d157-f440-69a8e7f59d38' WHERE `id`='203'; 
     107UPDATE `tabledefs` SET `uuid`='tbld:29925e0a-c825-0067-8882-db4b57866a96' WHERE `id`='204'; 
     108--end tabledefs update/insert-- 
     109 
     110--users update-- 
     111UPDATE `users` SET `uuid`='usr:5c196e01-193a-8952-fee7-29b4e5e6a0b0' WHERE `id`='1'; 
     112UPDATE `users` SET `uuid`='usr:cb67a60b-a264-735c-6189-49a7c883af0b' WHERE `id`='2'; 
     113UPDATE `users` SET `uuid`='usr:42e0cc76-3c31-d9b6-ff12-fe4adfd15e75' WHERE `id`='3'; 
     114--end users update-- 
     115 
    65116INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('205', 'widget', 'concat(\'[b]\', widgets.title, \'[/b][br]\', widgets.uuid)', 'left', '', '0', 'widgets.title', '0', '100%', 'bbcode', '0'); 
    66117INSERT INTO `tablecolumns` (`tabledefid`, `name`, `column`, `align`, `footerquery`, `displayorder`, `sortorder`, `wrap`, `size`, `format`, `roleid`) VALUES ('205', 'role', 'IF(widgets.roleid != 0, IF(widgets.roleid != -100, roles.name, \'Administrator\'), \'EVERYONE\')', 'left', '', '2', '', '0', '', NULL, '0'); 
     
    119170INSERT INTO `menu` (`uuid`, `name`, `link`, `parentid`, `displayorder`, `createdby`, `modifiedby`, `creationdate`, `modifieddate`, `roleid`) VALUES ('menu:e8401ebb-c369-304f-053d-8195988e7faf', '----', 'N/A', 'menu:f07d910f-f56d-3d24-e74f-7a3b36b2d3c8', '30', 1, 1, NOW(), NOW(), '-100'); 
    120171UPDATE `tabledefs` SET `hascustomfields` = 1 WHERE `id` IN(12, 9, 26, 200); 
    121 ALTER TABLE `notes` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    122 ALTER TABLE `users` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    123 ALTER TABLE `roles` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    124 ALTER TABLE `files` ADD COLUMN `custom1` DOUBLE, ADD COLUMN `custom2` DOUBLE, ADD COLUMN `custom3` DATETIME, ADD COLUMN `custom4` DATETIME, ADD COLUMN `custom5` VARCHAR(255), ADD COLUMN `custom6` VARCHAR(255), ADD COLUMN `custom7` TINYINT(1) DEFAULT 0, ADD COLUMN `custom8` TINYINT(1) DEFAULT 0; 
    125 INSERT INTO `tabs` (`id`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES (101, 'custom fields', 'tabledefs entry', 'modules/base/tabledefs_custom.php', '60', '0', '-100', NULL, NULL, 1, NOW(), 1, NOW()); 
     172 
     173--tabs insert/update-- 
     174INSERT INTO `tabs` (`id`, `uuid`, `name`, `tabgroup`, `location`, `displayorder`, `enableonnew`, `roleid`, `tooltip`, `notificationsql`, `createdby`, `creationdate`, `modifiedby`, `modifieddate`) VALUES ('101', 'tab:2ebf956d-5e39-c7d5-16b7-501b64685a5a', 'custom fields', 'tabledefs entry', 'modules/base/tabledefs_custom.php', '60', '0', '-100', NULL, NULL, 1, NOW(), 1, NOW()); 
     175UPDATE `tabs` SET `uuid`='tab:fdf064e0-f2d9-6c67-b64f-449e72e859b9' WHERE `id`='1'; 
     176UPDATE `tabs` SET `uuid`='tab:b1011143-1d47-520e-5879-3953a4f5055b' WHERE `id`='2'; 
     177UPDATE `tabs` SET `uuid`='tab:c5bdaf10-062c-fb3a-f40f-ddce821fd579' WHERE `id`='3'; 
     178UPDATE `tabs` SET `uuid`='tab:276dacd4-4a37-d979-aeda-a7982f632559' WHERE `id`='4'; 
     179UPDATE `tabs` SET `uuid`='tab:22d08e82-5047-4150-6de7-49e89149f56b' WHERE `id`='5'; 
     180UPDATE `tabs` SET `uuid`='tab:c111eaf5-692b-9c7d-1d46-1bacb6703361' WHERE `id`='100'; 
     181--end tabs insert/update-- 
     182--reports update-- 
    126183UPDATE `reports` SET `uuid`='reports:37cee478-b57e-2d53-d951-baf3937ba9e0' WHERE `name`='Raw Table Print'; 
    127184UPDATE `reports` SET `uuid`='reports:dac75fb9-91d2-cb1e-9213-9fab6d32f4c8' WHERE `name`='Raw Table Export'; 
     
    129186UPDATE `reports` SET `uuid`='reports:2944b204-5967-348a-8679-6835f45f0d79' WHERE `name`='SQL Export'; 
    130187UPDATE `reports` SET `uuid`='reports:37a299d1-d795-ad83-4b47-0778c16a381c' WHERE `name`='Support Tables SQL Export'; 
    131 -- Adding UUID prefix 
     188--end reports update-- 
     189--ADD TABLEDEFS-- 
    132190ALTER TABLE `tabledefs` ADD COLUMN `prefix` VARCHAR(4) AFTER `displayname`; 
    133191-- Setting BASE UUID prefix for needed records 
  • trunk/phpbms/install/users.sql

    r359 r542  
    1 INSERT INTO `users` (`id`, `login`, `password`, `firstname`, `lastname`, `creationdate`, `revoked`, `createdby`, `modifiedby`, `lastlogin`, `modifieddate`, `email`, `phone`, `department`, `employeenumber`, `admin`, `portalaccess`) VALUES (1,'nologin','Tá€-Gó','phpBMS','Install',NOW(),1,1,1,NULL,NOW(),'','','','',0,1); 
    2 INSERT INTO `users` (`id`, `login`, `password`, `firstname`, `lastname`, `creationdate`, `revoked`, `createdby`, `modifiedby`, `lastlogin`, `modifieddate`, `email`, `phone`, `department`, `employeenumber`, `admin`, `portalaccess`) VALUES (2,'admin',encode('phpbms','freeble'),'Administrator',' ',NOW(),0,1,1,NULL,NOW(),'','','','',1,0); 
    3 INSERT INTO `users` (`id`, `login`, `password`, `firstname`, `lastname`, `creationdate`, `revoked`, `createdby`, `modifiedby`, `lastlogin`, `modifieddate`, `email`, `phone`, `department`, `employeenumber`, `admin`, `portalaccess`) VALUES (3,'Scheduler','Òt%ÁBøTv:$ÖRtÈ`','phpBMS','Scheduler',NOW(),0,1,1,NULL,NOW(),'','','','',0,1); 
     1INSERT INTO `users` (`id`, `uuid`, `login`, `password`, `firstname`, `lastname`, `lastip`, `creationdate`, `revoked`, `createdby`, `modifiedby`, `lastlogin`, `modifieddate`, `email`, `phone`, `department`, `employeenumber`, `admin`, `portalaccess`) VALUES ('1', 'usr:5c196e01-193a-8952-fee7-29b4e5e6a0b0', 'nologin', 'Tá€-Gó', 'phpBMS', 'Install', '', NOW(), '1', 1, 1, NULL, NOW(), '', '', '', '', '0', '1'); 
     2INSERT INTO `users` (`id`, `uuid`, `login`, `password`, `firstname`, `lastname`, `lastip`, `creationdate`, `revoked`, `createdby`, `modifiedby`, `lastlogin`, `modifieddate`, `email`, `phone`, `department`, `employeenumber`, `admin`, `portalaccess`) VALUES ('2', 'usr:cb67a60b-a264-735c-6189-49a7c883af0b', 'admin', encode('phpbms','freeble'), 'Administrator', ' ', '192.168.1.86', NOW(), '0', 1, 1, '2009-05-28 11:52:12', NOW(), '', '', '', '', '1', '0'); 
     3INSERT INTO `users` (`id`, `uuid`, `login`, `password`, `firstname`, `lastname`, `lastip`, `creationdate`, `revoked`, `createdby`, `modifiedby`, `lastlogin`, `modifieddate`, `email`, `phone`, `department`, `employeenumber`, `admin`, `portalaccess`) VALUES ('3', 'usr:42e0cc76-3c31-d9b6-ff12-fe4adfd15e75', 'Scheduler', 'Òt%ÁBøTv:$ÖRtÈ`', 'phpBMS', 'Scheduler', '', NOW(), '0', 1, 1, NULL, NOW(), '', '', '', '', '0', '1'); 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.