Changeset 15755 for trunk/modules
- Timestamp:
- 12/13/11 03:41:28 (6 months ago)
- Location:
- trunk/modules/boonex/articles/install/sql
- Files:
-
- 4 edited
-
disable.sql (modified) (4 diffs)
-
enable.sql (modified) (5 diffs)
-
install.sql (modified) (9 diffs)
-
uninstall.sql (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/boonex/articles/install/sql/disable.sql
r15751 r15755 1 SET @sName = 'bx_articles'; 2 1 3 -- 2 4 -- Studio page and widget. 3 5 -- 4 SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`= '[name]'LIMIT 1);6 SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`=@sName LIMIT 1); 5 7 UPDATE `sys_std_widgets` SET `status`='2' WHERE `page_id`=@iPageId LIMIT 1; 6 8 7 9 8 10 SET @iTMParentId = (SELECT `ID` FROM `sys_menu_top` WHERE `Name`='Articles' LIMIT 1); 9 DELETE FROM `sys_menu_top` WHERE `Name` IN ('Articles', ' [db_prefix]_view') OR `Parent`=@iTMParentId;11 DELETE FROM `sys_menu_top` WHERE `Name` IN ('Articles', 'bx_arl_view') OR `Parent`=@iTMParentId; 10 12 DELETE FROM `sys_menu_member` WHERE `Name`='Articles'; 11 13 … … 16 18 17 19 DELETE FROM `sys_options` WHERE `Name` IN ('permalinks_module_articles', 'category_auto_app_bx_articles'); 18 DELETE FROM `sys_options_types`, `sys_options_categories`, `sys_options` USING `sys_options_types`, `sys_options_categories`, `sys_options` WHERE `sys_options_types`.`id`=`sys_options_categories`.`type_id` AND `sys_options_categories`.`id`=`sys_options`.`category_id` AND `sys_options_types`.`name`= '[name]';20 DELETE FROM `sys_options_types`, `sys_options_categories`, `sys_options` USING `sys_options_types`, `sys_options_categories`, `sys_options` WHERE `sys_options_types`.`id`=`sys_options_categories`.`type_id` AND `sys_options_categories`.`id`=`sys_options`.`category_id` AND `sys_options_types`.`name`=@sName; 19 21 20 22 … … 22 24 23 25 24 DELETE FROM `sys_objects_cmts` WHERE `ObjectName`= '[name]'LIMIT 1;25 DELETE FROM `sys_objects_vote` WHERE `ObjectName`= '[name]'LIMIT 1;26 DELETE FROM `sys_objects_tag` WHERE `ObjectName`= '[name]'LIMIT 1;27 DELETE FROM `sys_objects_categories` WHERE `ObjectName`= '[name]'LIMIT 1;28 DELETE FROM `sys_objects_search` WHERE `ObjectName`= '[name]'LIMIT 1;29 DELETE FROM `sys_objects_views` WHERE `name`= '[name]'LIMIT 1;30 DELETE FROM `sys_objects_actions` WHERE `Type`= '[name]';26 DELETE FROM `sys_objects_cmts` WHERE `ObjectName`=@sName LIMIT 1; 27 DELETE FROM `sys_objects_vote` WHERE `ObjectName`=@sName LIMIT 1; 28 DELETE FROM `sys_objects_tag` WHERE `ObjectName`=@sName LIMIT 1; 29 DELETE FROM `sys_objects_categories` WHERE `ObjectName`=@sName LIMIT 1; 30 DELETE FROM `sys_objects_search` WHERE `ObjectName`=@sName LIMIT 1; 31 DELETE FROM `sys_objects_views` WHERE `name`=@sName LIMIT 1; 32 DELETE FROM `sys_objects_actions` WHERE `Type`=@sName; 31 33 32 34 … … 37 39 38 40 39 DELETE FROM `sys_cron_jobs` WHERE `name`= '[name]';41 DELETE FROM `sys_cron_jobs` WHERE `name`=@sName; -
trunk/modules/boonex/articles/install/sql/enable.sql
r15751 r15755 1 SET @sName = 'bx_articles'; 2 1 3 -- 2 4 -- Studio page and widget. 3 5 -- 4 SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`= '[name]'LIMIT 1);6 SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`=@sName LIMIT 1); 5 7 UPDATE `sys_std_widgets` SET `status`='1' WHERE `page_id`=@iPageId LIMIT 1; 6 8 7 9 SET @iTMOrder = (SELECT MAX(`Order`) FROM `sys_menu_top` WHERE `Parent`='0'); 8 10 INSERT INTO `sys_menu_top` (`Parent`, `Name`, `Caption`, `Link`, `Order`, `Visible`, `Target`, `Onclick`, `Check`, `Editable`, `Deletable`, `Active`, `Type`, `Picture`, `BQuickLink`, `Statistics`) VALUES 9 (0, 'Articles', '_articles_top_menu_item', 'modules/?r= [uri]/index/|modules/?r=articles/', @iTMOrder+1, 'non,memb', '', '', '', 1, 1, 1, 'top', 'modules/[path]|top_menu_icon.png', 0, '');11 (0, 'Articles', '_articles_top_menu_item', 'modules/?r=articles/index/|modules/?r=articles/', @iTMOrder+1, 'non,memb', '', '', '', 1, 1, 1, 'top', 'modules/boonex/articles/|top_menu_icon.png', 0, ''); 10 12 11 13 SET @iTMParentId = LAST_INSERT_ID( ); 12 14 INSERT INTO `sys_menu_top` (`Parent`, `Name`, `Caption`, `Link`, `Order`, `Visible`, `Target`, `Onclick`, `Check`, `Editable`, `Deletable`, `Active`, `Type`, `Picture`, `BQuickLink`, `Statistics`) VALUES 13 (@iTMParentId, 'ArticlesHome', '_articles_home_top_menu_sitem', 'modules/?r= [uri]/index/', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),14 (@iTMParentId, 'ArticlesArchive', '_articles_archive_top_menu_sitem', 'modules/?r= [uri]/archive/', 1, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),15 (@iTMParentId, 'ArticlesTop', '_articles_top_top_menu_sitem', 'modules/?r= [uri]/top/', 2, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),16 (@iTMParentId, 'ArticlesPopular', '_articles_popular_top_menu_sitem', 'modules/?r= [uri]/popular/', 3, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),17 (@iTMParentId, 'ArticlesFeatured', '_articles_featured_top_menu_sitem', 'modules/?r= [uri]/featured/', 4, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),18 (@iTMParentId, 'ArticlesTags', '_articles_tags_top_menu_sitem', 'modules/?r= [uri]/tags/', 5, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),19 (@iTMParentId, 'ArticlesCategories', '_articles_categories_top_menu_sitem', 'modules/?r= [uri]/categories/', 6, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),20 (@iTMParentId, 'ArticlesCalendar', '_articles_calendar_top_menu_sitem', 'modules/?r= [uri]/calendar/', 7, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),21 (@iTMParentId, 'ArticlesSearch', '_articles_search_top_menu_sitem', 'searchKeyword.php?type=[name]', 8, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''),22 (0, '[db_prefix] _view', '_articles_view_top_menu_sitem', 'modules/?r=[uri]/view/', 0, 'non,memb', '', '', '', 1, 1, 1, 'system', 'modules/[path]|top_menu_icon.png', 0, '');15 (@iTMParentId, 'ArticlesHome', '_articles_home_top_menu_sitem', 'modules/?r=articles/index/', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 16 (@iTMParentId, 'ArticlesArchive', '_articles_archive_top_menu_sitem', 'modules/?r=articles/archive/', 1, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 17 (@iTMParentId, 'ArticlesTop', '_articles_top_top_menu_sitem', 'modules/?r=articles/top/', 2, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 18 (@iTMParentId, 'ArticlesPopular', '_articles_popular_top_menu_sitem', 'modules/?r=articles/popular/', 3, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 19 (@iTMParentId, 'ArticlesFeatured', '_articles_featured_top_menu_sitem', 'modules/?r=articles/featured/', 4, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 20 (@iTMParentId, 'ArticlesTags', '_articles_tags_top_menu_sitem', 'modules/?r=articles/tags/', 5, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 21 (@iTMParentId, 'ArticlesCategories', '_articles_categories_top_menu_sitem', 'modules/?r=articles/categories/', 6, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 22 (@iTMParentId, 'ArticlesCalendar', '_articles_calendar_top_menu_sitem', 'modules/?r=articles/calendar/', 7, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 23 (@iTMParentId, 'ArticlesSearch', '_articles_search_top_menu_sitem', CONCAT('searchKeyword.php?type=', @sName), 8, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 24 (0, '[db_prefix]view', '_articles_view_top_menu_sitem', 'modules/?r=articles/view/', 0, 'non,memb', '', '', '', 1, 1, 1, 'system', 'modules/boonex/articles/|top_menu_icon.png', 0, ''); 23 25 24 26 INSERT INTO `sys_menu_member`(`Caption`, `Name`, `Icon`, `Link`, `Script`, `Eval`, `Order`, `Active`, `Editable`, `Deletable`, `Target`, `Position`, `Type`) VALUES 25 ('_articles_ext_menu_item', 'Articles', '', 'modules/?r= [uri]/', '', '', 6, '1', 0, 0, '', 'bottom', 'link');27 ('_articles_ext_menu_item', 'Articles', '', 'modules/?r=articles/', '', '', 6, '1', 0, 0, '', 'bottom', 'link'); 26 28 27 29 … … 34 36 SET @iPCOrder = (SELECT MAX(`Order`) FROM `sys_page_compose` WHERE `Page`='index' AND `Column`='1'); 35 37 INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES 36 ('index', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 1, @iPCOrder+1, 'PHP', 'return BxDolService::call(\' [uri]\', \'featured_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0),37 ('index', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 1, @iPCOrder+2, 'PHP', 'return BxDolService::call(\' [uri]\', \'archive_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0),38 ('member', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 2, 3, 'PHP', 'return BxDolService::call(\' [uri]\', \'featured_block_member\', array(0, 0, false));', 1, 66, 'memb', 0),39 ('member', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 2, 4, 'PHP', 'return BxDolService::call(\' [uri]\', \'archive_block_member\', array(0, 0, false));', 1, 66, 'memb', 0),38 ('index', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 1, @iPCOrder+1, 'PHP', 'return BxDolService::call(\'articles\', \'featured_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0), 39 ('index', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 1, @iPCOrder+2, 'PHP', 'return BxDolService::call(\'articles\', \'archive_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0), 40 ('member', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 2, 3, 'PHP', 'return BxDolService::call(\'articles\', \'featured_block_member\', array(0, 0, false));', 1, 66, 'memb', 0), 41 ('member', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 2, 4, 'PHP', 'return BxDolService::call(\'articles\', \'archive_block_member\', array(0, 0, false));', 1, 66, 'memb', 0), 40 42 ('articles_single', '998px', 'Articles main content', '_articles_bcaption_view_main', 1, 0, 'Content', '', 1, 66, 'non,memb', 0), 41 43 ('articles_single', '998px', 'Articles comments', '_articles_bcaption_view_comment', 1, 1, 'Comment', '', 1, 66, 'non,memb', 0), … … 48 50 SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group`='modules'); 49 51 INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 50 ('modules', '[name]', '_articles_adm_stg_cpt_type', 'modules/[path]|std-mi.png', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1));52 ('modules', @sName, '_articles_adm_stg_cpt_type', 'modules/boonex/articles/|std-mi.png', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1)); 51 53 SET @iTypeId = LAST_INSERT_ID(); 52 54 53 55 INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` ) 54 VALUES (@iTypeId, '[name]_general', '_articles_adm_stg_cpt_category_general', 1);56 VALUES (@iTypeId, CONCAT(@sName, '_general'), '_articles_adm_stg_cpt_category_general', 1); 55 57 SET @iCategoryId = LAST_INSERT_ID(); 56 58 … … 82 84 83 85 84 INSERT INTO `sys_permalinks`(`standard`, `permalink`, `check`) VALUES('modules/?r= [uri]/', 'm/[uri]/', 'permalinks_module_articles');86 INSERT INTO `sys_permalinks`(`standard`, `permalink`, `check`) VALUES('modules/?r=articles/', 'm/articles/', 'permalinks_module_articles'); 85 87 86 88 87 89 INSERT INTO `sys_objects_cmts` (`ObjectName`, `TableCmts`, `TableTrack`, `AllowTags`, `Nl2br`, `SecToEdit`, `PerView`, `IsRatable`, `ViewingThreshold`, `AnimationEffect`, `AnimationSpeed`, `IsOn`, `IsMood`, `RootStylePrefix`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES 88 ( '[name]', '[db_prefix]comments', '[db_prefix]comments_track', 0, 1, 90, 10, 1, -3, 'slide', 2000, 1, 0, 'cmt', '[db_prefix]entries', 'id', 'cmts_count', 'BxArlCmts', 'modules/[path]classes/[class_prefix]Cmts.php');90 (@sName, 'bx_arl_comments', 'bx_arl_comments_track', 0, 1, 90, 10, 1, -3, 'slide', 2000, 1, 0, 'cmt', 'bx_arl_entries', 'id', 'cmts_count', 'BxArlCmts', 'modules/boonex/articles/classes/BxArlCmts.php'); 89 91 90 92 INSERT INTO `sys_objects_vote` (`ObjectName`, `TableRating`, `TableTrack`, `RowPrefix`, `MaxVotes`, `PostName`, `IsDuplicate`, `IsOn`, `className`, `classFile`, `TriggerTable`, `TriggerFieldRate`, `TriggerFieldRateCount`, `TriggerFieldId`, `OverrideClassName`, `OverrideClassFile`) VALUES 91 ( '[name]', '[db_prefix]voting', '[db_prefix]voting_track', 'arl_', 5, 'vote_send_result', 'BX_PERIOD_PER_VOTE', 1, '', '', '[db_prefix]entries', 'rate', 'rate_count', 'id', '[class_prefix]Voting', 'modules/[path]classes/[class_prefix]Voting.php');93 (@sName, 'bx_arl_voting', 'bx_arl_voting_track', 'arl_', 5, 'vote_send_result', 'BX_PERIOD_PER_VOTE', 1, '', '', 'bx_arl_entries', 'rate', 'rate_count', 'id', 'BxArlVoting', 'modules/boonex/articles/classes/BxArlVoting.php'); 92 94 93 95 INSERT INTO `sys_objects_tag` (`ObjectName`, `Query`, `PermalinkParam`, `EnabledPermalink`, `DisabledPermalink`, `LangKey`) VALUES 94 ( '[name]', 'SELECT `tags` FROM `[db_prefix]entries` WHERE `id`={iID} AND `status`=0', 'permalinks_module_articles', 'm/[uri]/tag/{tag}', 'modules/?r=[uri]/tag/{tag}', '_articles_lcaption_tags');96 (@sName, 'SELECT `tags` FROM `bx_arl_entries` WHERE `id`={iID} AND `status`=0', 'permalinks_module_articles', 'm/articles/tag/{tag}', 'modules/?r=articles/tag/{tag}', '_articles_lcaption_tags'); 95 97 96 98 INSERT INTO `sys_objects_categories` (`ObjectName`, `Query`, `PermalinkParam`, `EnabledPermalink`, `DisabledPermalink`, `LangKey`) VALUES 97 ( '[name]', 'SELECT `categories` FROM `[db_prefix]entries` WHERE `id`=''{iID}'' AND `status`=''0''', 'permalinks_module_articles', 'm/[uri]/category/{tag}', 'modules/?r=[uri]/category/{tag}', '_articles_lcaption_categories');99 (@sName, 'SELECT `categories` FROM `bx_arl_entries` WHERE `id`=''{iID}'' AND `status`=''0''', 'permalinks_module_articles', 'm/articles/category/{tag}', 'modules/?r=articles/category/{tag}', '_articles_lcaption_categories'); 98 100 99 101 INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `ClassName`, `ClassPath`) VALUES 100 ( '[name]', '_articles_lcaption_search_object', '[class_prefix]SearchResult', 'modules/[path]classes/[class_prefix]SearchResult.php');102 (@sName, '_articles_lcaption_search_object', 'BxArlSearchResult', 'modules/boonex/articles/classes/BxArlSearchResult.php'); 101 103 102 104 INSERT INTO `sys_objects_views`(`name`, `table_track`, `period`, `trigger_table`, `trigger_field_id`, `trigger_field_views`, `is_on`) VALUES 103 ( '[name]', '[db_prefix]views_track', 86400, '[db_prefix]entries', 'id', 'view_count', 1);105 (@sName, 'bx_arl_views_track', 86400, 'bx_arl_entries', 'id', 'view_count', 1); 104 106 105 107 INSERT INTO `sys_objects_actions`(`Caption`, `Icon`, `Url`, `Script`, `Eval`, `Order`, `Type`, `bDisplayInSubMenuHeader`) VALUES 106 ('{sbs_articles_title}', 'action_subscribe.png', '', '{sbs_articles_script}', '', 1, '[name]', 0),107 ('{del_articles_title}', 'action_block.png', '', '{del_articles_script}', '', 2, '[name]', 0);108 ('{sbs_articles_title}', 'action_subscribe.png', '', '{sbs_articles_script}', '', 1, @sName, 0), 109 ('{del_articles_title}', 'action_block.png', '', '{del_articles_script}', '', 2, @sName, 0); 108 110 109 111 … … 122 124 123 125 INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `eval`) VALUES 124 ( '[name]', '*/5 * * * *', '[class_prefix]Cron', 'modules/[path]classes/[class_prefix]Cron.php', '');126 (@sName, '*/5 * * * *', 'BxArlCron', 'modules/boonex/articles/classes/BxArlCron.php', ''); -
trunk/modules/boonex/articles/install/sql/install.sql
r15751 r15755 1 SET @sName = 'bx_articles'; 2 3 1 4 -- 2 5 -- Studio page and widget. 3 6 -- 4 7 INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES 5 (3, '[name]', '_articles_adm_page_cpt', '_articles_adm_page_cpt', 'modules/[path]|std-pi.png');8 (3, @sName, '_articles_adm_page_cpt', '_articles_adm_page_cpt', 'modules/boonex/articles/|std-pi.png'); 6 9 SET @iPageId = LAST_INSERT_ID(); 7 10 … … 9 12 SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id`=@iParentPageId); 10 13 INSERT INTO `sys_std_widgets`(`page_id`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `status`) VALUES 11 (@iPageId, CONCAT('{url_studio}module.php?name=', '[name]'), '', 'modules/[path]|std-wi.png', '_articles_adm_wgt_cpt', '', '', 2);14 (@iPageId, CONCAT('{url_studio}module.php?name=', @sName), '', 'modules/boonex/articles/|std-wi.png', '_articles_adm_wgt_cpt', '', '', 2); 12 15 INSERT INTO `sys_std_pages_widgets`(`page_id`, `widget_id`, `order`) VALUES 13 16 (@iParentPageId, LAST_INSERT_ID(), IF(NOT ISNULL(@iParentPageOrder), @iParentPageOrder + 1, 1)); … … 15 18 16 19 -- 17 -- Table structure for table ` [db_prefix]entries`20 -- Table structure for table `bx_arl_entries` 18 21 -- 19 CREATE TABLE IF NOT EXISTS ` [db_prefix]entries` (22 CREATE TABLE IF NOT EXISTS `bx_arl_entries` ( 20 23 `id` int(11) unsigned NOT NULL auto_increment, 21 24 `author_id` int(11) unsigned NOT NULL default '0', … … 46 49 47 50 -- 48 -- Table structure for table ` [db_prefix]comments`51 -- Table structure for table `bx_arl_comments` 49 52 -- 50 53 51 CREATE TABLE IF NOT EXISTS ` [db_prefix]comments` (54 CREATE TABLE IF NOT EXISTS `bx_arl_comments` ( 52 55 `cmt_id` int(11) NOT NULL auto_increment, 53 56 `cmt_parent_id` int(11) NOT NULL default '0', … … 65 68 66 69 -- 67 -- Table structure for table ` [db_prefix]comments_track`70 -- Table structure for table `bx_arl_comments_track` 68 71 -- 69 72 70 CREATE TABLE IF NOT EXISTS ` [db_prefix]comments_track` (73 CREATE TABLE IF NOT EXISTS `bx_arl_comments_track` ( 71 74 `cmt_system_id` int(11) NOT NULL default '0', 72 75 `cmt_id` int(11) NOT NULL default '0', … … 79 82 80 83 -- 81 -- Table structure for table ` [db_prefix]voting`84 -- Table structure for table `bx_arl_voting` 82 85 -- 83 CREATE TABLE ` [db_prefix]voting` (86 CREATE TABLE `bx_arl_voting` ( 84 87 `arl_id` bigint(8) NOT NULL default '0', 85 88 `arl_rating_count` int(11) NOT NULL default '0', … … 89 92 90 93 -- 91 -- Table structure for table ` [db_prefix]voting_track`94 -- Table structure for table `bx_arl_voting_track` 92 95 -- 93 CREATE TABLE ` [db_prefix]voting_track` (96 CREATE TABLE `bx_arl_voting_track` ( 94 97 `arl_id` bigint(8) NOT NULL default '0', 95 98 `arl_ip` varchar(20) default NULL, … … 99 102 100 103 -- 101 -- Table structure for table ` [db_prefix]views_track`104 -- Table structure for table `bx_arl_views_track` 102 105 -- 103 CREATE TABLE IF NOT EXISTS ` [db_prefix]views_track` (106 CREATE TABLE IF NOT EXISTS `bx_arl_views_track` ( 104 107 `id` int(10) unsigned NOT NULL, 105 108 `viewer` int(10) unsigned NOT NULL, … … 111 114 112 115 INSERT INTO `sys_categories` (`Category`, `ID`, `Type`, `Owner`, `Status`) VALUES 113 ('Default', '0', '[name]', '0', 'active'),114 ('BoonEx Products', '0', '[name]', '0', 'active'),115 ('Some Useful Info', '0', '[name]', '0', 'active');116 ('Default', '0', @sName, '0', 'active'), 117 ('BoonEx Products', '0', @sName, '0', 'active'), 118 ('Some Useful Info', '0', @sName, '0', 'active'); 116 119 117 120 118 121 INSERT INTO `sys_sbs_types`(`unit`, `action`, `template`, `params`) VALUES 119 ( '[name]', '', '', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'),120 ( '[name]', 'commentPost', 't_sbsArticlesComments', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'),121 ( '[name]', 'rate', 't_sbsArticlesRates', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));');122 (@sName, '', '', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'), 123 (@sName, 'commentPost', 't_sbsArticlesComments', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'), 124 (@sName, 'rate', 't_sbsArticlesRates', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'); -
trunk/modules/boonex/articles/install/sql/uninstall.sql
r15751 r15755 1 SET @sName = 'bx_articles'; 2 1 3 -- 2 4 -- Studio page and widget. … … 4 6 DELETE FROM `tp`, `tw`, `tpw` 5 7 USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw` 6 WHERE `tp`.`id`=`tw`.`page_id` AND `tw`.`id`=`tpw`.`widget_id` AND `tp`.`name`= '[name]';8 WHERE `tp`.`id`=`tw`.`page_id` AND `tw`.`id`=`tpw`.`widget_id` AND `tp`.`name`=@sName; 7 9 8 DROP TABLE IF EXISTS ` [db_prefix]entries`;9 DROP TABLE IF EXISTS ` [db_prefix]comments`;10 DROP TABLE IF EXISTS ` [db_prefix]comments_track`;11 DROP TABLE IF EXISTS ` [db_prefix]voting`;12 DROP TABLE IF EXISTS ` [db_prefix]voting_track`;13 DROP TABLE IF EXISTS ` [db_prefix]views_track`;10 DROP TABLE IF EXISTS `bx_arl_entries`; 11 DROP TABLE IF EXISTS `bx_arl_comments`; 12 DROP TABLE IF EXISTS `bx_arl_comments_track`; 13 DROP TABLE IF EXISTS `bx_arl_voting`; 14 DROP TABLE IF EXISTS `bx_arl_voting_track`; 15 DROP TABLE IF EXISTS `bx_arl_views_track`; 14 16 15 17 16 DELETE FROM `sys_categories` WHERE `Type` = '[name]';18 DELETE FROM `sys_categories` WHERE `Type`=@sName; 17 19 18 20 19 DELETE FROM `sys_sbs_entries` USING `sys_sbs_types`, `sys_sbs_entries` WHERE `sys_sbs_types`.`id`=`sys_sbs_entries`.`subscription_id` AND `sys_sbs_types`.`unit`= '[name]';20 DELETE FROM `sys_sbs_types` WHERE `unit`= '[name]';21 DELETE FROM `sys_sbs_entries` USING `sys_sbs_types`, `sys_sbs_entries` WHERE `sys_sbs_types`.`id`=`sys_sbs_entries`.`subscription_id` AND `sys_sbs_types`.`unit`=@sName; 22 DELETE FROM `sys_sbs_types` WHERE `unit`=@sName;
Note: See TracChangeset
for help on using the changeset viewer.