Unique index error: Unique index introduced. Upgrade script required
How can I make this BP error go away: Unique index error: Unique index introduced. Upgrade script required.
http://msdn2.microsoft.com/en-gb/library/aa884122.aspx tells me to implement an upgrade script. How do I implement an upgrade script and will this make the BP error go away?
Or even better, how can I get rid of this error without the scrip开发者_如何学编程ts, because the project has not jet deployed to customers?
If you just want to get rid of the error without the scripts you can modify \Classes\SysBPCheckTable\checkIndicesMoreUnique
accordingly or rather comment out this.checkIndicesMoreUnique();
in \Classes\SysBPCheckTable\check
.
If you choose to ignore the BP warning, beware that your synchronization at your customers may fail due to duplicate keys. This is especially true if 1. customer table contains records, 2. the new index has a new field as well.
The way to make an update script is described in the link you provided. You will find lots of examples in the ReleaseUpdate
classes.
Before merely ‘getting rid of’ the BP error, you have to investigate the index first. Which fields make up the index?
If the index is not needed, and is in a layer you can delete from, then delete the index. Having said that, you should afterwards do a compile on the AOT as well to make sure that this index isn’t references somewhere in the code (for example where selects are done with index hint).
But first of all you need to establish why the index has been created.
精彩评论