My upgrade from v8 to 10 failed. It looks like the script got most of the way complete. I have tried to run these scripts manually, and they fail also.
SQL script applied.
90% of SQL script applied.
80% of SQL script applied.
70% of SQL script applied.
60% of SQL script applied.
50% of SQL script applied.
40% of SQL script applied.
30% of SQL script applied.
20% of SQL script applied.
10% of SQL script applied.
-- Update table [OM_PersonalizationVariant]
ALTER TABLE [OM_PersonalizationVariant]
ADD
CONSTRAINT [FK_OM_PersonalizationVariant_VariantPageTemplateID_CMS_PageTemplate]
FOREIGN KEY ([VariantPageTemplateID]) REFERENCES [CMS_PageTemplate] ([PageTemplateID]),
CONSTRAINT [FK_OM_PersonalizationVariant_VariantDocumentID_CMS_Document]
FOREIGN KEY ([VariantDocumentID]) REFERENCES [CMS_Document] ([DocumentID]);
CREATE NONCLUSTERED INDEX [IX_OM_PersonalizationVariant_VariantDocumentID]
ON [OM_PersonalizationVariant] ([VariantPageTemplateID]) ON [PRIMARY];
CREATE NONCLUSTERED INDEX [IX_OM_PersonalizationVariant_VariantPageTemplateID]
ON [OM_PersonalizationVariant] ([VariantDocumentID]) ON [PRIMARY];
Failed to run SQLscript:
-- Update table [OM_PersonalizationVariant]
ALTER TABLE [OM_PersonalizationVariant]
ADD
CONSTRAINT [FK_OM_PersonalizationVariant_VariantPageTemplateID_CMS_PageTemplate]
FOREIGN KEY ([VariantPageTemplateID]) REFERENCES [CMS_PageTemplate] ([PageTemplateID]),
CONSTRAINT [FK_OM_PersonalizationVariant_VariantDocumentID_CMS_Document]
FOREIGN KEY ([VariantDocumentID]) REFERENCES [CMS_Document] ([DocumentID]);
CREATE NONCLUSTERED INDEX [IX_OM_PersonalizationVariant_VariantDocumentID]
ON [OM_PersonalizationVariant] ([VariantPageTemplateID]) ON [PRIMARY];
CREATE NONCLUSTERED INDEX [IX_OM_PersonalizationVariant_VariantPageTemplateID]
ON [OM_PersonalizationVariant] ([VariantDocumentID]) ON [PRIMARY];
Caused exception:
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_OM_PersonalizationVariant_VariantDocumentID_CMS_Document". The conflict occurred in database "DEV_Kentico9", table "dbo.CMS_Document", column 'DocumentID'.
Message:
-- Update table [OM_PersonalizationVariant]
ALTER TABLE [OM_PersonalizationVariant]
ADD
CONSTRAINT [FK_OM_PersonalizationVariant_VariantPageTemplateID_CMS_PageTemplate]
FOREIGN KEY ([VariantPageTemplateID]) REFERENCES [CMS_PageTemplate] ([PageTemplateID]),
CONSTRAINT [FK_OM_PersonalizationVariant_VariantDocumentID_CMS_Document]
FOREIGN KEY ([VariantDocumentID]) REFERENCES [CMS_Document] ([DocumentID]);
CREATE NONCLUSTERED INDEX [IX_OM_PersonalizationVariant_VariantDocumentID]
ON [OM_PersonalizationVariant] ([VariantPageTemplateID]) ON [PRIMARY];
CREATE NONCLUSTERED INDEX [IX_OM_PersonalizationVariant_VariantPageTemplateID]
ON [OM_PersonalizationVariant] ([VariantDocumentID]) ON [PRIMARY];
Caused exception:
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_OM_PersonalizationVariant_VariantDocumentID_CMS_Document". The conflict occurred in database "DEV_Kentico9", table "dbo.CMS_Document", column 'DocumentID'.
Stack Trace:
at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, Exception ex)
at CMS.DataEngine.AbstractDataConnection.ExecuteNonQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
at Hotfix.Installer.HotfixHelper.RunSQLCommand(String text, IDataConnection connection)
at Hotfix.Installer.HotfixHelper.RunSQLScript(String fileName, String connString, String defaultUICulture, IMessageLog messageLog)
The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_OM_PersonalizationVariant_VariantDocumentID_CMS_Document". The conflict occurred in database "DEV_Kentico9", table "dbo.CMS_Document", column 'DocumentID'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 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& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at CMS.DataEngine.AbstractDataConnection.ExecuteNonQuery(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)
Running SQL script (upgrade.sql)
DLLs\Net45\Azure
DLLs\Net45\Azure
DLLs\Net45
DLLs\Net45
CMS_PROJ
CMS_PROJ\CMS
CMS_PROJ\CMS\CMSWebParts