Upgrade Episerver CMS + Find at the same time = everything blows up!
I upgraded a website from Episerver CMS 9 to CMS 11, and then I upgraded Episerver Find from 12.7.0 to 13.2.4. Locally I did this in two steps, and with the following line in episerver.framework.config the database schema was automatically updated each time:
After fixing all build errors and warnings, and even converting the production database to use UTC, it was time to let the users enjoy the newly upgraded website with all kinds of new features and bugfixes.
That did not happen. This happened!
After logging into the server to check the exception, I was met with this:
My first thought was that I had forgotten to set
updateDatabaseSchema="true" in episerver.framework.config, but I had not. Then I realized that the error message does not say the database schema is not updated, it says it's not installed.
The database schema for 'EPiServer.Find.Cms' is not installed. Update the database manually by running the cmdlet 'Initialize-EPiDatabase' in the package manager console or set createDatabaseSchema="true" on episerver.framework configuration element.
I rolled back the upgrade of Episerver.Find, and then the site started with the database upgraded to CMS 11 database schema.
The next day I upgraded to Episerver Find 13.2.4 (while holding my breath), waited for the database to be updated and the site to start - and it did!
Do not deploy updates to both the CMS database schema and the Find database schema at the same time! To be safe, apply one update at a time.
If you really want to do both updates at the same time, be sure to test it. I would normally do one upgrade at a time, and install them on a test environment one at a time. And then release to production all at the same time. That is not safe!