I am attempting my first upgrade/migration from v7 to v8. I've got over the first hurdle of not being able to login which was an easy fix but I have hit a SQL error during the upgrade process.
Can/should I attempt to manually remove this constraint in order to proceed? If I do, what are the consequences of doing so if I do?
I've manually removed the constraint and now I am faced with a new one:
The constraint 'umbracoNode_PK_structure' is being referenced by table 'umbracoNode', foreign key constraint 'umbracoNode_FK_umbracoNode_umbracoNode'. Could not drop constraint
In each of these cases is it safe to remove them and assume then run the upgrade and if they are still required they will be added back?
I've had one issue after another like the above, all related to constraints that can't be dropped. I've manually dropped them for now to try and get through the upgrade but now I've hit a new issue...
The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert the value NULL into column 'versionId', table 'dbo.cmsPropertyData'; column does not allow nulls. UPDATE fails.
I'm not quite sure why it is trying to insert nulls into the versionId to be honest. I'm starting to feel a little like I am fighting a lost cause and this migration is not really viable.
Is there anyone out there that has actually successfully migrated a v7 installation with content to v8?
Thanks Marc, I wasn't aware of that project so have tried it and used the package to fix the errors it has found but ended up back in the same position as my OP. I will see if I can clone the project and address at least that issue or flag it up in the health check and see where that leaves me.
Being able to quote for this upgrade work is at the moment very high-risk as there are so many unknowns.
{"@t":"2020-12-22T14:33:41.3633043Z","@mt":"SQL [{ContextIndex}]: {Sql}","ContextIndex":27,"Sql":"ALTER TABLE [cmsPropertyType] DROP CONSTRAINT [cmsPropertyType_PK_cmsPropertyType]","SourceContext":"Umbraco.Core.Migrations.Expressions.Delete.Expressions.DeleteForeignKeyExpression","ProcessId":19896,"ProcessName":"iisexpress","ThreadId":127,"AppDomainId":4,"AppDomainAppId":"LMW3SVC2ROOT","MachineName":"My-MACHINE","Log4NetLevel":"INFO ","HttpRequestNumber":15,"HttpRequestId":"5fa3f42e-30c0-4702-81da-52149862b042"}
I get why this can't be deleted but having checked against a new v8 database the same constraint exists but has been renamed to PK_cmsPropertyType so there is no need to drop it. As such for the next couple of errors I am simply renaming the objects to reflect the v8 naming as follows:
Still fighting with this, progress is very slow and the likelihood of this ever happening for the production site is now extremely low due to the high risk of problems down the line.
However, I do like a challenge and for now, would very much like to at least get the site working so that I can see the full extent of the damage following completion of the upgrade process.
I can now get a fair way through the upgrade, after quite some time it eventually now fails with:
Cannot insert the value NULL into column 'versionId', table 'MyDatabase.dbo.cmsPropertyData'
The question is...why is or would it be trying to insert a null value here? A missing version in the original data perhaps?
Yes, I think thete ate plenty of new constraints in V8.. In a recent migration i did i had to hunt down tje data pre migration to remove duplicates or remove/update data that would cause the null error during tje migration.
Also - have you seen this additional migrations plugin? Different to the healthcheck one?
ProWorks Umbraco 8 Migrations
Its available on nuget and circumvents a lot of the migration issues that can occur...
Aha, no Marc I've not seen that one so thanks will look at that too. I've been keeping SQL statements I've had to run at each step so that I can run through it again once I get to a stage where I can complete the process so hopefully, I can offer something back for others that might have similar issues but on less complicated sites.
7.15.6 > 8.9.1 - The constraint 'cmsPropertyType_PK_cmsPropertyType' is being referenced by table 'cmsTagRelationship'
I am attempting my first upgrade/migration from v7 to v8. I've got over the first hurdle of not being able to login which was an easy fix but I have hit a SQL error during the upgrade process.
Can/should I attempt to manually remove this constraint in order to proceed? If I do, what are the consequences of doing so if I do?
Thanks
I've manually removed the constraint and now I am faced with a new one:
In each of these cases is it safe to remove them and assume then run the upgrade and if they are still required they will be added back?
I've had one issue after another like the above, all related to constraints that can't be dropped. I've manually dropped them for now to try and get through the upgrade but now I've hit a new issue...
I'm not quite sure why it is trying to insert nulls into the versionId to be honest. I'm starting to feel a little like I am fighting a lost cause and this migration is not really viable.
Is there anyone out there that has actually successfully migrated a v7 installation with content to v8?
Hi Simon
There is a really handy pre-migration health check:
https://our.umbraco.com/packages/developer-tools/pre-migration-health-checks/
That helps you identify these kinds of problems and resolve, before you are mid-migration.
So it might be worth installing that and seeing if that helps highlight and fix some issues, that will then in turn make the migration smoother.
regards
marc
Thanks Marc, I wasn't aware of that project so have tried it and used the package to fix the errors it has found but ended up back in the same position as my OP. I will see if I can clone the project and address at least that issue or flag it up in the health check and see where that leaves me.
Being able to quote for this upgrade work is at the moment very high-risk as there are so many unknowns.
I get why this can't be deleted but having checked against a new v8 database the same constraint exists but has been renamed to
PK_cmsPropertyType
so there is no need to drop it. As such for the next couple of errors I am simply renaming the objects to reflect the v8 naming as follows:Still fighting with this, progress is very slow and the likelihood of this ever happening for the production site is now extremely low due to the high risk of problems down the line.
However, I do like a challenge and for now, would very much like to at least get the site working so that I can see the full extent of the damage following completion of the upgrade process.
I can now get a fair way through the upgrade, after quite some time it eventually now fails with:
The question is...why is or would it be trying to insert a null value here? A missing version in the original data perhaps?
Hi Simon
Yes, I think thete ate plenty of new constraints in V8.. In a recent migration i did i had to hunt down tje data pre migration to remove duplicates or remove/update data that would cause the null error during tje migration.
Also - have you seen this additional migrations plugin? Different to the healthcheck one?
ProWorks Umbraco 8 Migrations
Its available on nuget and circumvents a lot of the migration issues that can occur...
Regards
Marc
Aha, no Marc I've not seen that one so thanks will look at that too. I've been keeping SQL statements I've had to run at each step so that I can run through it again once I get to a stage where I can complete the process so hopefully, I can offer something back for others that might have similar issues but on less complicated sites.
is working on a reply...