install.sql 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. SET @sName = 'bx_attendant';
  2. -- TABLE: data
  3. CREATE TABLE `bx_attendant_events` (
  4. `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  5. `method` varchar(50) NOT NULL,
  6. `event` varchar(50) NOT NULL,
  7. `added` int(11) DEFAULT NULL,
  8. `processed` int(11) DEFAULT NULL,
  9. `action` varchar(10) NOT NULL,
  10. `object_id` int(11) DEFAULT NULL,
  11. `profile_id` int(11) DEFAULT NULL,
  12. `module` varchar(50) NOT NULL,
  13. PRIMARY KEY (`id`),
  14. INDEX `object_id` (`object_id`),
  15. INDEX `action` (`action`)
  16. );
  17. -- STUDIO: page & widget
  18. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  19. (3, @sName, '_bx_attendant', '_bx_attendant', 'bx_attendant@modules/boonex/attendant/|std-icon.svg');
  20. SET @iPageId = LAST_INSERT_ID();
  21. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `featured`)
  22. VALUES(@iPageId, @sName, 'extensions', '{url_studio}module.php?name=bx_attendant', '', 'bx_attendant@modules/boonex/attendant/|std-icon.svg', '_bx_attendant', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}', 0);
  23. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  24. SET @iParentPageOrder = (SELECT IFNULL(MAX(`order`), 0) + 1 FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  25. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  26. (@iParentPageId, LAST_INSERT_ID(), @iParentPageOrder);