install.sql 1.4 KB

12345678910111213141516171819202122232425262728
  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. `added` int(11) DEFAULT NULL,
  7. `processed` int(11) DEFAULT NULL,
  8. `action` varchar(10) NOT NULL,
  9. `object_id` int(11) DEFAULT NULL,
  10. PRIMARY KEY (`id`),
  11. INDEX `object_id` (`object_id`),
  12. INDEX `action` (`action`)
  13. );
  14. -- STUDIO: page & widget
  15. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  16. (3, @sName, '_bx_attendant', '_bx_attendant', 'bx_attendant@modules/boonex/attendant/|std-icon.svg');
  17. SET @iPageId = LAST_INSERT_ID();
  18. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `bookmark`)
  19. 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);
  20. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  21. SET @iParentPageOrder = (SELECT IFNULL(MAX(`order`), 0) + 1 FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  22. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  23. (@iParentPageId, LAST_INSERT_ID(), @iParentPageOrder);