sql 添加一个新的StickyFish模块

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql 添加一个新的StickyFish模块相关的知识,希望对你有一定的参考价值。

USE StickyFish
GO


Declare @moduleID int, @name varchar(25), @localWord varchar(25), @editWord varchar(25), @moduleType char(1), @adminLevel tinyint
set @moduleID		= 147
set @name			= 'Get Widget Code'
set @localWord		= 'GetWidgetCode'
set @editWord		= 'GetWidgetCode'
set @moduleType		= 'A'
set @adminLevel		= 1

-- **************************************** Create a record in MODULES **********************************************************************

PRINT 'insert new module into modules table...'
insert into modules 
(ModuleID,Name,LocalWord,EditWord,ModuleType,OptIn,DisplayOrder,CreatedOn,CreatedBy,ChangedOn,ChangedBy,FulfillmentHeader,FulfillmentFooter,AdminLevel,MenuItem,SystemLevel,AllModules,PointsModule,CashBackModule,CMI,CLI,networkid,FulfillmentSubject) 
values
(@moduleID,@name,@localWord,@editword,@moduleType,0,0,getdate(),6,null,null,null,null,@adminLevel,1,0,0,1,0,null,null,1,null)




-- **************************************** Create a record for every site in SITEMODULES ***************************************************

PRINT 'Add module availability to special site -1'
exec spSiteModulesPostSu	@SiteID=-1,@ModuleID=@moduleID,@UserID=6,@Assigned=1



PRINT 'Add module availability to all sites explicitly'
Declare @InsertSiteID int
Declare Sites_CURSOR cursor FAST_FORWARD						-- so FORWARD_ONLY and READ_ONLY.  Will run MUCH faster!
for
select siteid from sites WHERE networkid = 1 and inactive = 0

open Sites_CURSOR
fetch next from Sites_CURSOR into @InsertSiteID

while @@fetch_status = 0
begin

	exec spSiteModulesPostSu	@SiteID=@InsertSiteid,@ModuleID=@moduleID,@UserID=6,@Assigned=1

	fetch next from Sites_CURSOR into @InsertSiteID
end

close Sites_CURSOR
deallocate Sites_CURSOR
PRINT 'All DONE!';
GO

以上是关于sql 添加一个新的StickyFish模块的主要内容,如果未能解决你的问题,请参考以下文章

yii2.0中添加新的模块

android中怎么添加新的功能模块

SQL:向数据库表添加新的主键列

如何在Pycharm中添加新的模块

给已安装的NGINX添加新的模块

为Mvc添加新的@abp/jstree标准库.