core icon indicating copy to clipboard operation
core copied to clipboard

Fix Upgrade Tasks MSSQL

Open erickgonzalez opened this issue 9 years ago • 5 comments

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)

  1. Start an instance of dotcms 3.6.0
  2. Stop the instance.
  3. Upgrade the instance to 3.7.0
  4. 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

erickgonzalez avatar Dec 13 '16 18:12 erickgonzalez

PR: https://github.com/dotCMS/core/pull/10380 and https://github.com/dotCMS/core/pull/10383

erickgonzalez avatar Jan 04 '17 22:01 erickgonzalez

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

shaydotcms avatar Jan 12 '17 17:01 shaydotcms

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

erickgonzalez avatar Jan 20 '17 20:01 erickgonzalez

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

dsilvam avatar Jan 23 '17 19:01 dsilvam

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

erickgonzalez avatar Jan 25 '17 21:01 erickgonzalez