Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter S 169 posts 587 karma points
    Feb 16, 2016 @ 14:51
    Peter S
    0

    SQL problem when upgrading 7.1.4 to 7.4

    I'm trying to upgrade 7.1.4 to 7.4 but am getting the error message below. I've encountered similar scenarios suggesting various hack solutions to the database but none of them does the job for me. Any idea what to do? I've struggled with this all day.

    This is the error message I get:

    2016-02-16 16:10:59,476 [7] INFO  Umbraco.Web.Install.Controllers.InstallApiController - Executing installation step: DatabaseUpgrade
    2016-02-16 16:10:59,476 [7] INFO  Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep - Running 'Upgrade' service
    2016-02-16 16:10:59,476 [7] INFO  Umbraco.Core.DatabaseContext - Database upgrade started
    2016-02-16 16:10:59,476 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Initializing database migrations
    2016-02-16 16:10:59,538 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AlterDataTypePreValueTable' to context
    2016-02-16 16:10:59,585 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddMissingForeignKeyForContentType' to context
    2016-02-16 16:10:59,601 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'RemoveCmsDocumentAliasColumn' to context
    2016-02-16 16:10:59,601 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddIndexToUmbracoNodeTable' to context
    2016-02-16 16:10:59,616 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddRelationTypeForDocumentOnDelete' to context
    2016-02-16 16:10:59,616 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'CreateCacheInstructionTable' to context
    2016-02-16 16:10:59,647 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'MigrateAndRemoveTemplateMasterColumn' to context
    2016-02-16 16:10:59,647 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'MigrateStylesheetDataToFile' to context
    2016-02-16 16:10:59,647 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'RemoveStylesheetDataAndTables' to context
    2016-02-16 16:10:59,663 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'RemoveLanguageLocaleColumn' to context
    2016-02-16 16:10:59,678 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'UpdateUniqueIdToHaveCorrectIndexType' to context
    2016-02-16 16:10:59,678 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddPublicAccessTables' to context
    2016-02-16 16:10:59,694 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'MovePublicAccessXmlDataToDb' to context
    2016-02-16 16:10:59,710 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'RemoveHelpTextColumn' to context
    2016-02-16 16:10:59,725 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddExternalLoginsTable' to context
    2016-02-16 16:10:59,741 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddUserColumns' to context
    2016-02-16 16:10:59,741 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddMigrationTable' to context
    2016-02-16 16:10:59,772 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddUniqueIdPropertyTypeColumn' to context
    2016-02-16 16:10:59,803 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddForeignKeysForLanguageAndDictionaryTables' to context
    2016-02-16 16:10:59,803 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'RemoveUmbracoLoginsTable' to context
    2016-02-16 16:10:59,835 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddServerRegistrationColumnsAndLock' to context
    2016-02-16 16:10:59,850 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'CleanUpCorruptedPublishedFlags' to context
    2016-02-16 16:10:59,850 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'UpdateUserLanguagesToIsoCode' to context
    2016-02-16 16:10:59,850 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'EnsureMigrationsTableIdentityIsCorrect' to context
    2016-02-16 16:10:59,882 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddDataDecimalColumn' to context
    2016-02-16 16:10:59,898 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddUniqueIdPropertyTypeGroupColumn' to context
    2016-02-16 16:10:59,898 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'EnsureContentTypeUniqueIdsAreConsistent' to context
    2016-02-16 16:10:59,913 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'FixListViewMediaSortOrder' to context
    2016-02-16 16:10:59,929 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'RemoveParentIdPropertyTypeGroupColumn' to context
    2016-02-16 16:10:59,929 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Added UPGRADE migration 'AddUmbracoDeployTables' to context
    2016-02-16 16:10:59,929 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Executing sql statement 1: ALTER TABLE `cmsContent` ADD FOREIGN KEY (`contentType`) REFERENCES `cmsContentType` (`nodeId`)
    
    2016-02-16 16:11:00,132 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Executing sql statement 2: DROP INDEX `IX_umbracoNodeUniqueID` ON `umbracoNode`
    
    2016-02-16 16:11:00,163 [7] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - Executing sql statement 3: CREATE TABLE `umbracoAccess` (`id` GUID NOT NULL,
    `nodeId` INTEGER NOT NULL,
    `loginNodeId` INTEGER NOT NULL,
    `noAccessNodeId` INTEGER NOT NULL,
    `createDate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updateDate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY NONCLUSTERED (`id`))
    
    2016-02-16 16:11:00,163 [7] ERROR Umbraco.Core.Persistence.UmbracoDatabase - Database exception occurred
    MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GUID NOT NULL,
    `nodeId` INTEGER NOT NULL,
    `loginNodeId` INTEGER NOT NULL,
    `no' at line 1
       at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
       at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
       at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
       at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 279
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.Execute(String sql, Object[] args)
       at Umbraco.Core.Persistence.Migrations.MigrationRunner.ExecuteMigrations(IMigrationContext context, Database database)
       at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
    2016-02-16 16:11:00,163 [7] ERROR Umbraco.Core.DatabaseContext - Database configuration failed
    Umbraco.Core.Persistence.Migrations.DataLossException: An error occurred running a schema migration but the changes could not be rolled back. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GUID NOT NULL,
    `nodeId` INTEGER NOT NULL,
    `loginNodeId` INTEGER NOT NULL,
    `no' at line 1. In some cases, it may be required that the database be restored to it's original state before running this upgrade process again. ---> MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GUID NOT NULL,
    `nodeId` INTEGER NOT NULL,
    `loginNodeId` INTEGER NOT NULL,
    `no' at line 1
       at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
       at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
       at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
       at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
       at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 279
       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0()
       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
       at Umbraco.Core.Persistence.Database.Execute(String sql, Object[] args)
       at Umbraco.Core.Persistence.Migrations.MigrationRunner.ExecuteMigrations(IMigrationContext context, Database database)
       at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
       --- End of inner exception stack trace ---
       at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
       at Umbraco.Core.DatabaseContext.UpgradeSchemaAndData(IMigrationEntryService migrationEntryService)
    2016-02-16 16:11:00,163 [7] INFO  Umbraco.Core.DatabaseContext - The database schema validation produced the following summary: 
    The following tables were found in the database, but are not in the current schema:
    seochecker_configurationissues,seochecker_notifications,seochecker_pagenotfound,seochecker_queue,seochecker_robots,seochecker_scheduledvalidation,seochecker_urlhistory,seochecker_validationissues,umbracouserlogins,cmsStylesheet,cmsStylesheetProperty,umbracoAccess,umbracoAccessRule,umbracoExternalLogin,umbracoMigration,umbracoDeployChecksum,umbracoDeployDependency
    
    The following columns were found in the database, but are not in the current schema:
    cmspropertytype,helpText,cmspropertytypegroup,parentGroupId,seochecker_configurationissues,ISSUEID,seochecker_configurationissues,ERRORCODE,seochecker_configurationissues,VALIDATORALIAS,seochecker_configurationissues,ERRORDESCRIPTION,seochecker_configurationissues,ERROR,seochecker_configurationissues,ERRORTYPE,seochecker_configurationissues,CATEGORY,seochecker_configurationissues,CRAWLDATE,seochecker_configurationissues,RESOLVEDDATE,seochecker_configurationissues,IGNORE,seochecker_notifications,ID,seochecker_notifications,NOTIFICATIONUSER,seochecker_notifications,EXECUTEEVERY,seochecker_notifications,EXECUTEDAYS,seochecker_notifications,EXECUTEHOUR,seochecker_notifications,EXECUTEMINUTE,seochecker_notifications,NEXTRUN,seochecker_pagenotfound,NOTFOUNDID,seochecker_pagenotfound,URL,seochecker_pagenotfound,DOCUMENTID,seochecker_pagenotfound,IGNORE,seochecker_pagenotfound,TIMESACCESSED,seochecker_pagenotfound,LASTTIMEACCESSED,seochecker_pagenotfound,REFERER,seochecker_pagenotfound,REDIRECTURL,seochecker_pagenotfound,CONTENTTYPE,seochecker_pagenotfound,DOMAIN,seochecker_pagenotfound,QUERYSTRING,seochecker_pagenotfound,WILDCARD,seochecker_queue,DOCUMENTID,seochecker_queue,QUEUEDDATETIME,seochecker_queue,PRIORITY,seochecker_robots,NODEID,seochecker_robots,USERAGENT,seochecker_robots,REQUESTDATETIME,seochecker_scheduledvalidation,ID,seochecker_scheduledvalidation,TASKNAME,seochecker_scheduledvalidation,NOTIFICATIONEMAILADDRESS,seochecker_scheduledvalidation,EXECUTEEVERY,seochecker_scheduledvalidation,EXECUTEDAYS,seochecker_scheduledvalidation,EXECUTEHOUR,seochecker_scheduledvalidation,EXECUTEMINUTE,seochecker_scheduledvalidation,VALIDATIONROOT,seochecker_scheduledvalidation,INCLUDECHILDREN,seochecker_scheduledvalidation,NEXTRUN,seochecker_scheduledvalidation,LASTTIMEEXECUTED,seochecker_urlhistory,URLHISTORYID,seochecker_urlhistory,NODEID,seochecker_urlhistory,PARENTID,seochecker_urlhistory,URLPART,seochecker_validationissues,ISSUEID,seochecker_validationissues,DOCUMENTID,seochecker_validationissues,ERRORCODE,seochecker_validationissues,VALIDATORALIAS,seochecker_validationissues,ERRORDESCRIPTION,seochecker_validationissues,ERROR,seochecker_validationissues,TEMPLATE,seochecker_validationissues,CATEGORY,seochecker_validationissues,VALIDATIONTYPE,seochecker_validationissues,ERRORTYPE,seochecker_validationissues,PROPERTYALIAS,seochecker_validationissues,DATATYPEID,seochecker_validationissues,CRAWLDATE,seochecker_validationissues,RESOLVEDDATE,seochecker_validationissues,IGNORE,umbracouserlogins,contextID,umbracouserlogins,userID,umbracouserlogins,timeout,cmsPropertyTypeGroup,uniqueID,cmsPropertyType,UniqueID,cmsPropertyData,dataDecimal,cmsStylesheet,nodeId,cmsStylesheet,filename,cmsStylesheet,content,cmsStylesheetProperty,nodeId,cmsStylesheetProperty,stylesheetPropertyEditor,cmsStylesheetProperty,stylesheetPropertyAlias,cmsStylesheetProperty,stylesheetPropertyValue,umbracoUser,securityStampToken,umbracoUser,failedLoginAttempts,umbracoUser,lastLockoutDate,umbracoUser,lastPasswordChangeDate,umbracoUser,lastLoginDate,umbracoServer,isMaster,umbracoAccess,id,umbracoAccess,nodeId,umbracoAccess,loginNodeId,umbracoAccess,noAccessNodeId,umbracoAccess,createDate,umbracoAccess,updateDate,umbracoAccessRule,id,umbracoAccessRule,accessId,umbracoAccessRule,ruleValue,umbracoAccessRule,ruleType,umbracoAccessRule,createDate,umbracoAccessRule,updateDate,umbracoExternalLogin,id,umbracoExternalLogin,userId,umbracoExternalLogin,loginProvider,umbracoExternalLogin,providerKey,umbracoExternalLogin,createDate,umbracoMigration,id,umbracoMigration,name,umbracoMigration,createDate,umbracoMigration,version,umbracoDeployChecksum,id,umbracoDeployChecksum,entityType,umbracoDeployChecksum,entityGuid,umbracoDeployChecksum,entityPath,umbracoDeployChecksum,localChecksum,umbracoDeployChecksum,compositeChecksum,umbracoDeployDependency,sourceId,umbracoDeployDependency,targetId,umbracoDeployDependency,mode
    
    The following indexes were found in the database, but are not in the current schema:
    IX_umbracoNode_uniqueID,IX_umbracoUserLogins_Index,IX_umbracoNodeUniqueID,IX_cmsPropertyTypeGroupUniqueID,IX_cmsPropertyTypeUniqueID,IX_umbracoAccess_nodeId,IX_umbracoAccessRule,IX_umbracoMigration,IX_umbracoDeployChecksum
    
    Please note that the constraints could not be validated because the current dataprovider is MySql.
    
    2016-02-16 16:11:00,163 [7] ERROR Umbraco.Web.Install.Controllers.InstallApiController - Installation step DatabaseUpgrade failed.
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: An error occurred running a schema migration but the changes could not be rolled back. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GUID NOT NULL,
    `nodeId` INTEGER NOT NULL,
    `loginNodeId` INTEGER NOT NULL,
    `no' at line 1. In some cases, it may be required that the database be restored to it's original state before running this upgrade process again.
     Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
       at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction)
       at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel)
    2016-02-16 16:11:00,163 [7] INFO  Umbraco.Web.Install.Controllers.InstallApiController - Step completed (took 676ms)
    2016-02-16 16:11:00,163 [7] ERROR Umbraco.Web.Install.Controllers.InstallApiController - An error occurred during installation step DatabaseUpgrade
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: An error occurred running a schema migration but the changes could not be rolled back. Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GUID NOT NULL,
    `nodeId` INTEGER NOT NULL,
    `loginNodeId` INTEGER NOT NULL,
    `no' at line 1. In some cases, it may be required that the database be restored to it's original state before running this upgrade process again.
     Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')
       at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction)
       at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel)
    
Please Sign in or register to post replies

Write your reply to:

Draft