Hi,
I tried doing a test upgrade from 4.5.0 to 4.8.0 on my local machine (using the db backup from the live site) and I got the error below. It's in the 04.06.00.log file. Does anyone have an idea of what the problem is here?
Norman
****************************
System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'ModuleID', table 'clearcanvas.dbo.easycgi_dnn_ModuleSettings'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL)
at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions)
/* Update UseCaptcha Settings to use the Authentication Module instead of User Accounts */
/****************************************************************************************/
BEGIN
CREATE TABLE #AuthModules
(
ModuleID int,
PortalID int,
AuthModuleID int
)
-- Insert into our temp table
INSERT INTO #AuthModules (ModuleID, PortalID, AuthModuleID )
SELECT
m.ModuleID,
m.PortalID,
(SELECT ModuleID
FROM dbo.easycgi_dnn_Modules MI
INNER JOIN dbo.easycgi_dnn_ModuleDefinitions MDef ON MI.ModuleDefID = Mdef.ModuleDefID
WHERE (MI.PortalID = m.PortalID) AND (MDef.FriendlyName = 'Authentication'))
AS AuthModuleID
FROM dbo.easycgi_dnn_Modules AS m
INNER JOIN dbo.easycgi_dnn_ModuleDefinitions md ON m.ModuleDefID = md.ModuleDefID
WHERE (md.FriendlyName = N'User Accounts')
AND PortalID IS NOT NULL
UPDATE dbo.easycgi_dnn_ModuleSettings
SET ModuleID = a.AuthModuleID,
SettingName = 'DNN_UseCaptcha'
FROM dbo.easycgi_dnn_ModuleSettings s
LEFT JOIN #AuthModules a ON a.ModuleID = s.ModuleID
WHERE SettingName = 'Security_CaptchaLogin'
AND a.PortalID IS NOT NULL
-- Drop temp table
DROP TABLE #AuthModules
END