YESWEB数据库更改APPID脚本


YESWEB开发数据库中更改APPID脚本

declare @oldAPPID varchar(50)
declare @newAPPID varchar(50)

set @oldAPPID='APP0004'
set @newAPPID='APP_PCWEB_005'

/*
select * from sys_microApps
select * from sys_microApps_Routers order by RouteID
select * from sys_microApps_Routers_Authorize
select * from sys_microApps_Routers_Authorize_URLs
select * from sys_menu
select * from base_Authorize
select * from base_DataSNDetail
*/
/*
select  _appid=@newAPPID,* from sys_microApps where appid=@oldAPPID
select _appid=@newAPPID,_RouteID=@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)),* from sys_microApps_Routers where appid=@oldAPPID
select _appid=@newAPPID,_RouteID=@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)),_AuthorizeID=@newAPPID+substring(AuthorizeID,len(@oldAPPID)+1,len(AuthorizeID)),* from sys_microApps_Routers_Authorize where appid=@oldAPPID
select _appid=@newAPPID,_RouteID=@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)),AuthorizeID=@newAPPID+substring(AuthorizeID,len(@oldAPPID)+1,len(AuthorizeID)),* from sys_microApps_Routers_Authorize_URLs where appid=@oldAPPID
select _RouteID =@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)),* from sys_menu where RouteID like @oldAPPID+'%'
select _ItemID =@newAPPID+substring(ItemID,len(@oldAPPID)+1,len(ItemID)),* from base_Authorize where ItemID like @oldAPPID+'%'

*/


update sys_microApps set appid=@newAPPID where appid=@oldAPPID
update sys_microApps_Routers set appid=@newAPPID,RouteID=@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)) where appid=@oldAPPID
update sys_microApps_Routers_Authorize set appid=@newAPPID,RouteID=@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)),AuthorizeID=@newAPPID+substring(AuthorizeID,len(@oldAPPID)+1,len(AuthorizeID)) where appid=@oldAPPID
update sys_microApps_Routers_Authorize_URLs set appid=@newAPPID,RouteID=@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)),AuthorizeID=@newAPPID+substring(AuthorizeID,len(@oldAPPID)+1,len(AuthorizeID)) where appid=@oldAPPID
update sys_menu set RouteID =@newAPPID+substring(RouteID,len(@oldAPPID)+1,len(RouteID)) where RouteID like @oldAPPID+'%'
update base_Authorize set ItemID =@newAPPID+substring(ItemID,len(@oldAPPID)+1,len(ItemID)) where ItemID like @oldAPPID+'%'
update base_DataSNDetail set Seed =@newAPPID+substring(Seed,len(@oldAPPID)+1,len(Seed)) where Seed like @oldAPPID+'%'
GarsonZhang www.yesdotnet.com

 

版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
YES开发框架
上一篇:AgGrid 选中第一行
下一篇:debugger浏览器不会触发断点
评论列表

发表评论

评论内容
昵称:
关联文章

YESWEB数据库更改APPID脚本
YESWEB开发框架API无法生成迁移脚本
基础字典管理功能开发-表结构设计,模型更新和数据库迁移脚本生成
YESWEB数据库模型数据库补丁排除特定表
初始化配置-数据库配置
YESWEB业务模块中指定系统表
YESWEB第三方业务模块数据库配置
省市区数据库
记一次数据库查询优化记录
SQLServer数据库备份 [实践]
yesweb-ajax使用
yesweb-libs安装和简介
YESWEB接口日志记录
C# 数据库连接字符串Microsoft.Data.Sqlite数据库连接
YESWEB开发框架 CLI使用
yesweb-libs/utils介绍
YESWEB 开发框架 路由配置文件 作用原理
批处理nuget上传包脚本
YESWEB开发环境运行项目
SQL Server 数据库安全之角色

联系我们
联系电话:15090125178(微信同号)
电子邮箱:garson_zhang@163.com
站长微信二维码
微信二维码