I am having trouble upgrading one of my DNN sites from 7.4.2 to 8.0.x. I have successfully upgraded 11 of my sites to 8.0.3 (although one required some manual SQL tweaking to get it to work!), but this one has stumped me so far. The reason I mention the 11 previously successful upgrades is that all the sites are on the same cloud-based server, so I know that the environment is correct (e.g. .NET version, full trust, etc.) otherwise the other upgrades would have failed.
The basic problem is that it is this one site gets to 25% on the upgrade and then throws an error because a view can't be dropped. Here is the first SQL exception:
Cannot DROP VIEW 'dbo.vw_Portals' because it is being referenced by object 'vw_PortalsDefaultLanguage'.
Both of these views are in the other DNN sites that I've upgraded successfully, and they were obviously able to drop the view in spite of the object reference, so why has this one failed?
If I reload the page, it goes past this error, but comes up with more of the same type, such as:
Cannot DROP VIEW 'dbo.vw_UserRoles' because it is being referenced by object 'Journal_PermittedJournalIDs'.
Cannot DROP VIEW 'dbo.vw_Files' because it is being referenced by object 'vw_PublishedFiles'.
Of course, because these views cannot be dropped, and then the new views created in their place, they are having a knock-on effect, generating more errors like:
Invalid column name 'HasBeenPublished'.
I have tried manually dropping the objects that are referencing the views that the upgrade script wants to drop, but this has (so far) failed to work for me. I still have this nagging feeling that there is something else wrong though because why were these views able to be dropped and recreated for every other upgrade I've done? The only thing I can think of that makes this one site different to the others that I've upgraded is a secure server certificate. However, the upgrade doesn't run as https anyway, so I can't see that being a problem, and besides, it's a database issue, not a site issue.
Has anyone come across this, and can offer a solution?