We have moved to GitHub Issues
Created by Robert Foster 14 Sep 2015, 16:10:59 Updated by Rachel 11 Nov 2016, 15:45:00
TargetVersionSeven fails on a database from pre-7.0.0 due to missing UniqueID column (which is added at
I believe this is happening because the POCO for cmsPropertyType (
PropertyTypeDto) contains the UniqueID property and therefore any queries to the cmsPropertyType table in Umbraco 7.3.0 are going to throw an error prior to the table being upgraded.
Is it possible to move the
AddUniqueIdPropertyTypeColumn Migration higher up the chain of upgrades so the column is supported?
Stacktrace of the error:
2015-09-14 18:14:27,637 [P5948/D7/T165] ERROR Umbraco.Core.DatabaseContext - Database configuration failed
System.Data.SqlClient.SqlException (0x80131904): Invalid column name 'UniqueID'.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.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.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource
1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteDbDataReader(CommandBehavior behavior) in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 248 at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() at Umbraco.Core.Persistence.Database.<Query>d__71.MoveNext()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven.UpdateRelatedLinksData.UpdateRelatedLinksDataDo(Database database)
at Umbraco.Core.Persistence.Migrations.Syntax.Execute.Expressions.ExecuteCodeStatementExpression.Process(Database database)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.ExecuteMigrations(IMigrationContext context, Database database)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)
at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, Boolean isUpgrade)
at Umbraco.Core.DatabaseContext.UpgradeSchemaAndData(IMigrationEntryService migrationEntryService)
This has already been resolved, please test with latest nightly: http://nightly.umbraco.org/umbraco%207.3.0/
Im getting this error too using the latest nuget package
I was trying to go from 7.2.5 to 7.3
Any more info I can provide to help troubleshoot this?
hi - isn't anyone else getting this error?
Hi @shearer3000, I thought I was getting the same issue, but it turned out to be the same error message, from a different migration:
TargetVersionSixZeroOne.UpdatePropertyTypesAndGroups. Wonder if that's the case for you as well? I created U4-7220 for this.
hi Tom - do you use uSiteBuilder by chance? I noticed if i disabled that using
I managed to fix this by upgrading database to 7.2.8 and then upgrading to 7.3.1..
And also need to delete duplicate rows from tables
Hi, I'm having the same problem upgrading 7.2.4 to 7.3.3, I managed to upgrade it until 7.2.8 after that, this error is appearing I tried what @Lokesh mentioned but not luck. suggestions ? /cc @Shandem
@Claus.Jensen already fixed it.. http://issues.umbraco.org/issue/U4-7220#comment=67-24534
I did testing from version 4 to 7.3.3 which is successful.
May be something going wrong when upgrading from 7.2.4 to 7.3.3
@Lokesh it didn't work for me, what I did was use the redgate tool to sync the db schema. That was the only way I found.
Update: I just debugged a site with this problem, turns out it managed to execute code before Umbraco was properly started. The code tried to look up nodes in the database but since the database was not yet upgraded properly, the site crashed with this error. The solution was to move the code to an Umbraco ApplicationEventHandler. Another workaround I've blogged about here: https://cultiv.nl/blog/an-umbraco-database-upgrade-tip-from-the-trenches/ So: point a clean install to your existing database, run the database upgrade and then do the rest of your website upgrade.
Great advice Sebastiaan! Such an obvious thing to do yet I've never considered it and I think is something I will now do with all remote upgrades to bypass any potential interference from custom code during the database upgrade process.
Good shout from Sebastian - I'm having this problem too and it's because of a package that iterates through published content at application start up.
Assignee: Shannon Deminick
Backwards Compatible: True
Affected versions: 7.3.0, 7.3.1
Due in version: 7.3.0