Fix Upgrade Tasks MSSQL
Expected Behavior
When upgrading from a previous dotcms version, the upgrade must be successful.
Current Behavior
When upgrading from MSSQL is throwing a Fatal Error. Upgrade Task we need to review:
https://github.com/dotCMS/core/blob/master-3.7/dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task03710AddFKForIntegrityCheckerTables.java
Log: https://gist.github.com/erickgonzalez/54a94853f923a0ca0644b04ca90ac0f4
Possible Solution
We might need to drop the constraint before altering the column and then recreate the constraint.
Steps to Reproduce (for bugs)
- Start an instance of dotcms 3.6.0
- Stop the instance.
- Upgrade the instance to 3.7.0
- Check the logs.
Your Environment
- dotCMS version used: 3.6.0 to 3.7.0
- Browser Name and version: FF
- Operating System and version: Windows 7
- Database and version: MSSQL
PR: https://github.com/dotCMS/core/pull/10380 and https://github.com/dotCMS/core/pull/10383
Upgrade task is still failing. Tested upgrade in MSSQLServer from dotcms_3.6.0 to dotcms_4.1.0 Check logs for new exception message https://gist.github.com/shaydotcms/1e2d142813531e8b4684e1d26403770d
I'm unable to reproduce the issue. Tried an upgrade from 3.6 to latest master-4.1 with starter data, here is my log: https://gist.github.com/erickgonzalez/1ee6ca139b152bd800552bedcea6099f
Note to QA: we need to test this one with client db.
https://docs.google.com/document/d/1nWNbZ6OacZkZnGA3Lvfayob6mKYsx7M1sX8hDV4zeKo/edit
This is suggested to be tested on AWS since it is a large db
Upgrade tested with client's db, from 4.0 to 4.1 (the same db was first upgraded to 3.7 and originally the db was in 3.3). Log: https://gist.github.com/erickgonzalez/66ac94119177d78d7534b598c184e6a9