pk_sf_blogs error Patching 3.7SP3 to 3.7SP4
Starting a migration of a client's website from SF3.7.2096.2 to 3.7.2136.240.
As delivered to us, the 3.72.2096 ran fine in our local environment. Proceeded to patch to 3.7.2136.240 and after quick tweaking of assemblyBindings for Telerik.Security and Telerik.Framework I now get this error from the App_Data/sitefinity.log file. (Note: This was the first error in a freshly cleaned out log. This error repeats a few times but I have only included the first instance.
Please confirm my target framework should be .NET 4.0
Any guidance would be appreciated. Thank you.
|5/12/2014 8:54:33 AM [EXCEPTION]
************************************************************************************
ID: 521ba515-bb4e-4004-937a-824720142b9a; Code: 100103; Occurrence: 1; Sequence: 2
------------------------------------------------------------------------------------
Application information:
Machine name: THEODEN
OS Version: Microsoft Windows NT 6.2.9200.0
Product Version: 3.7.2136.240
Application Path: C:\!sprojects\NorthCentralTexasCollege\trunk\src\net\SitefinityWebApp\
Debug: False
Process information:
Process ID: 8468
Process Name: WebDev.WebServer40
Request information:
Request URL: /Home.aspx
Rewrite URL: localhost:59520/Home.aspx
Url Referrer: Is Authenticated: False
Authentication Type: User: User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0
User Address: ::1
Variables:
System.Object: System.Object
System.Object: System.Object
- L0 -------------------------------------------------------------------------------
Exception Type: System.Data.SqlClient.SqlException
Message: The constraint 'pk_sf_blogs' is being referenced by table 'sf_blogs_sf_permissions', foreign key constraint 'ref_sf_blgs_sf_prmssns_sf_blgs'.
Could not drop constraint. See previous errors.
Source: .Net SqlClient Data Provider
Stack Trace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Nolics.ORMapper.DataProviders.SQLDataProvider.ExecSchemaChange(String change)
at Nolics.ORMapper.Base.OdbDataProvider.Upgrade()
at Telerik.Blogs.Data.DefaultBlogProvider.Initialize(String name, NameValueCollection config)
at Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
at Telerik.ManagerBase`1.InstantiateProvider(ProviderSettings providerSettings)
at Telerik.ManagerBase`1.InstantiateProviders(ProviderSettingsCollection configProviders)
------------------------------------------------------------------------------------
(Removing this post as it is OBE by my 3rd post).
Reverting back to keeping in the Blog Module. The issues is the database itself somehow, either permissions (which seems odd, because I can run the 3.7SP3 version just fine) or something of the like. I pointed a known good 3.7PS4 project at this database and immediately got the error again.
Just keeping folks up to date, I will be sure to post the final resolution when it is found. (I would encourage others to do the same please on their posts, otherwise these forums become a useless cesspool of incomplete gibberish).
I have gotten past this. It was simpler than I thought - though I'm still stumped why I've never seen this before in our 3.7SP3 ->SP4->Latest Version migrations.
Solution:
In this case, I simply delete the foreing keys it was complaining about. There were about 4 or 5 in the blogs. This then led to one error on the sf_events table where it was using ID as a PK, but ID was nullable. Make these changes and the Db runs in 3.7SP4. On to migration.