upgrade to 6.0 error UnableToUpgradeDBSchema

upgrade to 6.0 error UnableToUpgradeDBSchema

  
Hi

i'm trying to upgrade my development server (all in one server) from 5.1.1.9 to 6.0.1.6 and find this error:
Message 10
Id : UnableToUpgradeDBSchema
Type : Error
Message : Publishing Error
Submitable : True
Details :
Unable to upgrade database schema. Error trying to change database field 'ossys_
user.USERNAME' type (New Def: NVARCHAR(250); DB Def: NVARCHAR(50)).\r\nException
: The index 'IX_ossys_User_USERNAME' is dependent on column 'USERNAME'.
Hugo, 

I was checking the Breaking changes for 6.0 pdf (you can get it here) and this is in the 3rd page:

Check Before You Upgrade
Agile Platform
- To avoid a long downtime in the Production environment when upgrading to version 6.0, make
sure you have previously installed a revision that is prepared for the upgrade, namely:
- For version 5.1 install revision 5.1.1.22 or later;
- For version 5.0 install revision 5.0.2.50 or later;
- For version 4.2 install revision 4.2.4.88 or later;
- For earlier versions upgrade to one of the above versions;

You will need to upgrade to a newer 5.1 version before upgrade to 6

Best regards,
PC
Hi Hugo,

Welcome to the forums!

Going from 5.1 to 6.0 does indeed increase the username from 50 to 250 chars and that column does indeed have an index. Having said that, I did a quick test for that upgrade on a DB over here and I got no problem: the index did not complain when going up in size (it does complain when going down btw).

This may be due to the model over here being on a later 5.1 version, so Pedro's suggestion may be a good one and I would suggest you try that first.

If after that the upgrade still fails, if you're doing this on your machine I suggest you delete the index and do SCInstall again - that will recreate the index after the alter table. If you're doing this on a customer's machine, you may want to get it touch with OutSystems support so they can help you through the process.

Again, this does not normally happen so I'm not sure what your specifics may be.

Good luck,


Miguel