1.如果安装了CISS.SideMenu,需要先修复SideMenu的bug
2.修改05.02.01.SqlDataProvider 文件,这里有多处修改的地方:
1)修正PortalLanguages,需要在“CREATE PROCEDURE {databaseOwner}{objectQualifier}UpgradeDefaultLanguages ”这句之前,插入下面的代码:
/* ***** Object: Table [dbo].[PortalLanguagesBackUp] Script Date: 01/11/2010 17:45:45 ***** */
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [ dbo ] . [ PortalLanguagesBackUp ] (
[ PortalLanguageID ] [ int ] IDENTITY ( 1 , 1 ) NOT NULL ,
[ PortalID ] [ int ] NOT NULL ,
[ LanguageID ] [ int ] NULL ,
[ CreatedByUserID ] [ int ] NULL ,
[ CreatedOnDate ] [ datetime ] NULL ,
[ LastModifiedByUserID ] [ int ] NULL ,
[ LastModifiedOnDate ] [ datetime ] NULL ,
CONSTRAINT [ PK_PortalLanguagesBackUp ] PRIMARY KEY CLUSTERED
(
[ PortalLanguageID ] ASC
) WITH (PAD_INDEX = OFF , IGNORE_DUP_KEY = OFF ) ON [ PRIMARY ]
) ON [ PRIMARY ]
GO
if exists ( select * from dbo.sysobjects where id = object_id (N ' {databaseOwner}[{objectQualifier}AddPortalLanguage] ' ) and OBJECTPROPERTY (id, N ' IsProcedure ' ) = 1 )
DROP PROCEDURE {databaseOwner} [ {objectQualifier}AddPortalLanguage ]
GO
CREATE PROCEDURE [ dbo ] . [ AddPortalLanguage ]
@PortalId int ,
@LanguageId int ,
@CreatedByUserID int
AS
if @LanguageId > 0
begin
INSERT INTO dbo.PortalLanguages (
PortalId,
LanguageId,
[ CreatedByUserID ] ,
[ CreatedOnDate ] ,
[ LastModifiedByUserID ] ,
[ LastModifiedOnDate ]
)
VALUES (
@PortalId ,
@LanguageId ,
@CreatedByUserID ,
getdate (),
@CreatedByUserID ,
getdate ()
)
SELECT SCOPE_IDENTITY ()
end
else
begin
INSERT INTO dbo.PortalLanguagesBackUp (
PortalId,
LanguageId,
[ CreatedByUserID ] ,
[ CreatedOnDate ] ,
[ LastModifiedByUserID ] ,
[ LastModifiedOnDate ]
)
VALUES (
@PortalId ,
@LanguageId ,
@CreatedByUserID ,
getdate (),
@CreatedByUserID ,
getdate ()
)
SELECT SCOPE_IDENTITY ()
end
GO
2)在05.02.01.SqlDataProvider 文件的末尾增加下面的代码:
/* update AddDesktopModulePermission */
/* ******************************** */
GO
/* ***** Object: Table [dbo].[DesktopModulePermission] Script Date: 01/11/2010 13:46:38 ***** */
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/* ***** Object: Table [dbo].[DesktopModulePermissionBackUp] Script Date: 01/11/2010 17:46:25 ***** */
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [ dbo ] . [ DesktopModulePermissionBackUp ] (
[ DesktopModulePermissionID ] [ int ] IDENTITY ( 1 , 1 ) NOT NULL ,
[ PortalDesktopModuleID ] [ int ] NOT NULL ,
[ PermissionID ] [ int ] NOT NULL ,
[ AllowAccess ] [ bit ] NOT NULL ,
[ RoleID ] [ int ] NULL ,
[ UserID ] [ int ] NULL ,
[ CreatedByUserID ] [ int ] NULL ,
[ CreatedOnDate ] [ datetime ] NULL ,
[ LastModifiedByUserID ] [ int ] NULL ,
[ LastModifiedOnDate ] [ datetime ] NULL ,
CONSTRAINT [ PK_DesktopModulePermissionBackUp ] PRIMARY KEY CLUSTERED
(
[ DesktopModulePermissionID ] ASC
) WITH (PAD_INDEX = OFF , IGNORE_DUP_KEY = OFF ) ON [ PRIMARY ]
) ON [ PRIMARY ]
GO
if exists ( select * from dbo.sysobjects where id = object_id (N ' {databaseOwner}[{objectQualifier}AddDesktopModulePermission] ' ) and OBJECTPROPERTY (id, N ' IsProcedure ' ) = 1 )
DROP PROCEDURE {databaseOwner} [ {objectQualifier}AddDesktopModulePermission ]
GO
CREATE PROCEDURE [ dbo ] . [ AddDesktopModulePermission ]
@PortalDesktopModuleID int ,
@PermissionID int ,
@RoleID int ,
@AllowAccess bit ,
@UserID int ,
@CreatedByUserID int
AS
declare @aa int ;
-- set @aa = 0;
select @aa = count ( * ) from DesktopModulePermission
where PortalDesktopModuleID = @PortalDesktopModuleID
and [ PermissionID ] = @PermissionID
and [ RoleID ] = @RoleID
and ( [ UserID ] = @UserID or UserID is null )
-- select @aa;
if @aa < 1
begin
INSERT INTO dbo.DesktopModulePermission (
[ PortalDesktopModuleID ] ,
[ PermissionID ] ,
[ RoleID ] ,
[ AllowAccess ] ,
[ UserID ] ,
[ CreatedByUserID ] ,
[ CreatedOnDate ] ,
[ LastModifiedByUserID ] ,
[ LastModifiedOnDate ]
) VALUES (
@PortalDesktopModuleID ,
@PermissionID ,
@RoleID ,
@AllowAccess ,
@UserID ,
@CreatedByUserID ,
getdate (),
@CreatedByUserID ,
getdate ()
)
select SCOPE_IDENTITY ()
end
else
begin
INSERT INTO dbo.DesktopModulePermissionBackUp (
[ PortalDesktopModuleID ] ,
[ PermissionID ] ,
[ RoleID ] ,
[ AllowAccess ] ,
[ UserID ] ,
[ CreatedByUserID ] ,
[ CreatedOnDate ] ,
[ LastModifiedByUserID ] ,
[ LastModifiedOnDate ]
) VALUES (
@PortalDesktopModuleID ,
@PermissionID ,
@RoleID ,
@AllowAccess ,
@UserID ,
@CreatedByUserID ,
getdate (),
@CreatedByUserID ,
getdate ()
);
select SCOPE_IDENTITY ()
end
GO
/* Delete FK_DesktopModules_Packages */
IF EXISTS ( SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID (N ' [dbo].[FK_DesktopModules_Packages] ' ) AND parent_object_id = OBJECT_ID (N ' [dbo].[DesktopModules] ' ))
ALTER TABLE [ dbo ] . [ DesktopModules ] DROP CONSTRAINT [ FK_DesktopModules_Packages ]
3.升级完成后,记得Restart Application
4.由于在升级的时候,删除了FK_DesktopModules_Packages,所以需要重新添加:
ALTER TABLE [ dbo ] . [ DesktopModules ] WITH NOCHECK ADD CONSTRAINT [ FK_DesktopModules_Packages ] FOREIGN KEY ( [ PackageID ] )
REFERENCES [ dbo ] . [ Packages ] ( [ PackageID ] )
ON UPDATE CASCADE
ON DELETE CASCADE
GO
ALTER TABLE [ dbo ] . [ DesktopModules ] CHECK CONSTRAINT [ FK_DesktopModules_Packages ]
5.删除DNN4下的HTML Module的代码:删除App_Code下的HTML目录。如果你同时安装了Survey Module,也可以一起App_Code/Survey目录.
6.由于DNN升级过程中,会自动清除部分目录和文件,所以,如果在本地升级完成后,不要直接覆盖远程目录,而是先把远程目录清空,或者转移远程目录到某个其它文件夹,然后在上传本地升级好的网站文件
待续...