umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.4k stars 2.66k forks source link

The migration plan does not support migrating from state "6822cdca-1dc4-4983-b189-9c45314e8747" #15585

Closed bjarnef closed 7 months ago

bjarnef commented 7 months ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.0.3

Bug summary

I have migrated an existing project from Umbraco v8 -> v10 -> 12 -> v13 which seem to work.

I cloned an clean Umbraco Cloud project on v13.0.3 and changed connection string to migrated database, but when I start application I get this error:

-> Umbraco.Cms.Core.Exceptions.BootFailedException: The migration plan does not support migrating from state "6822cdca-1dc4-4983-b189-9c45314e8747".

-> System.InvalidOperationException: The migration plan does not support migrating from state "6822cdca-1dc4-4983-b189-9c45314e8747".
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlan.ThrowOnUnknownInitialState(String state)
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.RunMigrationPlan(MigrationPlan plan, String fromState)
at Umbraco.Cms.Infrastructure.Migrations.MigrationPlanExecutor.ExecutePlan(MigrationPlan plan, String fromState)
at Umbraco.Cms.Infrastructure.Migrations.Upgrade.Upgrader.Execute(IMigrationPlanExecutor migrationPlanExecutor, ICoreScopeProvider scopeProvider, IKeyValueService keyValueService)
at Umbraco.Cms.Infrastructure.Install.PackageMigrationRunner.RunPackagePlans(IEnumerable`1 plansToRun)
at Umbraco.Cms.Infrastructure.Install.UnattendedUpgrader.HandleAsync(RuntimeUnattendedUpgradeNotification notification, CancellationToken cancellationToken)

image

It seems to be related to Umbraco Forms migration, but not sure if is related to this: https://github.com/umbraco/Umbraco-CMS/issues/14992

The strange this is the original site doesn't use Umbraco Forms.

image

Specifics

No response

Steps to reproduce

Expected result / actual result

No response

github-actions[bot] commented 7 months ago

Hi there @bjarnef!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

bjarnef commented 7 months ago

I deleted the Umbraco.Core.Upgrader.State+UmbracoForms record in umbracoKeyValue table and restarted application. Now it is running.

I noticed some of the values contain guid wrapped in curly brackets, while others not.. is this expected?

image

bjarnef commented 7 months ago

Now I guess this error accessing Forms section though.

image

@AndyButland have you seen this before?

AndyButland commented 7 months ago

I noticed some of the values contain guid wrapped in curly brackets, while others not.. is this expected?

This doesn't matter - these values can actually be any strings, and the differences in syntax are just different conventions that packages have adopted.

I can see you are on the latest migration now, but seem to be missing some updates.

It could be related to the route you took. When Forms 10 came out, we took the opportunity to rationalise the migration plan. This was partly as it seemed necessary due to the introduction of SQLite, and partly a misunderstanding that this would be aligning with what the CMS was doing. As such, we asked people migrating from 10 to be either on the last version of 8 or 9. My guess is you have started from an earlier version of 8.

At this point it's probably easiest to run some scripts to add the missing database schema.

I've attached a file here which I think will have the schema updates for what you are missing - effectively what came in 8.11/9.3, 8.10/9.4 and 8.13/9.5.

Forms 8 and 9 migrations.zip

bjarnef commented 7 months ago

@AndyButland no, we upgraded to latest v8 (or actually the production database I started from at that time was on 8.18.7, but theere shouldn't be db updates from 8.18.7 -> 8.18.12

Then I started migration on a clean latest v10.

AndyButland commented 7 months ago

Hmm... then I'm not sure then I'm afraid. The UFUserSecurity.EditEntries field was introduced in 8.11, so it's a bit odd that you don't have it in your database.

elit0451 commented 7 months ago

Hi @bjarnef 👋

Thanks for reaching out! If your issue is resolved, shall we close this ticket? 🙂

bjarnef commented 7 months ago

Hi @elit0451

Yes, it seems the project actually had installed Umbraco Forms in the old v8 database, but didn't use Forms.

Anyway since the content is migrated to Umbraco Cloud at there is no forms references, I think we can close this one for now.