Match an existing Index when deploying instead of duplicating

On our radar
Sometimes we need to get an index into Production ASAP, and we'd prefer to not do a full deployment or update an eSpace until the next scheduled deployment. So we manually create the index and then add the index to our eSpace. When the eSpace does deploy, it always makes a new index instead of using the one we manually added.

It would be great if OutSystems saw the index we added and just chose to not create a second index in these scenarios... and if we ever deleted the manual index, THEN it could create its index if the eSpace was still set to have it.

Created on 29 Dec 2014
Comments (3)
AFAIK, this is how it should behave: if the index is "equal" (I believe if they are over the same columns and with the same column order). The product introspects the database and matches it against the "eSpace defintion". If they match, it shouldn't delete/recreate the index (at least in the past it was designed and implemented like that).
That's how I assumed it worked too, but then I had a scenario where it didn't work this way. :( Ended up with two identical indexes and the DB went crazy when I deleted one.

Justin, I just tested this with For the following test it worked as expected:

I created an index with MS Sql Server management (simple index over a Name attribute). Then I added this index to the oml and made a Step by Step eSpace compilation and did a download script - no index was removed/changed/added.

I then set the index in the eSpace as unique. As expected, for the platform it is a different Index and the following compilation message was displayed in SC, and the download script had a new index creation.
>Database contains an index 'IX_OSUSR_TD0_MYENT4IDX-TEST' that is not defined in the eSpace. It should be defined in the eSpace with 'Unique' set to 'No' in entity MyEnt4Idx over attributes NAME or manually dropped from database.<

Justin, if you can reproduce the issue please submit it to support. Thanks.