install.sql 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. SET @sName = 'bx_dolphin_migration';
  2. -- STUDIO: page & widget
  3. INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
  4. (3, @sName, '_bx_dolphin_migration_wgt_cpt', '_bx_dolphin_migration_wgt_cpt', 'bx_dolphin_migration@modules/boonex/dolphin_migration/|std-icon.svg');
  5. SET @iPageId = LAST_INSERT_ID();
  6. SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
  7. SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
  8. INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
  9. (@iPageId, @sName, 'extensions', '{url_studio}module.php?name=bx_dolphin_migration', '', 'bx_dolphin_migration@modules/boonex/dolphin_migration/|std-icon.svg', '_bx_dolphin_migration_wgt_cpt', '', '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";}');
  10. INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
  11. (@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));
  12. CREATE TABLE IF NOT EXISTS `bx_dolphin_transfers` (
  13. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  14. `module` varchar(50) NOT NULL,
  15. `number` varchar(50) NOT NULL,
  16. `status` enum('not_started','started','finished','error') NOT NULL,
  17. `status_text` varchar(255) NOT NULL,
  18. PRIMARY KEY (`id`),
  19. UNIQUE `module` ( `module` )
  20. );
  21. CREATE TABLE IF NOT EXISTS `bx_dolphin_config` (
  22. `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  23. `name` varchar(100) NOT NULL,
  24. `value` varchar(150) NOT NULL,
  25. PRIMARY KEY (`id`),
  26. UNIQUE `name` (`name`)
  27. );