Show a warning if the database is in a non-upgradable state #15692
Replies: 2 comments
-
Great idea! I've also run into this issue myself. See this forum post: https://our.umbraco.com/forum/using-umbraco-and-getting-started/108170-the-migration-plan-does-not-support-migrating-from-state |
Beta Was this translation helpful? Give feedback.
-
I really like this idea! I've run into this issue multiple times and then we have to dig through the database to figure out what the version mismatch is and why. I think some more helpful text would be super useful. Also I wish the GUIDs were somewhere easy to find that wasn't digging through the source code. When all you want to know is what a version means, it'd be great to have some easily sortable/parseable/searchable table somewhere. |
Beta Was this translation helpful? Give feedback.
-
Currently, if the database is in an non-upgradable state, e.g. the migration step GUID in umbracoKeyValue does not exist in the migration plan), then Umbraco will simply show the Umbraco installer screen and prompt an upgrade. (it will fail with an error if you click continue, but this initial screen can cause confusion)
How can the database be in an "non-upgradable" state?
Let's say you have a Umbraco 12 website, and someone accidentally connects to it's database with a v13 project and upgrades it, then you will suddenly be greeted with the upgrade screen which states you need to upgrade to your current version of v12:
In the screenshot above (taken from this forum post: https://our.umbraco.com/forum/using-umbraco-and-getting-started/113543-umbraco-12-automatic-upgrade) the website is running Umbraco 12.3.3, but the database has seemingly been upgraded to v13; and as the v12 migration plan does not contain the v13 migration steps, it simply prompts to run an upgrade (which will fail and show a migration not supported error).
This is quite confusing to the user/dev who encounters this, as the migration plan GUID shown
6158F3A3
is completely meaningless unless you have prior knowledge of how Umbraco's migration plan works.There's currently no way of knowing that
6158F3A3
correlates to a v13 migration step, unless you search the Umbraco source code.What should happen instead?
It would be much better if Umbraco could somehow check if the migration step exists in the current migration plan and, if it does not, display some kind of warning to inform the user that the database is non-upgradable.
Something like this:
![image](https://private-user-images.githubusercontent.com/17008780/303365095-b6b24a6e-2b54-495f-b312-8ffca1b76c92.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODcxNDMsIm5iZiI6MTczOTM4Njg0MywicGF0aCI6Ii8xNzAwODc4MC8zMDMzNjUwOTUtYjZiMjRhNmUtMmI1NC00OTVmLWIzMTItOGZmY2ExYjc2YzkyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE5MDA0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU0ODE2M2I5NDIxZjYxZTI3MDAyYzA2OTI3ODlhYWY3YTVkYmNkNTgyODIxN2YxOWEyZTZhMDYxYzcwNTdmZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.t2R0ETWShUSVVi_pftYPEkhGmD1JoQsyDKGTsz6irdc)
I thought I should bring this up as I have seen a few posts on our where people have encountered this situation:
Beta Was this translation helpful? Give feedback.
All reactions